/* Payam RTL + Arabic-script typography (Gulf-first). Source: Linux node 2026-10-12.
   Self-hosts Vazirmatn (SIL OFL 1.1) subset to Arabic ranges only (~19KB/weight).
   unicode-range limits it to Arabic script, so Latin is untouched (Inter still wins Latin).
   Vazirmatn must come BEFORE Inter's local fallbacks so Windows "Segoe UI" doesn't win the
   Arabic fallback race and give OS-dependent typography. Load AFTER bundle.css. */

@font-face {
  font-family: "Vazirmatn";
  src: url("/fonts/vazirmatn-regular-arabic.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-089F, U+08A0-08FF,
                 U+FB50-FDFF, U+FE70-FEFF, U+200C-200F, U+061B, U+061F, U+0640;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("/fonts/vazirmatn-bold-arabic.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-089F, U+08A0-08FF,
                 U+FB50-FDFF, U+FE70-FEFF, U+200C-200F, U+061B, U+061F, U+0640;
}

:root {
  --cpd-font-family-sans: "Vazirmatn", Inter, "Inter Fallback: Helvetica Neue",
    "Inter Fallback: Segoe UI", "Inter Fallback: Roboto", "Inter Fallback: Ubuntu",
    "Inter Fallback: Fira Sans", "Inter Fallback: Noto Sans", "Inter Fallback: Arial",
    Helvetica, Arial, sans-serif;
}

/* Arabic script has a taller x-height than Inter; give RTL more line-height. */
[dir="rtl"] {
  line-height: 1.75;
}

/* Persian/Arabic digits must never be forced into Latin tabular forms. */
[dir="rtl"] .mx_EventTile_body,
[dir="rtl"] .mx_BasicMessageComposer_input {
  font-variant-numeric: normal;
  font-feature-settings: "tnum" 0;
}
