/* Site-wide styles that are not tied to one component. */

/* ---------- Right-to-left languages (Arabic) ----------
   LanguageState sets <html lang=".." dir="rtl"> when such a language is chosen. */

/* Arabic-script font (Roboto has no Arabic letters); Latin text keeps Roboto. */
html[dir="rtl"] {
    --cw-rtl-font: "Noto Sans Arabic", "Roboto", "Segoe UI", Tahoma, Arial, sans-serif;
    --mud-typography-default-family: var(--cw-rtl-font);
    --mud-typography-h1-family: var(--cw-rtl-font);
    --mud-typography-h2-family: var(--cw-rtl-font);
    --mud-typography-h3-family: var(--cw-rtl-font);
    --mud-typography-h4-family: var(--cw-rtl-font);
    --mud-typography-h5-family: var(--cw-rtl-font);
    --mud-typography-h6-family: var(--cw-rtl-font);
    --mud-typography-subtitle1-family: var(--cw-rtl-font);
    --mud-typography-subtitle2-family: var(--cw-rtl-font);
    --mud-typography-body1-family: var(--cw-rtl-font);
    --mud-typography-body2-family: var(--cw-rtl-font);
    --mud-typography-button-family: var(--cw-rtl-font);
    --mud-typography-caption-family: var(--cw-rtl-font);
    --mud-typography-overline-family: var(--cw-rtl-font);
}

html[dir="rtl"] body,
html[dir="rtl"] button,
html[dir="rtl"] input,
html[dir="rtl"] textarea {
    font-family: var(--cw-rtl-font);
}

/* Letter-spacing pulls Arabic letters apart (they are joined), so it is switched off for RTL text. */
html[dir="rtl"] * {
    letter-spacing: normal !important;
}
