/* =====================================================================
   i18n-rtl.css — right-to-left layout overrides, active only when the
   Arabic toggle adds `dir="rtl"` / `body.rtl`. Kept additive so LTR is
   untouched. Loaded last in index.html so it can override base styles.
   ===================================================================== */

html[dir="rtl"] body,
body.rtl {
  direction: rtl;
  text-align: right;
}

/* Keep numeric / latin-heavy inputs and code readable left-to-right. */
body.rtl input[type="number"],
body.rtl input[type="email"],
body.rtl input[type="password"],
body.rtl input[type="url"],
body.rtl input[type="tel"],
body.rtl input[type="date"],
body.rtl code,
body.rtl kbd,
body.rtl pre,
body.rtl .mono,
body.rtl [data-no-translate] {
  direction: ltr;
  text-align: left;
}

/* Header / nav stay visually anchored but mirror their flow. */
body.rtl header,
body.rtl .header-right,
body.rtl nav.tabs {
  flex-direction: row-reverse;
}

/* Tables: flip header/cell alignment. */
body.rtl table th,
body.rtl table td {
  text-align: right;
}

/* Common Arabic-friendly font stack; falls back to existing fonts. */
body.rtl,
body.rtl input,
body.rtl select,
body.rtl button,
body.rtl textarea {
  font-family: "Cairo", "Tajawal", "Segoe UI", "Instrument Sans", system-ui, sans-serif;
}
