/**
 * OmniTeQ — Square UI (Create Purchase look)
 * Load LAST after page/module CSS. Presentation only.
 * Controls 3px · cards/modals 4px · excludes POS modern + true circles.
 */

:root {
    --ot-radius-sm: 3px;
    --ot-radius: 3px;
    --ot-radius-lg: 3px;
    --ot-control-radius: 3px;
    --pfm-radius: 3px;
    --pfm-radius-sm: 3px;
    --cfm-radius: 3px;
    --cfm-radius-sm: 3px;
    --otp-radius: 3px;
}

/* ================================================================== */
/* Cards / boxes / panels                                              */
/* ================================================================== */
body:not(:has(.pos-modern-layout)) .box,
body:not(:has(.pos-modern-layout)) .box-primary,
body:not(:has(.pos-modern-layout)) .box-solid,
body:not(:has(.pos-modern-layout)) .card,
body:not(:has(.pos-modern-layout)) .panel,
body:not(:has(.pos-modern-layout)) .panel-default,
body:not(:has(.pos-modern-layout)) .well,
body:not(:has(.pos-modern-layout)) .info-box,
body:not(:has(.pos-modern-layout)) .small-box,
.product-form-modern .pfm-widget,
.product-form-modern .box-primary,
.product-form-modern .pfm-card,
.contact-form-modern,
.contact-form-page .box,
.purchase-form-modern .purfm-card,
.ot-products-page .ot-products-card,
.ot-products-page .box,
.ot-products-page .ot-pf-card,
.ot-product-create-page .ot-pf-card,
.ot-sp-card,
.ot-supplier-create-page .ot-sp-card,
.invoice-create-page .box,
.components-widget .box,
.ot-products-form-card,
.bard-kpi-item,
.bard-table-card,
.business-table-card,
.business-table-wrap,
.portal-layout .box,
.portal-layout .card,
.portal-layout .panel,
.sa-ui-card,
.superadmin-card,
.hub-card,
.ot-hub-card {
    border-radius: 3px !important;
}

/* ================================================================== */
/* Modals / popups / bootbox / view_modal                              */
/* ================================================================== */
.modal-content,
.modal .modal-content,
.view_modal .modal-content,
.view_modal.modal .modal-content,
#global_view_modal .modal-content,
.contact_modal .modal-content,
.contact_modal.modal .modal-content,
.brands_modal .modal-content,
.tax_rate_modal .modal-content,
.unit_modal .modal-content,
.category_modal .modal-content,
.bootbox .modal-content,
.bootbox-body,
div[class*="_modal"] .modal-content,
.modal-dialog .modal-content {
    border-radius: 3px !important;
}

.modal-header,
.modal .modal-header,
.view_modal .modal-header,
.contact_modal .modal-header {
    border-radius: 3px 3px 0 0 !important;
}

.modal-footer,
.modal .modal-footer,
.view_modal .modal-footer,
.contact_modal .modal-footer {
    border-radius: 0 0 3px 3px !important;
}

/* Controls inside every modal / popup */
.modal .form-control,
.modal input.form-control,
.modal select.form-control,
.modal textarea.form-control,
.view_modal .form-control,
.contact_modal .form-control,
.bootbox .form-control,
div[class*="_modal"] .form-control,
.modal .input-group-addon,
.view_modal .input-group-addon {
    border-radius: 3px !important;
}

.modal .select2-container--default .select2-selection--single,
.modal .select2-container--default .select2-selection--multiple,
.view_modal .select2-container--default .select2-selection--single,
.view_modal .select2-container--default .select2-selection--multiple,
.contact_modal .select2-container--default .select2-selection--single,
.contact_modal .select2-container--default .select2-selection--multiple,
div[class*="_modal"] .select2-container--default .select2-selection--single,
div[class*="_modal"] .select2-container--default .select2-selection--multiple {
    border-radius: 3px !important;
}

.modal .btn,
.modal button.btn,
.modal a.btn,
.modal .tw-dw-btn,
.view_modal .btn,
.contact_modal .btn,
.bootbox .btn,
.bootbox .bootbox-close-button,
div[class*="_modal"] .btn {
    border-radius: 3px !important;
}

/* SweetAlert (confirm / delete / info popups) */
.swal-modal,
.swal2-popup,
.swal2-modal {
    border-radius: 3px !important;
}

