/* =========================================================
   IRANSans Webfonts (Local Project Fonts)
   ========================================================= */

@font-face {
    font-family: 'IRANSans';
    src: url('/static/fonts/IRANSansWeb.woff2') format('woff2'),
         url('/static/fonts/IRANSansWeb.woff') format('woff'),
         url('/static/fonts/IRANSansWeb.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSans';
    src: url('/static/fonts/IRANSansWeb.woff2') format('woff2'),
         url('/static/fonts/IRANSansWeb.woff') format('woff'),
         url('/static/fonts/IRANSansWeb.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSans';
    src: url('/static/fonts/IRANSansWeb.woff2') format('woff2'),
         url('/static/fonts/IRANSansWeb.woff') format('woff'),
         url('/static/fonts/IRANSansWeb.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSans';
    src: url('/static/fonts/IRANSansWeb_Bold.woff2') format('woff2'),
         url('/static/fonts/IRANSansWeb_Bold.woff') format('woff'),
         url('/static/fonts/IRANSansWeb_Bold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSans';
    src: url('/static/fonts/IRANSansWeb_Bold.woff2') format('woff2'),
         url('/static/fonts/IRANSansWeb_Bold.woff') format('woff'),
         url('/static/fonts/IRANSansWeb_Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSans';
    src: url('/static/fonts/IRANSansWeb_Bold.woff2') format('woff2'),
         url('/static/fonts/IRANSansWeb_Bold.woff') format('woff'),
         url('/static/fonts/IRANSansWeb_Bold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* =========================================================
   English Professional Fonts (System Native Fallbacks - No External Blocking)
   ========================================================= */

/* Typography Application */
:root {
    --font-fa: 'IRANSans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Tahoma, sans-serif;
    --font-en: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'Cascadia Code', 'Consolas', 'Segoe UI Mono', ui-monospace, SFMono-Regular, monospace;
}

/* Global Text Elements using IRANSans */
body, input, select, textarea, button, table, th, td, div, p, span, h1, h2, h3, h4, h5, h6, a, label, small {
    font-family: var(--font-fa);
}

/* Latin / English Specific Typography */
.font-en, [dir="ltr"]:not(code):not(.font-monospace):not(.number-display) {
    font-family: var(--font-en);
}

/* Financial Numbers, Codes, Serials, and Monospace Accounting Elements */
code, kbd, samp, pre,
.font-monospace,
.font-num,
.number-display,
input[type="number"],
.gold-calc-weight,
.gold-calc-carat,
.gold-calc-750,
.curr-amount,
.curr-unit-price,
.curr-total-price {
    font-family: var(--font-mono) !important;
    font-variant-numeric: tabular-nums lining-nums;
    letter-spacing: -0.2px;
}

/* Protect FontAwesome Icons from font-family override collision */
i, .fa, .fa-solid, .fa-regular, .fa-brands, [class^="fa-"], [class*=" fa-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "FontAwesome" !important;
    font-style: normal;
}
