:root {
    --app-font-family: var(--bs-body-font-family, "Inter", "Roboto", "Helvetica Neue", Arial, sans-serif);
    --app-heading-font-family: var(--app-font-family);
}

html[lang^="ar"] {
    --app-font-family: "Noto Sans Arabic", "Noto Naskh Arabic", "Cairo", "Tajawal", Tahoma, Arial, sans-serif;
    --app-heading-font-family: var(--app-font-family);
    --bs-body-font-family: var(--app-font-family);
    --bs-font-sans-serif: var(--app-font-family);
}

html[lang^="ku"] {
    --app-font-family: "Noto Sans Arabic", "Cairo", "Tajawal", "Rudaw", Tahoma, Arial, sans-serif;
    --app-heading-font-family: var(--app-font-family);
    --bs-body-font-family: var(--app-font-family);
    --bs-font-sans-serif: var(--app-font-family);
}

html body,
html input,
html select,
html textarea,
html optgroup,
html .form-control,
html .form-select,
html .form-label,
html .select2-container .select2-selection__rendered,
html .select2-results__option,
html .swal2-title,
html .swal2-html-container,
html .tox-edit-area,
html .note-editable,
html .cke_editable,
html .ql-editor {
    font-family: var(--app-font-family) !important;
}

html h1,
html h2,
html h3,
html h4,
html h5,
html h6,
html .h1,
html .h2,
html .h3,
html .h4,
html .h5,
html .h6,
html .page-title,
html .card-title,
html .modal-title {
    font-family: var(--app-heading-font-family) !important;
}

html[lang^="ar"] body,
html[lang^="ku"] body {
    line-height: 1.7;
    letter-spacing: 0;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "kern";
}

html[lang^="ar"] .pos-layout-container,
html[lang^="ku"] .pos-layout-container {
    line-height: 1.65;
}

html[dir="rtl"] body,
html[dir="rtl"] .table,
html[dir="rtl"] .dropdown-menu,
html[dir="rtl"] .modal-content,
html[dir="rtl"] .card,
html[dir="rtl"] .form-label,
html[dir="rtl"] .menu-title,
html[dir="rtl"] .select2-results__option,
html[dir="rtl"] .note-editor,
html[dir="rtl"] .tox {
    text-align: right;
}

html[dir="rtl"] .form-control:not(.input_number):not([type="email"]):not([type="tel"]):not([type="url"]),
html[dir="rtl"] .form-select,
html[dir="rtl"] textarea,
html[dir="rtl"] .select2-container--default .select2-selection--single .select2-selection__rendered,
html[dir="rtl"] .select2-container--bootstrap .select2-selection--single .select2-selection__rendered,
html[dir="rtl"] .select2-container--bootstrap5 .select2-selection--single .select2-selection__rendered {
    text-align: right;
}

html[dir="rtl"] .select2-container--default .select2-selection--single .select2-selection__rendered,
html[dir="rtl"] .select2-container--bootstrap .select2-selection--single .select2-selection__rendered,
html[dir="rtl"] .select2-container--bootstrap5 .select2-selection--single .select2-selection__rendered {
    padding-right: 0.75rem;
    padding-left: 3.5rem;
}

html[dir="rtl"] .select2-container--bootstrap5 .select2-selection--single {
    position: relative;
}

html[dir="rtl"] .select2-container--bootstrap5 .select2-selection__clear {
    left: 2.5rem !important;
    right: auto !important;
}

html[dir="rtl"] .select2-container--bootstrap5 .select2-selection--multiple {
    padding-left: 2.75rem !important;
}

