/* RTL mirror layer for Hebrew, Arabic and Urdu pages (linked only from them, after site.css).
   site.css was written with physical left/right; every rule here is scoped to html[dir="rtl"] and flips one of them.
   No inline styles anywhere (CSP), so everything the markup needs lives here. */

/* Arabic and Urdu letters join: letter-spacing and upper-casing must be off (the Latin brand keeps its own look) */
html[dir="rtl"] *:not(.brand):not(.brand *) { letter-spacing: 0; text-transform: none; }
html[dir="rtl"] body { text-align: right; }

/* skip link */
html[dir="rtl"] .skip { left: auto; right: -999px; }
html[dir="rtl"] .skip:focus { left: auto; right: 8px; }

/* header: logo on the right, overflowing the bar; nav + button flow to the left */
html[dir="rtl"] .top__in { padding-left: 0; padding-right: 146px; }
html[dir="rtl"] .brand img { left: auto; right: 14px; }
html[dir="rtl"] .nav { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .top .btn--sm { margin-left: 0; margin-right: 8px; }
html[dir="rtl"] .navbtn { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .brand { direction: ltr; }

/* hero */
html[dir="rtl"] .btn--xl { text-align: right; }
html[dir="rtl"] .facts b { margin-right: 0; margin-left: 4px; }
html[dir="rtl"] .tip__box { left: auto; right: 0; text-align: right; }
html[dir="rtl"] .console, html[dir="rtl"] .console__body, html[dir="rtl"] .cmd, html[dir="rtl"] .hash code { direction: ltr; text-align: left; unicode-bidi: isolate; }
html[dir="rtl"] .console__bar { direction: ltr; }

/* cards, steps, tables, faq */
html[dir="rtl"] .card { border-left-width: 1px; border-right: 3px solid var(--red); }
html[dir="rtl"] .steps li { padding: 12px 60px 12px 14px; }
html[dir="rtl"] .steps li::before { left: auto; right: 14px; }
html[dir="rtl"] .tips li { padding: 12px 36px 12px 14px; }
html[dir="rtl"] .tips li::before { left: auto; right: 15px; }
html[dir="rtl"] .faq details ol { padding-left: 0; padding-right: 22px; }
html[dir="rtl"] th, html[dir="rtl"] td { text-align: right; }
html[dir="rtl"] .cmds td:first-child, html[dir="rtl"] .cmds code { direction: ltr; unicode-bidi: isolate; }
html[dir="rtl"] .cmds td:first-child { text-align: left; }
html[dir="rtl"] .faq summary { padding: 15px 0 15px 32px; }
html[dir="rtl"] .faq summary::after { right: auto; left: 4px; }
html[dir="rtl"] .hash { padding: 8px 14px 8px 8px; }
html[dir="rtl"] .foot__guides b { margin-right: 0; margin-left: 6px; }
html[dir="rtl"] code, html[dir="rtl"] kbd { unicode-bidi: isolate; }

/* phone */
@media (max-width: 760px) {
  html[dir="rtl"] .top__in { padding: 8px 92px 8px 8px; padding-right: calc(min(86px, 21vw) + 16px); padding-left: 8px; }
  html[dir="rtl"] .brand img { left: auto; right: 8px; }
  html[dir="rtl"] .top .btn--sm { margin-left: 0; margin-right: auto; }
  html[dir="rtl"] .top.is-open .nav a { border-left: 0; text-align: right; }
}

/* No rule for the "next" arrows (.gcard i, .vcard i, phone .gcard, &rsaquo; buttons): U+203A is bidi-mirrored, so in RTL
   text Chrome already draws it pointing left. Swapping it for U+2039 made it point right (checked in Chrome 2026-11-17). */

/* .vpill is inline-flex in site.css: every <bdi> became its own flex item and the spaces around it vanished
   ("إصداراتSteam"). Plain inline text flow keeps the spaces; padding keeps the 44px tap height. */
html[dir="rtl"] .vpill { display: inline-block; padding-top: 11px; padding-bottom: 11px; line-height: 1.4; }

/* "Non-Steam" broke at its hyphen in the narrow h2 and table cells */
html[dir="rtl"] #steam-vs-non-steam .panel__head .hl, html[dir="rtl"] .vs bdi { white-space: nowrap; }

/* English line in the closing banner: keep its full stop at the end, not on the left of "Fire" */
html[dir="rtl"] .final h2 span { direction: ltr; unicode-bidi: isolate; }

/* footer link lists: adjacent Latin links merged into one LTR run and read backwards; isolate each link */
html[dir="rtl"] .foot__guides a, html[dir="rtl"] .foot__lang a { unicode-bidi: isolate; }

/* numbers with units keep their own direction inside RTL sentences */
html[dir="rtl"] [data-file="size"], html[dir="rtl"] bdi { unicode-bidi: isolate; }
html[dir="rtl"] [data-file="size"] { direction: ltr; }
