/* Right-to-left pages (T-226). base.html loads this only when the page language registered rtl=True
   (monitor/i18n.py) and sets <html dir="rtl">, which already mirrors flex rows (header, site nav) and inline text.
   This file flips what app.css / site.css pin to the left or right, and keeps numbers and charts LTR.
   Wrap other numbers in dir="ltr" (or <bdi>) in the page templates. */

/* Text and table alignment: start/end instead of left/right. */
[dir="rtl"] body { text-align: right; }
[dir="rtl"] th, [dir="rtl"] .dtable th, [dir="rtl"] caption { text-align: right; }
[dir="rtl"] .dtable .r, [dir="rtl"] td.r, [dir="rtl"] th.r { text-align: left; }
[dir="rtl"] .sc-credit { text-align: left; }

/* Margins that separate things in reading order. */
[dir="rtl"] .foothead { margin-right: 0; margin-left: 6px; }
[dir="rtl"] .sc-ctl { margin-left: 0; margin-right: auto; }
[dir="rtl"] .sc .panel-h .sc-note { margin-right: 0; margin-left: auto; }
[dir="rtl"] .sc-gapkey i { margin-right: 0; margin-left: 5px; }

/* Nav order: flex rows follow dir; the mobile side-scrolling nav starts from the right edge. */
[dir="rtl"] .sitenav, [dir="rtl"] .footnav { direction: rtl; }

/* Numbers, prices, addresses and charts stay left-to-right inside RTL text. */
[dir="rtl"] .num, [dir="rtl"] .mono, [dir="rtl"] .addr, [dir="rtl"] .feed td,
[dir="rtl"] [dir="ltr"] { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .chart, [dir="rtl"] .chart-tip, [dir="rtl"] canvas, [dir="rtl"] svg { direction: ltr; }
[dir="rtl"] .dtable td.r, [dir="rtl"] .dtable td.num { direction: ltr; unicode-bidi: isolate; text-align: left; }
