/* Right-to-left layout for Arabic pages (/ar/…). Loaded only on pages with dir="rtl" (scripts/build_i18n.py adds the link),
   so English and the other languages never download it. With dir="rtl" the browser already mirrors text alignment, flex rows,
   grids and list indents (padding-inline-start); this file only flips the rules that use physical left/right. */

/* Arabic letters join: any letter-spacing breaks the joins, so turn it off everywhere. Naskh needs more line height. */
[dir="rtl"], [dir="rtl"] *{letter-spacing:normal!important}
[dir="rtl"] body{line-height:1.8}
[dir="rtl"] :is(h1,h2,h3){line-height:1.45}
[dir="rtl"] :is(.logo,.tag,.stats span,.eyebrow,.yt-or){text-transform:none}
/* Code, file names, URLs, numbers with units and the language menu stay left-to-right inside the RTL page. */
[dir="rtl"] :is(code,kbd,pre,input[type=url],input[type=email],input[type=number],.term-path,.mono){direction:ltr;unicode-bidi:isolate}
[dir="rtl"] .lang-menu a:not([lang="ar"]){direction:ltr;text-align:right}

/* style.css */
[dir="rtl"] .b1{left:auto;right:10%}
[dir="rtl"] .b2{right:auto;left:8%}
[dir="rtl"] .b3{right:auto;left:14%}
[dir="rtl"] .hero-art .tag{left:auto;right:24px}
[dir="rtl"] .pbadge{left:auto;right:12px}
[dir="rtl"] .cart-count{right:auto;left:2px}
[dir="rtl"] :is(.was,.btn small,.chip .n,.course-price s,.ch-list small){margin-left:0;margin-right:6px}
[dir="rtl"] :is(.info details ul,.legal ul,.steps,.src){padding-left:0;padding-right:22px}
[dir="rtl"] .drawer{right:auto;left:0;transform:translateX(-100%)}
[dir="rtl"] .term-bar i:nth-child(3){margin-right:0;margin-left:10px}
[dir="rtl"] .float-pill{padding:10px 10px 10px 12px}
@media (max-width:600px){[dir="rtl"] .plat-sub{margin-right:0}}
[dir="rtl"] .tut-thumb::before,[dir="rtl"] .watch::before{right:auto;left:-20%}
[dir="rtl"] .opening{border-left:0;border-right:4px solid var(--accent-line);padding:4px 16px 4px 0}
[dir="rtl"] .worked-example{border-left:0;border-right:3px solid var(--accent-line);padding:2px 16px 2px 0}
[dir="rtl"] :is(table.check th,.tool-table th,.tool-table td){text-align:right}
[dir="rtl"] .tut-thumb .play{right:auto;left:14px}
[dir="rtl"] .vid-thumb .play{left:auto;right:12px}
[dir="rtl"] .hook-list{margin-left:0;margin-right:20px}
[dir="rtl"] .tb-time{margin-left:0;margin-right:auto}
[dir="rtl"] .tb-bar .tb-fill{transform-origin:right}
[dir="rtl"] :is(.speed label input,.presets label input){left:auto;right:12px}
[dir="rtl"] :is(.speed label,.presets label){padding-left:12px;padding-right:38px}
[dir="rtl"] .lang-menu{right:auto;left:0}
[dir="rtl"] .lang-suggest:not([dir="ltr"]){padding:10px 16px 10px 44px}
[dir="rtl"] .lang-suggest:not([dir="ltr"]) .ls-x{right:auto;left:10px}
[dir="rtl"] :is(.yt-list small,.cc-list small,.yt-or){padding-left:0;padding-right:22px}

/* hub.css */
[dir="rtl"] .nav-tools summary::after{margin-left:0;margin-right:4px}
[dir="rtl"] .nav-tools-menu{left:auto;right:-12px}
[dir="rtl"] .hub-search .hs-ic{left:auto;right:16px}
[dir="rtl"] .hub-search input{padding:16px 50px 16px 16px}
[dir="rtl"] .ns-link.ns-carry::after{content:"←"}
[dir="rtl"] .our-note{border-left:1px solid var(--brand-200);border-right:4px solid var(--saffron)}

/* Arrows written in the text ("→") point the reading way. Icons that mean "forward" are flipped. */
[dir="rtl"] :is(.ic-arrow,.arrow,[data-icon="arrow-right"],[data-icon="chevron-right"]) svg{transform:scaleX(-1)}
