/* ============================================= */
/* Cairo Arabic font · local-only (no CDN)        */
/* Activates only when UI is Arabic/RTL           */
/* ============================================= */

/* Variable font — full 200–1000 range */
@font-face {
    font-family: 'Cairo';
    font-style: normal;
    font-weight: 200 1000;
    font-display: swap;
    src: url('./Cairo-VariableFont_slnt,wght.ttf') format('truetype-variations');
    font-variation-settings: 'wght' 400, 'slnt' 0;
}

/* Weight-specific fallbacks for browsers without variable-font support */
@font-face { font-family: 'Cairo'; font-style: normal; font-weight: 400; font-display: swap; src: url('./Cairo-VariableFont_slnt,wght.ttf') format('truetype'); }
@font-face { font-family: 'Cairo'; font-style: normal; font-weight: 500; font-display: swap; src: url('./Cairo-VariableFont_slnt,wght.ttf') format('truetype'); }
@font-face { font-family: 'Cairo'; font-style: normal; font-weight: 600; font-display: swap; src: url('./Cairo-VariableFont_slnt,wght.ttf') format('truetype'); }
@font-face { font-family: 'Cairo'; font-style: normal; font-weight: 700; font-display: swap; src: url('./Cairo-VariableFont_slnt,wght.ttf') format('truetype'); }
@font-face { font-family: 'Cairo'; font-style: normal; font-weight: 800; font-display: swap; src: url('./Cairo-VariableFont_slnt,wght.ttf') format('truetype'); }

/* ============================================= */
/* Apply Cairo to Arabic body + common text tags  */
/* (NO universal selector — icon fonts are safe)  */
/* ============================================= */
html[dir="rtl"],
html[dir="rtl"] body,
html[lang="ar"],
html[lang="ar"] body {
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, sans-serif;
}

/* Cascade Cairo through text elements, but EXCLUDE icon fonts */
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3,
html[dir="rtl"] h4, html[dir="rtl"] h5, html[dir="rtl"] h6,
html[dir="rtl"] p, html[dir="rtl"] span:not([class*="material"]):not([class*="iconify"]):not([class*="lucide"]):not([class*="icon"]),
html[dir="rtl"] div, html[dir="rtl"] a, html[dir="rtl"] li,
html[dir="rtl"] td, html[dir="rtl"] th, html[dir="rtl"] label,
html[dir="rtl"] input, html[dir="rtl"] textarea, html[dir="rtl"] select,
html[dir="rtl"] button, html[dir="rtl"] small, html[dir="rtl"] strong, html[dir="rtl"] em {
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, sans-serif;
}

/* Headings always bold in Arabic */
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6 {
    font-weight: 700;
    font-variation-settings: 'wght' 700;
}

/* Better line-height for Arabic paragraphs */
html[dir="rtl"] p,
html[dir="rtl"] .text-content,
html[dir="rtl"] .description {
    line-height: 1.7;
}

/* Arabic size boost — Cairo renders ~1pt smaller than Latin at same px */
html[dir="rtl"] body {
    font-size: 15px;
}
html[dir="rtl"] table td { font-size: 14px; }
html[dir="rtl"] table th { font-size: 12px; }
html[dir="rtl"] label,
html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select { font-size: 14px; }
html[dir="rtl"] small,
html[dir="rtl"] .text-xs,
html[dir="rtl"] .text-sm { font-size: 13px; }
