/* Saudi Font Global Application */
@font-face {
    font-family: 'SaudiWeb';
    src: url('/fonts/SaudiWeb-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'SaudiWeb';
    src: url('/fonts/SaudiWeb-Bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/* Global font application - exclude icon fonts */
*:not(.ni):not(.fas):not(.far):not(.fab):not(.fal):not(.fad):not(.fa):not([class*="fa-"]):not([class*="ni-"]):not(.nucleo-icons):not(.bootstrap-icons) {
    font-family: 'SaudiWeb', sans-serif !important;
}

/* Preserve icon fonts */
.ni {
    font-family: 'NucleoIcons' !important;
}

.fas, .far, .fab, .fal, .fad, .fa, [class*="fa-"] {
    font-family: 'Font Awesome 5 Free', 'Font Awesome 5 Pro', 'FontAwesome' !important;
}

html, body {
    font-family: 'SaudiWeb', sans-serif !important;
}

/* All text elements */
h1, h2, h3, h4, h5, h6, p, span, div, a, button, input, textarea, select, label, li, td, th {
    font-family: 'SaudiWeb', sans-serif !important;
}

/* Form elements */
input, textarea, select, button, label {
    font-family: 'SaudiWeb', sans-serif !important;
}

/* Navigation elements */
nav, .navbar, .nav-link, .dropdown-menu, .dropdown-item {
    font-family: 'SaudiWeb', sans-serif !important;
}

/* Card elements */
.card, .card-title, .card-text, .card-body {
    font-family: 'SaudiWeb', sans-serif !important;
}

/* Table elements */
table, th, td, .table {
    font-family: 'SaudiWeb', sans-serif !important;
}

/* Modal elements */
.modal, .modal-title, .modal-body, .modal-footer {
    font-family: 'SaudiWeb', sans-serif !important;
}

/* Alert elements */
.alert, .alert-heading, .alert-text {
    font-family: 'SaudiWeb', sans-serif !important;
}

/* Button elements */
.btn, .btn-text {
    font-family: 'SaudiWeb', sans-serif !important;
}

/* List elements */
ul, ol, li {
    font-family: 'SaudiWeb', sans-serif !important;
}

/* Footer elements */
footer, .footer {
    font-family: 'SaudiWeb', sans-serif !important;
}

/* Specific Arabic content */
[dir="rtl"], 
[lang="ar"], 
.arabic-text,
.rtl {
    font-family: 'SaudiWeb', sans-serif !important;
}

/* Override Bootstrap and other framework fonts */
.text-sans-serif,
.font-sans-serif {
    font-family: 'SaudiWeb', sans-serif !important;
}

/* Ensure font loading optimization */
@supports (font-display: swap) {
    @font-face {
        font-family: 'SaudiWeb';
        src: url('/fonts/SaudiWeb-Regular.woff') format('woff');
        font-weight: normal;
        font-style: normal;
        font-display: swap;
    }
    
    @font-face {
        font-family: 'SaudiWeb';
        src: url('/fonts/SaudiWeb-Bold.woff') format('woff');
        font-weight: bold;
        font-style: normal;
        font-display: swap;
    }
}
