/* 
 * Cairo Font Application - Balanced Approach
 * Professional Arabic font from Google Fonts
 * URL: https://fonts.google.com/specimen/Cairo
 */

/* Import Cairo font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@200;300;400;500;600;700;800;900&display=swap');

/* Apply Cairo font to body - Base level */
body, html {
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif !important;
}

/* Text elements - Force Cairo on text content */
h1, h2, h3, h4, h5, h6,
p, 
span:not(.fa):not(.fas):not(.far):not(.fab):not(.glyphicon):not([class*="icon-"]):not([class*="btn-"]),
div:not(.fa):not(.fas):not(.far):not(.fab):not(.glyphicon):not(.btn):not([class*="btn-"]):not(.pagination):not([class*="pagination"]),
label, .form-label,
td, th, li,
.content, .main-content, .page-content {
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif !important;
}

/* Form inputs - Apply Cairo to input text */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
textarea {
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif !important;
}

/* Native select - keep Cairo for options */
select {
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif !important;
}

/* AdminLTE specific - text only */
.content-header h1,
.box-title,
.panel-title,
.user-panel .info,
.main-header .navbar-brand,
.box-body, .panel-body, .card-body,
.info-box-content, .small-box-content {
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif !important;
}

/* Sidebar Menu - Apply Cairo to text only */
.sidebar-menu > li > a {
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif !important;
}

.sidebar-menu > li > a > span,
.sidebar-menu > li > a > .menu-text,
.sidebar-menu > li > a > .menu-title {
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif !important;
}

/* Treeview submenu */
.treeview-menu > li > a {
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif !important;
}

.treeview-menu > li > a > span {
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif !important;
}

/* Sidebar header */
.main-sidebar .sidebar .user-panel .info p,
.main-sidebar .sidebar .user-panel .info a {
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif !important;
}

/* Table content - text only */
.table thead th,
.table tbody td,
.dataTables_info,
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif !important;
}

/* Breadcrumb text */
.breadcrumb li {
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif !important;
}

/* Modal content */
.modal-title,
.modal-body p,
.modal-body label,
.modal-body span,
.modal-body div {
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif !important;
}

/* Alert content */
.alert {
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif !important;
}

/* List content */
.list-group-item {
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif !important;
}

/* Nav content - text only */
.navbar-nav > li > a {
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif !important;
}

/* Force Cairo on all text content - Global override */
*:not(.fa):not(.fas):not(.far):not(.fab):not(.glyphicon):not([class*="icon-"]):not([class*="btn-"]):not(.btn):not(.pagination):not([class*="pagination"]):not(.select2-container):not([class*="select2"]):not(.dt-buttons):not([class*="dt-"]):not(.DTTT):not([class*="DTTT"]) {
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif !important;
}

/* ========================================
 * EXCLUSIONS - DO NOT APPLY CAIRO
 * ======================================== */

/* Exclude buttons - keep original fonts for proper display */
.btn, button, 
input[type="button"],
input[type="submit"],
input[type="reset"],
.btn *, button * {
    font-family: 'Tahoma', 'Arial', sans-serif !important;
}

/* Exclude pagination */
.pagination, .pagination *,
.dataTables_paginate, .dataTables_paginate *,
.paging_simple_numbers, .paging_simple_numbers * {
    font-family: 'Tahoma', 'Arial', sans-serif !important;
}

/* Exclude ALL icons */
.fa, .fas, .far, .fab, .fal, .fad,
.glyphicon, .icon, .material-icons,
[class*="fa-"],
[class*="glyphicon-"],
[class*="icon-"],
i, span.fa, span.fas, span.far, span.fab,
span.glyphicon, span.icon {
    font-family: 'Font Awesome 5 Free', 'Font Awesome 5 Brands', 'FontAwesome', 
                 'Glyphicons Halflings', 'Ionicons', 'Material Icons', 
                 'IcoFont', sans-serif !important;
}

/* Exclude dropdowns and select2 */
.select2-container,
.select2-container *,
.dropdown-menu,
.dropdown-menu * {
    font-family: 'Tahoma', 'Arial', sans-serif !important;
}

/* Exclude POS buttons and controls */
.pos-tab-container,
.pos-tab-container *,
.pos-product-div,
.pos-product-div *,
.pos-processing,
.pos-processing * {
    font-family: 'Tahoma', 'Arial', sans-serif !important;
}

/* Exclude export buttons */
.dt-buttons, .dt-buttons *,
.buttons-html5, .buttons-print,
.DTTT_button, .DTTT_button * {
    font-family: 'Tahoma', 'Arial', sans-serif !important;
}

/* Exclude invoices and receipts */
.invoice, .invoice *,
.receipt, .receipt *,
.print-area, .print-area *,
.thermal-receipt, .thermal-receipt *,
.pos-receipt, .pos-receipt * {
    font-family: 'Arial', 'Tahoma', 'Helvetica', sans-serif !important;
}

/* Exclude badges and labels that might have icons */
.badge, .label {
    font-family: 'Tahoma', 'Arial', sans-serif !important;
}

/* Print media */
@media print {
    * {
        font-family: 'Arial', 'Tahoma', 'Helvetica', sans-serif !important;
    }
}
