/* 
 * Settings Page Cairo Font Fix
 * Specifically for business/settings page and similar settings pages
 */

/* ========================================
 * SETTINGS PAGE TEXT ELEMENTS - CAIRO FONT
 * ======================================== */

/* Page title and headers */
.content-header h1,
.page-title,
.settings-title {
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif !important;
    font-weight: 600 !important;
    font-size: 24px !important;
}

/* Form labels */
.form-group label,
.form-label,
.control-label,
label[for] {
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif !important;
    font-weight: 500 !important;
    font-size: 14px !important;
}

/* Form inputs */
.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
textarea,
select {
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif !important;
    font-size: 14px !important;
}

/* Input groups */
.input-group-addon {
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif !important;
    font-size: 14px !important;
}

/* Dropdowns and select2 */
.select2-container .select2-selection--single .select2-selection__rendered {
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif !important;
    font-size: 14px !important;
}

.select2-results__option {
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif !important;
    font-size: 14px !important;
}

/* Help text and descriptions */
.help-block,
.form-text,
.text-muted,
small,
.help-text {
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif !important;
    font-size: 12px !important;
}

/* ========================================
 * SETTINGS PAGE SPECIFIC ELEMENTS
 * ======================================== */

/* Company settings form */
.settings-form,
.company-settings,
.business-settings {
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif !important;
}

.settings-form *:not(.fa):not(.fas):not(.far):not(.fab):not(.glyphicon):not([class*="icon-"]):not([class*="btn-"]):not(.btn) {
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif !important;
}

/* Settings cards and panels */
.settings-card,
.settings-panel,
.box-body,
.panel-body {
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif !important;
}

/* Settings sections */
.settings-section,
.settings-group,
.form-section {
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif !important;
}

/* Settings tabs */
.nav-tabs > li > a {
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif !important;
    font-weight: 500 !important;
}

.tab-content {
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif !important;
}

/* ========================================
 * FORM SPECIFIC ELEMENTS
 * ======================================== */

/* Checkboxes and radio buttons labels */
.checkbox label,
.radio label,
.form-check-label {
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif !important;
    font-weight: 400 !important;
}

/* Form validation messages */
.has-error .help-block,
.has-success .help-block,
.has-warning .help-block,
.invalid-feedback,
.valid-feedback {
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif !important;
    font-size: 12px !important;
}

/* Required field indicators */
.required,
.text-danger {
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif !important;
}

/* ========================================
 * BUTTONS PROTECTION - KEEP ORIGINAL
 * ======================================== */

/* Buttons should remain with system font */
.btn,
button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
    font-family: 'Tahoma', 'Arial', sans-serif !important;
}

/* Browse button for file uploads */
.btn-file,
.file-upload-btn {
    font-family: 'Tahoma', 'Arial', sans-serif !important;
}

/* ========================================
 * ICON PROTECTION
 * ======================================== */

/* All icons should use icon fonts */
.fa, .fas, .far, .fab, .fal, .fad,
.glyphicon, .icon, .material-icons,
[class*="fa-"], [class*="glyphicon-"], [class*="icon-"],
i:not([class*="text-"]) {
    font-family: 'Font Awesome 5 Free', 'Font Awesome 5 Brands', 'FontAwesome', 
                 'Glyphicons Halflings', 'Ionicons', 'Material Icons' !important;
}

/* ========================================
 * MODAL AND POPUP PROTECTION
 * ======================================== */

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

.modal-body *:not(.fa):not(.fas):not(.far):not(.fab):not(.glyphicon):not([class*="icon-"]):not([class*="btn-"]):not(.btn) {
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif !important;
}

/* ========================================
 * ALERTS AND NOTIFICATIONS
 * ======================================== */

.alert,
.alert *:not(.fa):not(.fas):not(.far):not(.fab):not(.glyphicon):not([class*="icon-"]):not([class*="btn-"]):not(.btn) {
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif !important;
}

/* ========================================
 * TABLE ELEMENTS IN SETTINGS
 * ======================================== */

.table th,
.table td,
.table caption {
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif !important;
}

/* ========================================
 * SEARCH AND FILTER ELEMENTS
 * ======================================== */

/* Search bar */
.search-box,
.search-input,
input[placeholder*="بحث"],
input[placeholder*="search"] {
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif !important;
}

/* ========================================
 * RESPONSIVE FIXES
 * ======================================== */

@media (max-width: 768px) {
    .form-group label {
        font-size: 13px !important;
    }
    
    .form-control {
        font-size: 13px !important;
    }
    
    .content-header h1 {
        font-size: 20px !important;
    }
}

/* ========================================
 * FORCE OVERRIDE FOR SETTINGS PAGE
 * ======================================== */

/* Global override for settings page */
body.settings-page,
.settings-page,
[data-page="settings"] {
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif !important;
}

.settings-page *:not(.fa):not(.fas):not(.far):not(.fab):not(.glyphicon):not([class*="icon-"]):not([class*="btn-"]):not(.btn) {
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif !important;
}
