/* Globalize Tajawal across the dashboard.
   Tajawal carries both Latin and Arabic glyphs in a single family,
   so we override the theme's default font-family stack.

   IMPORTANT: we deliberately do NOT use a `*` descendant selector — that would
   force Tajawal onto <i> icon elements (Remix Icon, Phosphor, Boxicons, MDI)
   and replace their glyph fonts. Instead we target named text-bearing
   elements only, plus the sidebar / topbar containers explicitly. */
:root {
    --bs-font-sans-serif: "Tajawal", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

/* Top-level: every text-bearing element gets Tajawal */
html,
body,
p, span, a, strong, em, small, label, li, td, th,
h1, h2, h3, h4, h5, h6,
.btn,
.form-control,
.form-select,
.form-label,
.nav-link,
.menu-link,
.menu-title,
.modal-title,
.card-title,
.alert,
.dropdown-menu,
.dropdown-item,
.badge,
input, select, textarea, button {
    font-family: var(--bs-font-sans-serif) !important;
}

/* Sidebar — Velzon's stylesheet sets its own font on these classes,
   so we override at their level. We exclude <i> and icon-classed elements
   so glyph fonts (remixicon, Phosphor, etc.) are preserved. */
.app-menu,
.navbar-menu,
.navbar-nav,
#navbar-nav {
    font-family: var(--bs-font-sans-serif) !important;
}

/* Topbar / page chrome */
#page-topbar,
.page-title-box {
    font-family: var(--bs-font-sans-serif) !important;
}

/* Defensive: any icon library glyph element keeps its own font.
   We re-declare the canonical font-family for each library in case
   our text-bearing rule above accidentally applied via a generic selector. */
i[class*="ri-"], [class*="ri-"]:before, [class*="ri-"]:after {
    font-family: "remixicon" !important;
}
i.ph, i.phosphor, [class*="ph-"], [class^="ph-"] {
    font-family: "Phosphor" !important;
}
i[class*="bx-"], i[class^="bx-"] {
    font-family: "boxicons" !important;
}
i[class*="mdi-"], i[class^="mdi-"] {
    font-family: "Material Design Icons" !important;
}
i[class*="fa-"], i[class^="fa-"] {
    font-family: "Font Awesome 5 Free", "FontAwesome" !important;
}

/* SweetAlert2 + Bootstrap form validation tooltips also pick up Tajawal */
.swal2-popup,
.invalid-feedback,
.form-text {
    font-family: var(--bs-font-sans-serif) !important;
}

/* Tighter Arabic line height — Tajawal's default leading is generous */
html[dir="rtl"] body,
[dir="rtl"] .form-control,
[dir="rtl"] .form-select {
    line-height: 1.55;
}
