/* ==========================================================================
   UltimatePOS — Roboto base font
   --------------------------------------------------------------------------
   Loads the self-hosted Roboto faces (public/fonts/google-fonts/roboto.css,
   weights 300/400/500/700 + italic 400, latin + latin-ext) and applies Roboto
   as the primary UI font across the whole app, replacing Source Sans Pro and
   Inter.

   Safety rails:
   - Scoped to @media screen so receipts / print views keep their print fonts
     (e.g. thermal-receipt Times New Roman).
   - Icon fonts (Font Awesome 5 Free/Brands, Glyphicons, Ionicons) are
     re-declared AFTER the universal rule so glyphs are never re-mapped.
   - Code-like elements keep the monospace stack.
   - RTL (Arabic) locales keep the bundled Conv_GESSTwoLight Arabic face.
   ========================================================================== */

@import url('../fonts/google-fonts/roboto.css');

@media screen {
    /* 1. Universal base font ------------------------------------------ */
    * {
        font-family: 'Roboto', 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    }

    /* 2. RTL locales: keep the bundled Arabic face for text ------------ */
    html[dir="rtl"],
    html[dir="rtl"] body,
    html[dir="rtl"] * {
        font-family: Conv_GESSTwoLight, 'Roboto', 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif !important;
    }

    /* 3. Code-like elements: monospace stack --------------------------- */
    pre, code, kbd, samp,
    .tw-mono, .font-mono,
    html[dir="rtl"] pre, html[dir="rtl"] code,
    html[dir="rtl"] kbd, html[dir="rtl"] samp {
        font-family: Consolas, Menlo, 'Courier New', monospace !important;
    }

    /* 4. Icon fonts: ALWAYS declared last so glyphs survive ------------
       (covers LTR and RTL; RTL-prefixed selectors out-specify the
       `html[dir="rtl"] *` rule above) ---------------------------------- */
    .fa, .fa:before, .fa:after,
    .fas, .fas:before, .far, .far:before,
    .fa-solid, .fa-solid:before,
    .fa-regular, .fa-regular:before,
    .fa-light, .fa-light:before,
    .fab, .fab:before,
    .fa-brands, .fa-brands:before,
    [class^="fa-"], [class*=" fa-"],
    [class^="fas "], [class*=" fas "],
    [class^="far "], [class*=" far "],
    [class^="fab "], [class*=" fab "],
    html[dir="rtl"] .fa, html[dir="rtl"] .fa:before,
    html[dir="rtl"] .fas, html[dir="rtl"] .fab,
    html[dir="rtl"] .fa-solid, html[dir="rtl"] .fa-brands,
    html[dir="rtl"] [class^="fa-"], html[dir="rtl"] [class*=" fa-"],
    html[dir="rtl"] [class^="fab "], html[dir="rtl"] [class*=" fab "] {
        font-family: 'Font Awesome 5 Free', 'Font Awesome 5 Brands', 'FontAwesome', sans-serif !important;
    }

    .glyphicon, .glyphicon:before, .glyphicon:after,
    [class^="glyphicon-"], [class*=" glyphicon-"],
    html[dir="rtl"] .glyphicon, html[dir="rtl"] .glyphicon:before,
    html[dir="rtl"] [class^="glyphicon-"], html[dir="rtl"] [class*=" glyphicon-"] {
        font-family: 'Glyphicons Halflings', sans-serif !important;
    }

    .ion, .ion:before, .ion:after,
    [class^="ion-"], [class*=" ion-"],
    html[dir="rtl"] .ion, html[dir="rtl"] .ion:before,
    html[dir="rtl"] [class^="ion-"], html[dir="rtl"] [class*=" ion-"] {
        font-family: Ionicons, sans-serif !important;
    }
}
