/* Arabic / RTL support for the public website (see js/i18n.js — the staff
   workspaces stay English/LTR always, so every rule here is scoped to
   [dir="rtl"], which the workspace shell never sets on <html>).

   Flexbox rows already reverse for free once direction:rtl is set (CSS
   flexbox's "row" is relative to the writing mode per spec), so most of
   the site's layout — topbar, cards, button icon+label pairs, grids —
   needs no extra rule here. This file only covers what doesn't flip on
   its own: physical left/right positioning, a handful of explicit
   text-align:left resets on public-facing components, and the Arabic
   typeface. */

html[dir="rtl"] body {
  direction: rtl;
  font-family: 'Cairo', var(--font-body);
}
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3, html[dir="rtl"] h4,
html[dir="rtl"] .serif, html[dir="rtl"] .hero-tagline {
  font-family: 'Cairo', var(--font-display);
}
html[dir="rtl"] input, html[dir="rtl"] textarea, html[dir="rtl"] select, html[dir="rtl"] button {
  font-family: 'Cairo', var(--font-body);
}
/* Arabic numerals/dates still read left-to-right inside RTL prose. */
html[dir="rtl"] .mono, html[dir="rtl"] time { direction: ltr; unicode-bidi: isolate; }

/* Public text-align:left resets that need to flip so RTL reads correctly. */
html[dir="rtl"] .chapter-nav button,
html[dir="rtl"] .chapter-flipped .chapter-heading,
html[dir="rtl"] .doctor-card,
html[dir="rtl"] .public-site .doctor-tile {
  text-align: right;
}

/* Physical left/right positioning that direction:rtl does not touch. */
html[dir="rtl"] .cart-count { right: auto; left: -6px; }
html[dir="rtl"] .split-badge { left: auto; right: 20px; }
html[dir="rtl"] .story-mark { right: auto; }

/* Form fields and selects keep their icons/carets on the correct side. */
html[dir="rtl"] .field label { text-align: right; }

/* Arrow glyphs (→ / ←) are chosen per-string in each page's Arabic copy
   (see e.g. pages/home.js's `arrow`/`exploreServices` strings) rather than
   mirrored here, so a literal "&larr;"/"&rarr;" in the translated text
   always points the way the sentence actually reads. */
