/* ==========================================================================
   Gulf Calculator — RTL overrides
   Loaded only on Arabic pages, after base.css, on <html lang="ar" dir="rtl">.
   Flexbox/grid in base.css already mirror automatically under dir="rtl";
   this file only fixes the handful of things that don't mirror themselves.
   ========================================================================== */

/* Letter-spacing breaks Arabic letter connections — base.css tracks
   .eyebrow and uppercase labels for Latin type; undo that here. */
[dir="rtl"] .eyebrow,
[dir="rtl"] .field label,
[dir="rtl"] .result .label {
  letter-spacing: 0;
  text-transform: none;
}

/* Numerals and formulas stay LTR even inside RTL flow, but right-align
   so they still sit on the same edge as the RTL label above them. */
[dir="rtl"] .num,
[dir="rtl"] input[type="number"],
[dir="rtl"] input[inputmode="decimal"],
[dir="rtl"] input[inputmode="numeric"] {
  direction: ltr;
  text-align: right;
}

[dir="rtl"] .result .breakdown div {
  direction: rtl;
}

[dir="rtl"] .result .breakdown div .num {
  direction: ltr;
}
