/* SkyWay Express — Tajawal for Arabic UI only (v1.26.71)
 * Arabic glyphs use the original Tajawal font via Google Fonts' public font CDN.
 * English pages, Latin codes, logistics labels, icon fonts, print/barcodes remain untouched.
 * Font license: SIL OFL 1.1 (https://github.com/google/fonts/tree/main/ofl/tajawal).
 * No JavaScript, tracking or language auto-detection.
 */
@font-face {
  font-family: 'SkyWay Tajawal Arabic';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('https://fonts.gstatic.com/s/tajawal/v8/Iura6YBj_oCad4k1nzSBC45I.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: 'SkyWay Tajawal Arabic';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('https://fonts.gstatic.com/s/tajawal/v8/Iurf6YBj_oCad4k1l8KiHrRpiYlJ.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: 'SkyWay Tajawal Arabic';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('https://fonts.gstatic.com/s/tajawal/v8/Iurf6YBj_oCad4k1l4qkHrRpiYlJ.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFF;
}

/* The locale is an explicit visitor choice. Never rely on browser/device locale. */
html:lang(ar) body,
html[lang="ar"] body,
html[dir="rtl"][lang="ar"] body,
body[lang="ar"],
body.skyway-arabic-ui {
  font-family: 'SkyWay Tajawal Arabic', 'Segoe UI', Tahoma, Arial, sans-serif !important;
}

/* Legacy page styles specify separate fonts for cards, headings, tables and inputs. */
html:lang(ar) body :is(
  h1,h2,h3,h4,h5,h6,p,small,strong,b,em,blockquote,ul,ol,li,dl,dt,dd,
  a,button,input,textarea,select,option,optgroup,label,legend,
  th,td,caption,summary,details,article,aside,main,section,
  .btn,.form-control,.form-select,.input-group-text,.nav-link,.dropdown-item,
  .card,.modal,.modal-title,.modal-body,.alert,.badge,.table,.toast,.tooltip,.popover,
  .swal2-popup,.swal2-title,.swal2-html-container,.select2-container,
  .dataTables_wrapper,.pagination,.page-link,.breadcrumb,.accordion,
  .skyway-content,.skyway-navbar,.skyway-admin-topbar
):not(i):not(svg):not(code):not(pre):not(kbd):not(samp):not(.fa):not(.fas):not(.far):not(.fab):not(.fal):not(.fad):not(.zmdi):not(.material-icons):not(.glyphicon):not(.ion):not(.ti):not(.typcn):not(.mdi):not([data-font-icon]) {
  font-family: 'SkyWay Tajawal Arabic', 'Segoe UI', Tahoma, Arial, sans-serif !important;
}

/* Apply only to explicitly Arabic content inside otherwise English-only admin pages. */
:where([lang="ar"],[dir="rtl"]) :is(p,span,a,button,input,textarea,select,label,th,td,li,h1,h2,h3,h4,h5,h6):not(i):not(.fa):not(.fas):not(.far):not(.fab):not(.zmdi):not(.material-icons):not(.glyphicon),
:where([lang="ar"][dir="rtl"],.skyway-admin-arabic-ui) {
  font-family: 'SkyWay Tajawal Arabic', 'Segoe UI', Tahoma, Arial, sans-serif !important;
}

/* Icon fonts are intentionally NOT overridden: their own classes specify
 * FontAwesome, Material Icons, ZMDI, etc. Keep technical values monospaced. */
html:lang(ar) :is(
  code,pre,kbd,samp,.barcode,.barcode-font,
  .tracking-number,.tracking-code,.serial-number,.shipment-reference,
  .shipping-label-code,.sku,.awb-number,[data-barcode]
) {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
}

/* Arabic-labelled widgets inside an English document also need a font on
 * their root node, not just their children (e.g. <span lang="ar">). */
:where([lang="ar"],[dir="rtl"]):not(i):not(svg):not(.fa):not(.fas):not(.far):not(.fab):not(.zmdi):not(.material-icons):not(.glyphicon) {
  font-family: 'SkyWay Tajawal Arabic', 'Segoe UI', Tahoma, Arial, sans-serif !important;
}

/* Language cue remains narrow and recognisable regardless of UI font. */
html:lang(ar) .skyway-language-cue,
html:lang(ar) .skyway-standalone-lang-code,
html:lang(ar) .skyway-language-cue [lang="ar"],
html:lang(ar) .skyway-standalone-lang-code [lang="ar"] {
  font-family: system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif !important;
}

/* Print formats (barcodes, manifests and official label templates) use their own fonts. */
@media print {
  html:lang(ar) :is(.print-label,.shipping-label,.barcode-label,.label-preview,.manifest-print,.thermal-label) {
    font-family: Arial, sans-serif !important;
  }
}
