/* =========================================================
   ELITE SYSTEM FONT POLICY
   Default: IBM Plex Sans Arabic
   Front Header/Footer only: Cairo
   ========================================================= */

:root{
    --elite-font-main:'IBM Plex Sans Arabic',sans-serif;
    --elite-font-shell:'Cairo',sans-serif;
}

/*
 * Main inheritance.
 * Do NOT use "*" here because universal font rules can break icon fonts.
 */
html,
body{
    font-family:var(--elite-font-main)!important;
}

/* Standard textual HTML */
body :where(
    h1,h2,h3,h4,h5,h6,
    p,span,a,strong,b,em,i:not([class]),
    small,label,legend,
    ul,ol,li,
    table,thead,tbody,tfoot,tr,th,td,
    blockquote,cite,
    dl,dt,dd,
    address,
    figcaption,
    summary,
    code,kbd,samp,
    input,textarea,select,option,button
){
    font-family:var(--elite-font-main)!important;
}

/* Common Bootstrap / theme typography */
body :where(
    .btn,
    .form-control,
    .form-select,
    .dropdown-menu,
    .dropdown-item,
    .nav-link,
    .breadcrumb,
    .pagination,
    .page-link,
    .badge,
    .alert,
    .modal,
    .offcanvas,
    .tooltip,
    .popover,
    .card,
    .card-title,
    .card-text,
    .table
){
    font-family:var(--elite-font-main)!important;
}

/* Admin / dashboard textual UI */
body :where(
    .layout-wrapper,
    .layout-container,
    .layout-page,
    .content-wrapper,
    .container-xxl,
    .menu-item,
    .menu-link,
    .menu-sub,
    .navbar-nav,
    .dropdown-item,
    .form-label,
    .form-check-label,
    .input-group,
    .dataTables_wrapper,
    .select2-container,
    .select2-results,
    .select2-selection,
    .pagination
){
    font-family:var(--elite-font-main)!important;
}

/*
 * Frontend HEADER + FOOTER only = Cairo.
 * Several common wrappers are covered because the current theme
 * has changed markup during development.
 */
body :where(
    header,
    .site-header,
    .main-header,
    .header-area,
    .header-wrapper,
    .header-section,
    #header,
    footer,
    .site-footer,
    .main-footer,
    .footer-area,
    .footer-wrapper,
    .footer-section,
    #footer
),
body :where(
    header,
    .site-header,
    .main-header,
    .header-area,
    .header-wrapper,
    .header-section,
    #header,
    footer,
    .site-footer,
    .main-footer,
    .footer-area,
    .footer-wrapper,
    .footer-section,
    #footer
) :where(
    h1,h2,h3,h4,h5,h6,
    p,span,a,strong,b,em,small,
    label,li,
    input,textarea,select,option,button,
    .btn,.nav-link,.dropdown-item
){
    font-family:var(--elite-font-shell)!important;
}

/*
 * ICON FONT PROTECTION
 * These classes must keep their own icon font family.
 */
.ri,
[class^="ri-"],
[class*=" ri-"]{
    font-family:'remixicon'!important;
}

.fa,
.fas,
.far,
.fal,
.fad,
.fab,
[class^="fa-"],
[class*=" fa-"]{
    font-family:var(--fa-style-family,'Font Awesome 6 Free')!important;
}

.fab{
    font-family:'Font Awesome 6 Brands'!important;
}

.bi,
[class^="bi-"],
[class*=" bi-"]{
    font-family:'bootstrap-icons'!important;
}

.material-icons,
.material-icons-outlined,
.material-symbols-outlined,
.material-symbols-rounded,
.material-symbols-sharp{
    font-family:'Material Symbols Outlined'!important;
}

[class*="flaticon"],
[class^="flaticon"]{
    font-family:Flaticon!important;
}

/* Preserve icon pseudo-elements even inside Cairo Header/Footer */
header .ri,
header [class^="ri-"],
header [class*=" ri-"],
footer .ri,
footer [class^="ri-"],
footer [class*=" ri-"]{
    font-family:'remixicon'!important;
}

header .fa,
header .fas,
header .far,
header .fab,
footer .fa,
footer .fas,
footer .far,
footer .fab{
    font-family:var(--fa-style-family,'Font Awesome 6 Free')!important;
}

header .fab,
footer .fab{
    font-family:'Font Awesome 6 Brands'!important;
}

header .bi,
footer .bi{
    font-family:'bootstrap-icons'!important;
}

/* Native form widgets inherit reliably */
button,
input,
optgroup,
select,
textarea{
    font-family:var(--elite-font-main)!important;
}

header button,
header input,
header select,
header textarea,
footer button,
footer input,
footer select,
footer textarea{
    font-family:var(--elite-font-shell)!important;
}