/* Scoped Arabic layout overrides. Loaded on every portal; nothing changes
   unless <html dir="rtl"> is set by the bxm_lang cookie. */
.lang-toggle{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:44px;padding:6px 11px;border-radius:999px;
  font-size:11px;font-weight:800;line-height:1;text-decoration:none;
  background:rgba(56,189,248,.12);border:1px solid rgba(56,189,248,.32);
  color:#7dd3fc;
}
.lang-toggle:hover{text-decoration:none;filter:brightness(1.12)}

html[dir="rtl"] body,
html[dir="rtl"] .wrap,
html[dir="rtl"] .card,
html[dir="rtl"] .panel{text-align:right}

/* user.css hard-codes body direction; beat it with higher specificity. */
html[dir="rtl"] body{direction:rtl}
html[dir="rtl"] .wrap input{direction:auto;text-align:start}

/* All content right-aligned in RTL (Arabic), including technical values. */
html[dir="rtl"] .mono,
html[dir="rtl"] code,
html[dir="rtl"] .addr,
html[dir="rtl"] .exact,
html[dir="rtl"] .timer,
html[dir="rtl"] .code-block,
html[dir="rtl"] .kv span:last-child,
html[dir="rtl"] th.mono,
html[dir="rtl"] td.mono{direction:rtl;text-align:right;unicode-bidi:embed}

/* Public landing page. */
html[dir="rtl"] .version{margin-left:0;margin-right:auto}
html[dir="rtl"] .intro h1{letter-spacing:0}
html[dir="rtl"] .card:after{right:auto;left:-90px}
html[dir="rtl"] .divider{background:linear-gradient(270deg,#263a5c,transparent)}
html[dir="rtl"] .arrow{display:inline-block;transform:scaleX(-1)}

/* User + reseller portals. */
html[dir="rtl"] .flag{margin-right:0;margin-left:5px}
html[dir="rtl"] .flag-slot .flag{margin-left:0}
html[dir="rtl"] .country-item .muted{margin-left:0;margin-right:auto}
html[dir="rtl"] .country-item .flag{margin-right:0;margin-left:2px}
html[dir="rtl"] .country-name{margin-left:0;margin-right:3px}
html[dir="rtl"] .country-form{margin-left:auto;margin-right:0}
html[dir="rtl"] .country-form label{text-align:right}
html[dir="rtl"] th,
html[dir="rtl"] td{text-align:right}
html[dir="rtl"] .contact-line .mono{text-align:left}
html[dir="rtl"] .kv span:last-child{text-align:left}
html[dir="rtl"] .hero-badges{justify-content:flex-start}
html[dir="rtl"] .lookup-head .pill{white-space:nowrap}

/* Admin panel: move the whole sidebar to the right. */
html[dir="rtl"] .sidebar{
  left:auto;right:0;
  border-right:0;border-left:1px solid var(--line);
}
html[dir="rtl"] .main{margin-left:0;margin-right:248px}
html[dir="rtl"] .nav-item{border-left:0;border-right:3px solid transparent}
html[dir="rtl"] .nav-item.active{
  background:linear-gradient(270deg,rgba(59,130,246,.05),rgba(59,130,246,.25));
  border-right-color:var(--accent);
}
html[dir="rtl"] .status-dot,
html[dir="rtl"] .pulse{margin-right:0;margin-left:6px}
html[dir="rtl"] .login-card form{text-align:right}
html[dir="rtl"] .crumb{direction:ltr;unicode-bidi:embed}
html[dir="rtl"] .progress-bar{background:linear-gradient(270deg,var(--accent),var(--green))}
@media(max-width:1000px){html[dir="rtl"] .main{margin-right:70px}}

/* Signed-in user/reseller portals: mirror the shared sidebar. */
html[dir="rtl"] .portal-sidebar{
  left:auto;right:0;border-right:0;border-left:1px solid #223049;
}
html[dir="rtl"] .portal-main{margin-left:0;margin-right:232px}
html[dir="rtl"] .portal-nav-item{border-left:0;border-right:3px solid transparent}
html[dir="rtl"] .portal-nav-item.active{
  border-right-color:#38bdf8;
  background:linear-gradient(270deg,rgba(56,189,248,.13),rgba(56,189,248,.04));
}
html[dir="rtl"] .portal-content{text-align:right}
html[dir="rtl"] .portal-content input{direction:auto;text-align:start}
@media(max-width:900px){html[dir="rtl"] .portal-main{margin-right:64px}}
