/* ================================================
   INTER FONT FAMILY - EXCLUSIVE
   The single, systematic typeface for the whole app.
   Loaded from jsDelivr (@fontsource/inter).
   ================================================ */

/* Arabic UI typeface — loaded from Google Fonts; applied only when the app is in Arabic
   (see the RTL rule near the end of this file). @import must precede the @font-face rules. */
@import url('https://fonts.googleapis.com/css2?family=Almarai:wght@300;400;700;800&display=swap');

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100; font-display: swap; src: url('https://cdn.jsdelivr.net/npm/@fontsource/inter@5.1.0/files/inter-latin-100-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 200; font-display: swap; src: url('https://cdn.jsdelivr.net/npm/@fontsource/inter@5.1.0/files/inter-latin-200-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 300; font-display: swap; src: url('https://cdn.jsdelivr.net/npm/@fontsource/inter@5.1.0/files/inter-latin-300-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('https://cdn.jsdelivr.net/npm/@fontsource/inter@5.1.0/files/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('https://cdn.jsdelivr.net/npm/@fontsource/inter@5.1.0/files/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('https://cdn.jsdelivr.net/npm/@fontsource/inter@5.1.0/files/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('https://cdn.jsdelivr.net/npm/@fontsource/inter@5.1.0/files/inter-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 800; font-display: swap; src: url('https://cdn.jsdelivr.net/npm/@fontsource/inter@5.1.0/files/inter-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 900; font-display: swap; src: url('https://cdn.jsdelivr.net/npm/@fontsource/inter@5.1.0/files/inter-latin-900-normal.woff2') format('woff2'); }

/* ================================================
   GLOBAL FONT APPLICATION - INTER ONLY, NO FALLBACKS
   ================================================ */

* {
    font-family: 'Inter' !important;
}

body,
html {
    font-family: 'Inter' !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Neutralise any hard-coded typeface anywhere (Geist, Roboto, Nunito, system, etc.) */
[style*="Geist"],
[style*="Inter"],
[style*="Roboto"],
[style*="Nunito"],
[style*="system-ui"],
[style*="apple-system"],
[style*="Segoe UI"],
[style*="Helvetica"],
[style*="Arial"],
[style*="Georgia"],
[style*="Times"],
code, pre, kbd, samp,
[style*="monospace"],
[style*="Courier"] {
    font-family: 'Inter' !important;
}

/* ================================================
   ICON FONT EXCEPTIONS - these are glyph fonts, not text
   ================================================ */

.material-icons,
.material-icons-outlined,
.material-icons-round,
.material-icons-sharp,
.material-icons-two-tone,
i.material-icons {
    font-family: 'Material Icons' !important;
}

.fa, .fas, .far, .fal, .fad, .fab, .fa-solid, .fa-regular, .fa-light, .fa-brands,
[class^="fa-"], [class*=" fa-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "Font Awesome 5 Free", "Font Awesome 5 Brands", "FontAwesome" !important;
}

.flag-icon {
    font-family: inherit !important;
}

/* ================================================
   ARABIC UI — Almarai only (overrides the global Inter !important via higher specificity)
   ================================================ */
html[data-textdirection="rtl"] * {
    font-family: 'Almarai', sans-serif !important;
}
/* glyph/icon fonts must stay intact in Arabic too (specificity beats the rule above) */
html[data-textdirection="rtl"] .material-icons,
html[data-textdirection="rtl"] .material-icons-outlined,
html[data-textdirection="rtl"] .material-icons-round,
html[data-textdirection="rtl"] .material-icons-sharp,
html[data-textdirection="rtl"] .material-icons-two-tone,
html[data-textdirection="rtl"] i.material-icons {
    font-family: 'Material Icons' !important;
}
html[data-textdirection="rtl"] .fa, html[data-textdirection="rtl"] .fas, html[data-textdirection="rtl"] .far,
html[data-textdirection="rtl"] .fal, html[data-textdirection="rtl"] .fad, html[data-textdirection="rtl"] .fab,
html[data-textdirection="rtl"] [class^="fa-"], html[data-textdirection="rtl"] [class*=" fa-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "Font Awesome 5 Free", "Font Awesome 5 Brands", "FontAwesome" !important;
}

/* ================================================
   TYPOGRAPHY SCALE
   ================================================ */

h1 { font-weight: 700; }
h2 { font-weight: 600; }
h3 { font-weight: 600; }
h4 { font-weight: 500; }
h5 { font-weight: 500; }
h6 { font-weight: 500; }

body { font-weight: 400; line-height: 1.5; }

button, .btn, label { font-weight: 500; }