.swal-content__input,
.swal-content__textarea,
.swal2-input,
.swal2-textarea,
.swal2-select {
    border-radius: 3px !important;
}

.swal-button,
.swal2-styled,
.swal2-confirm,
.swal2-cancel,
.swal2-deny,
.swal-button-info,
#datatables_buttons_info {
    border-radius: 3px !important;
}

/* Dropdowns / popovers / datepicker (common popup chrome) */
body:not(:has(.pos-modern-layout)) .dropdown-menu,
body:not(:has(.pos-modern-layout)) .popover,
.datepicker.dropdown-menu,
.bootstrap-datetimepicker-widget,
.select2-dropdown,
.select2-container--open .select2-dropdown {
    border-radius: 3px !important;
}

/* ================================================================== */
/* Text / select / textarea (pages)                                   */
/* ================================================================== */
body:not(:has(.pos-modern-layout)) .form-control,
body:not(:has(.pos-modern-layout)) input.form-control,
body:not(:has(.pos-modern-layout)) select.form-control,
body:not(:has(.pos-modern-layout)) textarea.form-control,
.product-form-modern .form-control,
.contact-form-modern .form-control,
.purchase-form-modern .form-control,
.ot-products-page .form-control,
.ot-products-page .ot-product-search-input,
.ot-product-create-page .form-control,
.ot-supplier-create-page .form-control,
.ot-supplier-create-page .ot-sp-field .form-control,
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select,
.invoice-create-page .form-control,
.sell-return-form-page .form-control,
.portal-layout .form-control,
.portal-layout input.form-control,
.portal-layout select.form-control,
.portal-layout textarea.form-control {
    border-radius: 3px !important;
}

body:not(:has(.pos-modern-layout)) .input-group-addon,
.product-form-modern .input-group-addon,
.contact-form-modern .input-group-addon,
.purchase-form-modern .input-group-addon,
.ot-product-create-page .ot-pf-affix__prefix,
.ot-supplier-create-page .ot-pf-affix__prefix,
.modal .input-group-addon {
    border-radius: 3px 0 0 3px !important;
}

.ot-product-create-page .ot-pf-affix__suffix,
.ot-supplier-create-page .ot-pf-affix__suffix,
.ot-product-create-page .ot-pf-affix > .form-control,
.ot-product-create-page .ot-pf-affix__prefix + .form-control {
    border-radius: 0 3px 3px 0 !important;
}

.ot-product-create-page .ot-pf-affix > .form-control:not(:last-child) {
    border-radius: 3px 0 0 3px !important;
}

.ot-product-create-page .ot-pf-affix__prefix + .form-control:not(:last-child) {
    border-radius: 0 !important;
}

.ot-supplier-create-page .ot-pf-affix > .form-control {
    border-radius: 3px 0 0 3px !important;
}

/* ================================================================== */
/* Select2                                                             */
/* ================================================================== */
body:not(:has(.pos-modern-layout)) .select2-container--default .select2-selection--single,
body:not(:has(.pos-modern-layout)) .select2-container--default .select2-selection--multiple,
.product-form-modern .select2-container--default .select2-selection--single,
.product-form-modern .select2-container--default .select2-selection--multiple,
.contact-form-modern .select2-container--default .select2-selection--single,
.contact-form-modern .select2-container--default .select2-selection--multiple,
.purchase-form-modern .select2-container--default .select2-selection--single,
.purchase-form-modern .select2-container--default .select2-selection--multiple,
.ot-products-page .select2-container--default .select2-selection--single,
.ot-products-page .select2-container--default .select2-selection--multiple,
.ot-product-create-page .select2-container--default .select2-selection--single,
.ot-product-create-page .select2-container--default .select2-selection--multiple,
.ot-product-create-page .ot-pf-row .select2-container--default .select2-selection--single,
.ot-product-create-page .ot-pf-row .select2-container--default .select2-selection--multiple,
.ot-supplier-create-page .select2-container--default .select2-selection--single,
.ot-supplier-create-page .ot-sp-field .select2-container--default .select2-selection--single,
.ot-products-filterbar__selects .select2-container--default .select2-selection--single,
.dashboard-header-select + .select2-container .select2-selection,
.portal-layout .select2-container--default .select2-selection--single,
.portal-layout .select2-container--default .select2-selection--multiple {
    border-radius: 3px !important;
}

body:not(:has(.pos-modern-layout)) .select2-dropdown,
.product-form-modern .select2-dropdown,
.omni-supplier-select2-dropdown.select2-dropdown,
.omni-customer-select2-dropdown.select2-dropdown {
    border-radius: 3px !important;
}

