/* "Show numbers in Arabic" (Site Settings). When it is on and the screen is Arabic or Kurdish, <body data-cs-digits="ar">
   puts a tiny font first in the font list that holds only the ten digits, drawn as ٠١٢٣٤٥٦٧٨٩ (unicode-range keeps every
   other character on the normal font). The text itself is untouched: stored, posted and copied numbers stay 0-9, so
   search, sums and reports are not affected and switching back needs no conversion.
   --cs-font is the font list of the place an element sits in (page, or the chosen contract font on the paper);
   .cs-latin puts it back for things that must keep 0-9: chassis numbers, email addresses, web addresses, user names.
   Loaded by every page shell (_Layout, _PublicLayout, _Bare, Sales/Receipt). Typing is handled in js/app.js. */
@font-face { font-family: "CS Arabic Digits"; font-style: normal; font-weight: 400; font-display: swap; src: url("../lib/fonts/digits-400.woff2") format("woff2"); unicode-range: U+0030-0039; }
@font-face { font-family: "CS Arabic Digits"; font-style: normal; font-weight: 700; font-display: swap; src: url("../lib/fonts/digits-700.woff2") format("woff2"); unicode-range: U+0030-0039; }

:root { --cs-font: "Segoe UI", Tahoma, "Noto Sans Arabic", system-ui, sans-serif; }

body[data-cs-digits="ar"] {
    font-family: "CS Arabic Digits", var(--cs-font);
    --bs-body-font-family: "CS Arabic Digits", var(--cs-font);
    --bs-font-sans-serif: "CS Arabic Digits", var(--cs-font);
}
/* The printed contract and receipt set their own font list (print-contract.css, contract-fonts.css) */
body[data-cs-digits="ar"] .cs-print { font-family: "CS Arabic Digits", var(--cs-font); }
body[data-cs-digits="ar"] .cs-print .paper { font-family: var(--cs-digit-font, "CS Arabic Digits"), var(--cs-font); }

.cs-latin, input[type="email"], input[type="url"], input[type="password"], input[autocomplete="username"], a[href^="mailto:"] { font-family: var(--cs-font); }
