/* The screen in other languages. In Arabic the page keeps its left-to-right layout, as the terminal online does
   (html[data-ltr]: columns, prices, the chart and its scale where traders expect them); what reads right to left is
   the text: each sentence and each label takes the direction of its own words (its full stop, its figures and its
   tickers sit where an Arabic reader expects them), a figure beside an Arabic word stays on its side of the layout
   (isolated), and Arabic letters are never spaced apart (they join). */
:root[lang="ar"] * { letter-spacing: 0 !important; }

.banner span, .toast span, .tk-msg, .tk-hint, .tk-check .tk-ic > b, .tk-check > span, .chart-flag, .pstate-text,
.chart-sub, .bk-state, .empty, .empty p, .fd-cap, .fd-line, .fd-note, .ci-note, .pal-empty, .draw-hint, .na-text,
.visit-text, .tk-stopped-x, .tk-stopped-n, .tk-stopped-t span, .stopbar-t span, .na-card h1, .na-card h2 { unicode-bidi: plaintext; }

/* inline words and keys only: a block label keeps the alignment of the layout (a label and its figure side by side) */
:root[lang="ar"] .term :is(span, b, strong, small, a, button:not(.tab)) { unicode-bidi: plaintext; }
.num, .tab .n { unicode-bidi: isolate; }

/* a short phrase made of a word and a live figure (next funding in…, the hourly rate, the goal of the account): in
   Arabic the phrase runs right to left as a whole, the figure inside it stays left to right */
:root[lang="ar"] :is(.fd-cap, .fd-rate, .g-goal) { direction: rtl; unicode-bidi: isolate; }
:root[lang="ar"] :is(.fd-cap, .fd-rate, .g-goal) .num { direction: ltr; unicode-bidi: isolate; }

/* the value of a rule (9% · $900, or 3% · $300 · a word): in Arabic every value runs right to left as a whole, with
   or without a word in it, so the percentages stand under one another down the list */
:root[lang="ar"] .term .g-rules b { direction: rtl; unicode-bidi: isolate; }

/* the leverage chooser, a dialog of its own: in Arabic it reads right to left as a whole, its figures left to right */
:root[lang="ar"] .levbox { direction: rtl; }
:root[lang="ar"] .levbox .num { direction: ltr; unicode-bidi: isolate; }
:root[lang="ar"] .levbox .lv-why { unicode-bidi: plaintext; }
