/* ===================================================
   Font-Face Definitions
   IRANSans for fa-IR (Persian)
   Roboto for en-US (English)
   =================================================== */

/* --- IRANSans Font --- */
@font-face {
    font-family: 'IRANSans';
    src: url('../valex/fonts/IRANSansWeb(FaNum).ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* --- Roboto Regular --- */
@font-face {
    font-family: 'Roboto';
    src: url('../valex/fonts/Roboto-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* --- Roboto Medium --- */
@font-face {
    font-family: 'Roboto';
    src: url('../valex/fonts/Roboto-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* --- Roboto Bold --- */
@font-face {
    font-family: 'Roboto';
    src: url('../valex/fonts/Roboto-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ===================================================
   Font Application - Override valex hardcoded iransans
   =================================================== */

/* --- fa-IR (Persian/Farsi) - IRANSans --- */
body.lang-fa-IR {
    font-family: 'IRANSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

body.lang-fa-IR,
body.lang-fa-IR p,
body.lang-fa-IR div,
body.lang-fa-IR span,
body.lang-fa-IR a,
body.lang-fa-IR h1, body.lang-fa-IR h2, body.lang-fa-IR h3,
body.lang-fa-IR h4, body.lang-fa-IR h5, body.lang-fa-IR h6,
body.lang-fa-IR button,
body.lang-fa-IR input,
body.lang-fa-IR select,
body.lang-fa-IR textarea,
body.lang-fa-IR label,
body.lang-fa-IR li,
body.lang-fa-IR td,
body.lang-fa-IR th {
    font-family: 'IRANSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

/* --- en-US (English/Global) - Roboto --- */
body.lang-en-US {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

body.lang-en-US,
body.lang-en-US p,
body.lang-en-US div,
body.lang-en-US span,
body.lang-en-US a,
body.lang-en-US h1, body.lang-en-US h2, body.lang-en-US h3,
body.lang-en-US h4, body.lang-en-US h5, body.lang-en-US h6,
body.lang-en-US button,
body.lang-en-US input,
body.lang-en-US select,
body.lang-en-US textarea,
body.lang-en-US label,
body.lang-en-US li,
body.lang-en-US td,
body.lang-en-US th {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    /* Force English numerals (0-9) instead of Persian (۰-۹) */
    font-variant-numeric: lining-nums tabular-nums !important;
}

/* Preserve feather icon font (override parent cascade) */
body .fe,
body i.fe,
body .fe[class*="fe-"],
body i[class*="fe-"] {
    font-family: 'feather' !important;
}

/* Preserve Font Awesome icon fonts */
body .fa,
body .fas,
body .far,
body .fal,
body i.fa,
body i.fas,
body i.far,
body i.fal {
    font-family: "Font Awesome 5 Free" !important;
}

body .fab,
body i.fab {
    font-family: "Font Awesome 5 Brands" !important;
}

/* Ensure form elements and text inherit from body */
input,
button,
select,
textarea,
optgroup,
option,
h1, h2, h3, h4, h5, h6,
strong,
b,
label,
p,
a,
li,
div,
span {
    font-family: inherit;
}