body:not(:has(.pos-modern-layout)) .select2-container--default .select2-selection--multiple .select2-selection__choice,
.omni-supplier-select2-dropdown .select2-search--dropdown .select2-search__field,
.omni-customer-select2-dropdown .select2-search--dropdown .select2-search__field {
    border-radius: 3px !important;
}

/* ================================================================== */
/* Buttons                                                             */
/* ================================================================== */
body:not(:has(.pos-modern-layout)) .btn,
body:not(:has(.pos-modern-layout)) button.btn,
body:not(:has(.pos-modern-layout)) a.btn,
body:not(:has(.pos-modern-layout)) .tw-dw-btn,
body:not(:has(.pos-modern-layout)) .ot-products-btn,
.product-form-modern .btn,
.product-form-modern .tw-dw-btn,
.product-form-modern .ot-products-btn,
.contact-form-modern .btn,
.contact-form-modern .tw-dw-btn,
.purchase-form-modern .btn,
.ot-products-page .btn,
.ot-products-page .btn-primary,
.ot-products-page .business-table-add-btn,
.ot-products-page .ot-products-btn,
.ot-products-page .tw-dw-btn,
.ot-product-create-page .ot-products-btn,
.ot-product-create-page .btn,
.ot-supplier-create-page .ot-products-btn,
.ot-supplier-create-page .btn,
.bard-filter-btn,
.dashboard-header-btn,
.portal-layout .btn,
.portal-layout .tw-dw-btn,
.portal-layout button.btn,
.portal-layout a.btn {
    border-radius: 3px !important;
}

.ot-product-create-page .ot-pf-row__control .input-group-btn .btn {
    border-radius: 0 3px 3px 0 !important;
}

/* Keep true circles for avatars / status dots only */
.img-circle,
.user-image,
.direct-chat-img,
.ot-products-page .ot-avatar,
[class*="avatar"][class*="circle"],
.swal-icon--success__ring {
    border-radius: 50% !important;
}

/* ================================================================== */
/* Reports / Hub / module chrome                                       */
/* ================================================================== */
.report-page-header,
.report-page .box,
.report-page .card,
.report-filter-card,
.report-kpi-card,
.report-page--sales-summary .ss-kpi-card,
.report-page--sales-summary .ss-chart-card,
.report-page--sales-summary .ss-table-panel,
.report-page--sales-summary .ss-report-filters,
.report-page--tax-vat .ss-kpi-card,
.report-page--tax-vat .ss-chart-card,
.report-page--tax-vat .ss-table-panel,
.report-page--tax-vat .ss-report-filters,
.report-page--product-sales .ss-kpi-card,
.report-page--product-sales .ss-chart-card,
.report-page--product-sales .ss-table-panel,
.report-page--product-sales .ss-report-filters,
section.content-header.ss-report-header,
.hub-work-queue-card,
.workspace-card,
.executive-dashboard-tile,
.executive-dashboard-section,
.approval-inbox-summary,
.hub-slim-owner-shortcuts,
.portal-layout .portal-card,
.sa-page .box,
.sa-page .card,
.project-modern-card,
.hrm-modern-card,
.accounting-modern-card {
    border-radius: 3px !important;
}

.report-page .form-control,
.report-page select.form-control,
.report-page textarea.form-control,
.report-page .btn,
.report-page .tw-dw-btn,
.report-page .select2-container--default .select2-selection--single,
.report-page .select2-container--default .select2-selection--multiple,
.hub-work-queue-card .btn,
.workspace-card .btn,
.project-modern-card .form-control,
.hrm-modern-card .form-control,
.accounting-modern-card .form-control {
    border-radius: 3px !important;
}

.report-page--sales-summary .ss-kpi-card__icon {
    border-radius: 3px !important;
}

.report-page--tax-vat .ss-kpi-card__icon {
    border-radius: 3px !important;
}

.report-page--product-sales .ss-kpi-card__icon {
    border-radius: 3px !important;
}

.report-page--customer-group .ss-kpi-card,
.report-page--customer-group .ss-chart-card,
.report-page--customer-group .ss-table-panel,
.report-page--customer-group .ss-report-filters {
    border-radius: 3px !important;
}

.report-page--customer-group .ss-kpi-card__icon {
    border-radius: 3px !important;
}