html[dir="rtl"] .input_number,
html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="tel"],
html[dir="rtl"] input[type="url"],
html[dir="rtl"] .amount,
html[dir="rtl"] .price,
html[dir="rtl"] .currency,
html[dir="rtl"] .currency-amount,
html[dir="rtl"] .display_currency,
html[dir="rtl"] .final-total,
html[dir="rtl"] .final_total,
html[dir="rtl"] .total_amount,
html[dir="rtl"] .primary-currency,
html[dir="rtl"] .secondary-currency,
html[dir="rtl"] .dual-currency-inline,
html[dir="rtl"] .dual-currency-compact,
html[dir="rtl"] .numeric,
html[dir="rtl"] .number,
html[dir="rtl"] .sku,
html[dir="rtl"] .barcode,
html[dir="rtl"] .phone,
html[dir="rtl"] .date,
html[dir="rtl"] .time,
html[dir="rtl"] .serial-number,
html[dir="rtl"] .invoice-no,
html[dir="rtl"] code,
html[dir="rtl"] kbd,
html[dir="rtl"] samp,
html[dir="rtl"] .text-monospace,
html[dir="rtl"] .bidi-ltr,
html[dir="rtl"] [dir="ltr"],
html[dir="rtl"] [data-bidi="ltr"] {
    direction: ltr;
    text-align: left !important;
    unicode-bidi: isolate;
}

html[dir="rtl"] input.input_number,
html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="tel"],
html[dir="rtl"] input[type="url"] {
    unicode-bidi: plaintext;
}

html[dir="rtl"] .bidi-rtl,
html[dir="rtl"] [data-bidi="rtl"] {
    direction: rtl;
    text-align: right !important;
    unicode-bidi: isolate;
}

html[dir="rtl"] .bidi-auto,
html[dir="rtl"] [data-bidi="auto"] {
    unicode-bidi: plaintext;
}

html[dir="rtl"] .dropdown-menu,
html[dir="rtl"] .modal-content,
html[dir="rtl"] .card,
html[dir="rtl"] .table {
    direction: rtl;
}

html[dir="rtl"] .dropdown-item,
html[dir="rtl"] .menu-link,
html[dir="rtl"] .nav-link,
html[dir="rtl"] .page-link,
html[dir="rtl"] .btn:not(.btn-icon) {
    text-align: inherit;
}

/* Protect icon font systems from locale font overrides */
html .fa,
html .fa-brands,
html .fa-classic,
html .fa-duotone,
html .fa-light,
html .fa-regular,
html .fa-sharp,
html .fa-sharp-solid,
html .fa-solid,
html .fa-thin,
html .fab,
html .fad,
html .fal,
html .far,
html .fas,
html .fasl,
html .fasr,
html .fass,
html .fast,
html .fat {
    font-family: var(--fa-style-family, "Font Awesome 6 Pro") !important;
}

html .fa-brands,
html .fab {
    font-family: "Font Awesome 6 Brands" !important;
}

html .fa-classic,
html .fa-light,
html .fa-regular,
html .fa-solid,
html .fa-thin,
html .fal,
html .far,
html .fas,
html .fat {
    font-family: "Font Awesome 6 Pro" !important;
}

html .fa-duotone,
html .fad {
    font-family: "Font Awesome 6 Duotone" !important;
}

html .fa::before,
html .fa-brands::before,
html .fa-classic::before,
html .fa-duotone::before,
html .fa-light::before,
html .fa-regular::before,
html .fa-sharp::before,
html .fa-sharp-solid::before,
html .fa-solid::before,
html .fa-thin::before,
html .fab::before,
html .fad::before,
html .fal::before,
html .far::before,
html .fas::before,
html .fasl::before,
html .fasr::before,
html .fass::before,
html .fast::before,
html .fat::before {
    font-family: inherit !important;
}

html .ki-duotone {
    font-family: "keenicons-duotone" !important;
}

html .ki-outline {
    font-family: "keenicons-outline" !important;
}

html .ki-solid {
    font-family: "keenicons-solid" !important;
}

html .ki-duotone::before,
html .ki-outline::before,
html .ki-solid::before {
    font-family: inherit !important;
}

html .la,
html .lar,
html .las {
    font-family: "Line Awesome Free" !important;
}

html .lab {
    font-family: "Line Awesome Brands" !important;
}

html .la::before,
html .lar::before,
html .las::before,
html .lab::before {
    font-family: inherit !important;
}

html .bi::before,
html [class^="bi-"]::before,
html [class*=" bi-"]::before {
    font-family: bootstrap-icons !important;
}
