/* Phase 24 bilingual interface: layout direction and accessible language selection. */
.language-switcher{display:flex;align-items:center;gap:.35rem;flex:0 0 auto;margin:0;min-width:0}
.language-switcher select{width:auto!important;max-width:130px;min-width:96px;min-height:38px;padding:7px 30px 7px 10px;border:1px solid var(--line-strong,#ccd8e6);border-radius:11px;font-size:13px;font-weight:700;line-height:1.3;color:var(--ink,#172c49);background:var(--surface,#fff);cursor:pointer}
.language-switcher select:focus-visible{outline:3px solid #65b8f1;outline-offset:2px}
.language-switcher button{min-height:38px;padding:8px 10px;border:1px solid var(--line-strong,#ccd8e6);border-radius:9px;background:var(--surface,#fff);color:var(--ink,#172c49);cursor:pointer}
body.auth>.language-switcher,body.error-page>.language-switcher,body.pending>.language-switcher{position:fixed;inset-block-start:14px;inset-inline-end:14px;z-index:120}
html[dir="rtl"]{text-align:start}
html[lang="ar"] body{font-family:Tahoma,"Noto Sans Arabic","Noto Naskh Arabic","Segoe UI",system-ui,sans-serif;font-size:14px;line-height:1.75;letter-spacing:normal}
html[lang="ar"] :is(h1,h2,h3,h4,.brand-copy strong,.page-head h1,.eyebrow,.nav-section span,.stat>span){letter-spacing:normal!important}
html[dir="rtl"] :is(th,td,.stat,.card,.page-head,.topbar-context,.workspace-switcher,.side-nav,.filter-panel,.form,.footer,.hero-copy,.section-head){text-align:start}
html[dir="rtl"] .shell{direction:rtl}
html[dir="rtl"] .sidebar{box-shadow:-6px 0 22px rgba(12,32,55,.1)}
html[dir="rtl"] .side-nav>a.active{box-shadow:inset -3px 0 0 #76c0f0}
html[dir="rtl"] .topbar-search kbd{margin-inline-start:auto;margin-inline-end:0}
html[dir="rtl"] .topbar-profile{padding-inline-start:8px;padding-inline-end:0}
html[dir="rtl"] .topbar-icon b{left:-5px;right:auto}
html[dir="rtl"] .stat:before{right:0;left:auto}
html[dir="rtl"] .stat:after{left:-58px;right:auto}
html[dir="rtl"] :is(input[type=email],input[type=url],input[type=tel],input[type=number],input[type=datetime-local],input[type=date],input[name=canonical_url],.mono,code,pre,.url-value){direction:ltr;text-align:left;unicode-bidi:isolate}
html[dir="rtl"] :is(.platform-badge,.brand-copy strong,.brand,.logo-text,.currency-value,.numeric-value){unicode-bidi:isolate}
html[dir="rtl"] input::placeholder{text-align:start}
html[dir="rtl"] .brand-copy strong,html[dir="rtl"] .logo-text{direction:ltr;text-align:left;display:inline-block}
html[dir="rtl"] .language-switcher select{padding-inline:10px 28px}
html[dir="rtl"] .skip-link{right:14px;left:auto}
html[dir="rtl"] .cms-arabic-fields :is(input,textarea){direction:rtl;text-align:right}
.cms-arabic-fields{margin-top:18px;padding:18px;border:1px solid var(--line,#e2e8f1);border-radius:13px;background:var(--surface-2,#f8fafd)}
.cms-arabic-fields h3{margin:0 0 12px;font-size:15px}
.cms-arabic-note{max-width:800px}
/* Favor stable native horizontal table scrolling over clipping on Arabic phones. */
.table-wrap{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
@media(max-width:1024px){
 html[dir="rtl"] .sidebar{left:auto;right:0;transform:translateX(105%);box-shadow:-25px 0 70px rgba(2,11,29,.28)}
 html[dir="rtl"] .sidebar.open{transform:translateX(0)}
}
@media(max-width:700px){
 .language-switcher select{min-width:87px;max-width:105px;min-height:35px;font-size:12px;padding:6px 24px 6px 7px}
 .topbar-actions{gap:6px!important}
 .topbar-context strong{max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .cms-arabic-fields{padding:12px}
}
@media(max-width:450px){.app-topbar .topbar-profile{display:none}.topbar-search{display:none!important}}
/* Public site */
.site-header .language-switcher select{background:#fff;color:#10213d;border-color:#d6e0ed}
html[dir="rtl"] .hero,html[dir="rtl"] .section,html[dir="rtl"] .closing,html[dir="rtl"] .footer,html[dir="rtl"] .site-header{direction:rtl}
html[dir="rtl"] .hero-copy,html[dir="rtl"] .workspace-text,html[dir="rtl"] .workflow-intro,html[dir="rtl"] .closing-inner{text-align:right}
html[dir="rtl"] .preview-window,html[dir="rtl"] .dashboard-scene{direction:ltr}
html[dir="rtl"] .preview-window .preview-main{direction:rtl;text-align:right}
html[dir="rtl"] .step{direction:rtl}
html[dir="rtl"] .platform-band,html[dir="rtl"] .band-inner{text-align:right}
@media(max-width:900px){.site-header .language-switcher select{max-width:99px}}
@media(max-width:540px){.site-header .nav-actions{gap:8px}.site-header .login-link{display:none}}
.language-switcher .sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important}
