/* ─── I18N (shared) ─────────────────────────────────────────────────────────
   Arabic type + RTL helpers for the operator and staff apps. Pair with
   src/shared/i18n.js, which sets <html lang dir>.
   Needs the Cairo webfont: see the <link> lines in REPORT-B.md (Task 53). */

html:lang(ar),
html:lang(ar) body,
html:lang(ar) button,
html:lang(ar) input,
html:lang(ar) select,
html:lang(ar) textarea {
  font-family: 'Cairo', 'Noto Sans Arabic', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}

/* Arabic sits taller than Latin at the same size. */
html:lang(ar) body { line-height: 1.6; }

/* Refs, record codes, plates, phone numbers, hashes: always left-to-right,
   isolated so they don't reorder the Arabic around them. */
.i18n-ltr,
html[dir="rtl"] code,
html[dir="rtl"] kbd,
html[dir="rtl"] .mono {
  direction: ltr;
  unicode-bidi: isolate;
}
html[dir="rtl"] input[type="tel"],
html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="url"] {
  direction: ltr;
  text-align: end;
}

/* Directional icons (arrows, chevrons, "back") mirror in RTL. */
html[dir="rtl"] .i18n-flip { transform: scaleX(-1); }

/* Logical alignment helpers. */
.i18n-start { text-align: start; }
.i18n-end   { text-align: end; }

/* Arabic is never letter-spaced or upper-cased. */
html:lang(ar) * { letter-spacing: normal !important; }
html:lang(ar) .i18n-caps,
html:lang(ar) [style*="uppercase"] { text-transform: none !important; }
