@font-face {
    font-family: "IRANSansX";
    src: url("../fonts/IRANSansXFaNum-MediumD4.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Farsi Font Styling */

:root[lang="fa"],
:root[lang="fa-IR"],
html[lang="fa"],
html[lang="fa-IR"] {
    font-family:
        "IRANSansX",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        "Helvetica Neue",
        Arial,
        sans-serif !important;
}

body[lang="fa"],
body[lang="fa-IR"] {
    font-family:
        "IRANSansX",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        "Helvetica Neue",
        Arial,
        sans-serif !important;
}

:root[lang="fa"] *,
:root[lang="fa-IR"] *,
html[lang="fa"] *,
html[lang="fa-IR"] *,
body[lang="fa"] *,
body[lang="fa-IR"] * {
    font-family:
        "IRANSansX",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        "Helvetica Neue",
        Arial,
        sans-serif !important;
}

/* Icon display fixes */

body[lang="fa"] svg,
body[lang="fa-IR"] svg,
body[lang="fa"] [data-lucide],
body[lang="fa-IR"] [data-lucide] {
    display: inline-block !important;
    vertical-align: middle !important;
}

body[lang="fa"] .align-middle,
body[lang="fa-IR"] .align-middle {
    vertical-align: middle !important;
}

/* Keep SVG icons LTR to prevent mirroring */

body[lang="fa"] svg[data-lucide],
body[lang="fa-IR"] svg[data-lucide] {
    direction: ltr;
}

/* Fix Font Awesome icons - prevent font override */

body[lang="fa"] .fas,
body[lang="fa-IR"] .fas,
body[lang="fa"] .far,
body[lang="fa-IR"] .far,
body[lang="fa"] .fal,
body[lang="fa-IR"] .fal,
body[lang="fa"] .fab,
body[lang="fa-IR"] .fab,
body[lang="fa"] .fa,
body[lang="fa-IR"] .fa,
body[lang="fa"] [class^="fa-"],
body[lang="fa-IR"] [class^="fa-"],
body[lang="fa"] [class*=" fa-"],
body[lang="fa-IR"] [class*=" fa-"] {
    font-family:
        "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome" !important;
    display: inline-block !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    line-height: 1 !important;
    direction: ltr !important;
}

/* Fix Font Awesome solid icons */

body[lang="fa"] .fas,
body[lang="fa-IR"] .fas {
    font-weight: 900 !important;
}

/* Fix Font Awesome regular icons */

body[lang="fa"] .far,
body[lang="fa-IR"] .far {
    font-weight: 400 !important;
}

/* Fix Font Awesome light icons */

body[lang="fa"] .fal,
body[lang="fa-IR"] .fal {
    font-weight: 300 !important;
}

/* Fix Font Awesome brand icons */

body[lang="fa"] .fab,
body[lang="fa-IR"] .fab {
    font-weight: 400 !important;
}
