/* public/try/gate.css — the try.pabau.com request gate, carved from
   demo/public/demo.css. Only the gate + industry-picker dialog rules: the
   player, its top bar/rail, boot-progress and sound-gate chrome are gone. */

@font-face {
  font-family: "Satoshi";
  src: url('/try/Satoshi-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* surfaces (light medical-SaaS) */
  --mesh:       #EAF2FA;
  --panel:      #ffffff;
  --strip:      #F7FAFD;
  --tint:       #EAF3FC;
  --tint-2:     #E8F1FB;
  /* lines */
  --line:       #E7EEF5;
  --line-2:     #EAF0F6;
  --line-3:     #EDF3F9;
  /* ink */
  --ink:        #12263F;
  --ink-2:      #2C2D3A;
  --ink-quote:  #33475B;
  --muted:      #5A6B7B;
  --muted-2:    #64748B;
  --muted-3:    #6B7C8C;
  --faint:      #9DB2C4;
  /* brand */
  --blue:       #037CD2;
  --blue-2:     #0369a9;
  --teal:       #24BEE1;
  --grad:       linear-gradient(135deg, #037CD2 0%, #24BEE1 100%);
  --grad-nav:   linear-gradient(90deg, #12263F 0%, #1C3A5E 100%);
  /* live / status */
  --live:       #0E9F6E;
  --live-dot:   #12C070;
  --green-cta:  #16B364;
  /* geometry */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --side-w: 264px;
  --shadow-card: 0 1px 2px rgba(23,43,77,.04), 0 4px 10px rgba(23,43,77,.05), 0 16px 36px rgba(23,43,77,.09);
  --shadow-frame: 0 24px 60px rgba(23,43,77,.16);
  --shadow-sm: 0 1px 2px rgba(23,43,77,.035), 0 3px 8px rgba(23,43,77,.05);
  --ease: cubic-bezier(.4,.14,.2,1);
  --font: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
  background: var(--mesh);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
::selection { background: rgba(3,124,210,.14); }

/* ══════════════════════════════════════════════════════════ brand mark ══ */
.logo { display: inline-flex; align-items: center; gap: 9px; }
.logo .mark { height: 24px; width: auto; display: block; flex: 0 0 auto; }
.logo .word { height: 17px; width: auto; display: block; }
.logo .tag  { font-size: 14px; font-weight: 500; color: var(--muted-2); }

/* ═══════════════════════════════════════════════════════════════ gate ══ */
.gate {
  position: fixed; inset: 0; z-index: 40;
  /* ⚠ `safe center`, not `center`, and it is load-bearing. A centred grid item
     that is TALLER than its container overflows in BOTH directions, so its top —
     the flag row and the headline — goes above the scroll origin and cannot be
     reached at all. That is not theoretical: adding the mandatory Website field
     on 09-04 pushed the card to 725px, and at 1280x720 (the smallest laptop in
     our analytics) the trust line sat below a viewport with no scroller. `safe`
     falls back to start-alignment the moment the item overflows, which is what
     makes overflow-y usable; the short-viewport rule further down then handles
     the genuinely tiny cases. Measured by scripts/qa-gate-fold-i18n.mjs. */
  display: grid; justify-items: center;
  align-items: center; align-items: safe center;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 24px;
  background-color: var(--mesh);
  background-image:
    radial-gradient(1100px 620px at 8% -12%, rgba(36,190,225,.14), transparent 60%),
    radial-gradient(1000px 700px at 104% 4%, rgba(3,124,210,.13), transparent 55%),
    linear-gradient(to right, rgba(3,124,210,.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(3,124,210,.045) 1px, transparent 1px),
    linear-gradient(160deg, #F4F9FD 0%, #E6F0F8 100%);
  background-size: auto, auto, 64px 64px, 64px 64px, auto;
  animation: fade .4s var(--ease);
}
.gate[hidden] { display: none; }
.gate-card {
  width: min(452px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-frame);
  padding: 30px 30px 24px;
  animation: rise .5s var(--ease) both;
}
.lang-row-q { flex: 1 1 100%; margin: 0 0 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.gate-card .logo { margin-bottom: 20px; }
.gate-card h1 { margin: 0 0 8px; font-size: 24px; line-height: 1.2; letter-spacing: -.02em; color: var(--ink); font-weight: 700; }
.gate-card .sub { margin: 0 0 12px; color: var(--muted); font-size: 13.5px; }
.gate-card .sub b { color: var(--blue); font-weight: 700; }
/* the three things to know before requesting (Kane 09-14 "more readable … some
   emojis") — one line each with an emoji glyph, instead of a fourth and fifth
   sentence packed into the sub. Flex, so RTL mirrors the glyph to the right. */
.gate-card .facts { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 6px; }
.gate-card .facts li { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.gate-card .facts .fx { flex: 0 0 auto; font-size: 13px; line-height: 1.4; }

.field { display: block; margin-bottom: 13px; }
.field > span { display: block; font-size: 12px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.field > span i { font-style: normal; font-weight: 500; color: var(--faint); }
.field input, .field select {
  width: 100%; padding: 11px 13px; font-size: 14px; color: var(--ink-2);
  background: #fff; border: 1px solid #DCE5EE; border-radius: var(--r-sm);
  font-family: inherit;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
  appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%235A6B7B' stroke-width='1.6' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat; background-position: right 13px center; padding-right: 34px;
}
.field input::placeholder { color: var(--faint); }
.field input:focus, .field select:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(3,124,210,.14);
}
.field.invalid input { border-color: #E5484D; box-shadow: 0 0 0 3px rgba(229,72,77,.16); }
/* the required "kind of clinic" field is a button (picker-trigger), not an input */
.field.invalid .picker-trigger { border-color: #E5484D; box-shadow: 0 0 0 3px rgba(229,72,77,.16); }

/* request accepted (Kane 09-04) — the fields, the CTA and the trust line go,
   the tick panel takes their place, and the headline above it stays put. */
.gate-card.sent .field,
.gate-card.sent .lang-row,
.gate-card.sent #gateBtn,
.gate-card.sent .gate-notice,
/* the sub is a call to action they have just answered — leaving "Request your
   private link" above "Request received" reads as though it did not work */
.gate-card.sent .sub,
.gate-card.sent .facts,
.gate-card.sent .trust { display: none; }
.gate-sent { margin: 4px 0 2px; animation: rise .38s var(--ease) both; }
.gate-sent[hidden] { display: none; }
.gs-tick {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; margin: 0 0 14px;
  background: rgba(3,124,210,.10); color: var(--blue);
}
.gate-sent h2 { margin: 0 0 8px; font-size: 19px; line-height: 1.25; letter-spacing: -.01em; color: var(--ink); font-weight: 700; }
.gate-sent p { margin: 0 0 10px; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.gate-sent p b { color: var(--ink); font-weight: 600; }
.gs-note { font-size: 12.5px !important; color: var(--faint) !important; }
.gs-book {
  display: inline-block; margin-top: 4px; font-size: 13px; font-weight: 600;
  color: var(--blue); text-decoration: none;
  border-bottom: 1px solid rgba(3,124,210,.32); padding-bottom: 1px;
}
.gs-book:hover { border-bottom-color: var(--blue); }
.gs-book:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 2px; }

.gate-notice { display: none; margin: 4px 0 14px; padding: 11px 13px; border-radius: var(--r-sm); font-size: 12.5px; line-height: 1.45; font-weight: 600; }
.gate-notice.show { display: flex; align-items: center; gap: 9px; }
.gate-notice::before { content: ""; flex: 0 0 auto; width: 16px; height: 16px; border-radius: 50%; }
.gate-notice.busy { background: #EAF3FC; border: 1px solid #BBDAF6; color: #0B5FA5; }
.gate-notice.busy::before { border: 2px solid #9FCBEF; border-top-color: #0B5FA5; animation: spin .8s linear infinite; }
.gate-notice.error { background: #FDECEC; border: 1px solid #F5C2C2; color: #B42318; }
.gate-notice.error::before { background: #E5484D; box-shadow: inset 0 0 0 2px #FDECEC; }

/* gate "What kind of clinic?" — opens the industry picker dialog below */
.picker-trigger {
  display: flex; align-items: center; gap: 9px; width: 100%; cursor: pointer; text-align: left;
  padding: 11px 13px; font-size: 14px; color: var(--ink-2);
  background: #fff; border: 1px solid #DCE5EE; border-radius: var(--r-sm);
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease), background .12s;
}
.picker-trigger:hover { border-color: #C4D6E8; background: #FCFDFF; }
.picker-trigger:focus-visible { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(3,124,210,.14); }
.picker-trigger .pt-emoji { font-size: 17px; line-height: 1; flex: 0 0 auto; }
.picker-trigger .pt-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-trigger[data-empty="1"] .pt-label { color: var(--faint); }
.picker-trigger .pt-chev { flex: 0 0 auto; color: var(--muted-2); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 12px 16px; margin-top: 6px;
  font-size: 14.5px; font-weight: 700; color: #fff; cursor: pointer;
  background: var(--grad);
  border: 0; border-radius: var(--r-sm);
  box-shadow: 0 8px 18px rgba(3,124,210,.32);
  transition: transform .12s var(--ease), box-shadow .16s var(--ease), opacity .16s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(3,124,210,.42); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .7; cursor: default; transform: none; }
.btn .spin { display: none; }
.btn.loading .label { display: none; }
.btn.loading .spin { display: inline-block; }

.trust {
  display: flex; align-items: center; gap: 7px; justify-content: center;
  margin: 16px 0 0; font-size: 11.5px; color: var(--muted-3);
}
.trust svg { flex: 0 0 auto; opacity: .8; }

/* ⚖️ the transparency line (#5039) — what we collect, what we record, and the
   policy that says so. Deliberately NOT in the `.gate-card.sent` hide list above:
   .trust is a pre-submit reassurance and .sub is a call to action they have just
   answered, but this is a standing notice and the one link to the policy — it has
   to stay reachable after the request goes in, not only before it. */
/* ⚠ --muted (5.49:1 on the card's white), NOT the --muted-3 the .trust line
   beside it uses — that is 4.30:1, under the 4.5:1 AA floor for text this size.
   A reassurance nobody has to read can carry that; the one notice on the page a
   visitor may NEED to read cannot. The link is --ink + an underline rather than
   --blue (4.36:1, same problem) — the underline is the affordance, so the colour
   is free to be the legible one. */
.privacy {
  margin: 8px 0 0; font-size: 11.5px; line-height: 1.5;
  text-align: center; color: var(--muted);
}
.privacy a {
  color: var(--ink); text-decoration: underline; text-underline-offset: 2px;
}
.privacy a:hover { color: var(--blue); }

/* ── language switcher (pabau.com-style flag pills) — non-compact (gate) only ── */
.lang-row { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; margin: 0 -6px 12px; }
.lang-pill {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-family: inherit;
  border-radius: 999px; transition: background .14s var(--ease), color .14s, border-color .14s, transform .12s var(--ease);
}
.lang-pill .lp-flag { font-size: 14px; line-height: 1; }
.lang-pill:not(.compact) {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 6px; font-size: 11px; font-weight: 600; white-space: nowrap;
  color: var(--muted-2); background: #F5F9FD; border: 1px solid #E7EEF5;
}
.lang-pill:not(.compact) .lp-flag { font-size: 12px; }
.lang-pill:not(.compact):hover { color: var(--ink); border-color: #CFE4F7; background: #EFF6FC; transform: translateY(-1px); }
.lang-pill:not(.compact).is-current { color: var(--blue); background: var(--tint); border-color: #CFE4F7; }
.lang-pill:not(.compact):focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(3,124,210,.16); }

/* ═══════════════════════════════════════════ industry picker (fix b) ══ */
.ind-overlay {
  position: fixed; inset: 0; z-index: 120; display: none;
  align-items: center; justify-content: center; padding: 22px;
  background: rgba(18,38,63,.34); backdrop-filter: blur(3px);
  animation: fade .2s var(--ease);
}
.ind-overlay.open { display: flex; }
.ind-modal {
  width: min(720px, 100%); max-height: min(82vh, 740px); display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-frame); overflow: hidden; animation: rise .28s var(--ease) both;
}
.ind-head { flex: 0 0 auto; padding: 18px 20px 12px; border-bottom: 1px solid var(--line-3); }
.ind-head .ind-titlerow { display: flex; align-items: flex-start; gap: 10px; }
.ind-head h2 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); flex: 1; }
.ind-head p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.ind-close {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; color: var(--muted-2); cursor: pointer; display: grid; place-items: center; font-size: 17px; line-height: 1;
  transition: background .14s, color .14s, border-color .14s;
}
.ind-close:hover { background: #F5F9FD; color: var(--ink); border-color: #CFE4F7; }
.ind-search-wrap { position: relative; margin-top: 12px; }
.ind-search-wrap svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.ind-search {
  width: 100%; padding: 10px 12px 10px 34px; font-family: inherit; font-size: 13.5px; color: var(--ink-2);
  background: #F5F9FD; border: 1px solid #DCE5EE; border-radius: var(--r-sm);
  transition: border-color .16s, box-shadow .16s, background .12s;
}
.ind-search:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(3,124,210,.12); }
.ind-search::placeholder { color: var(--faint); }
.ind-body { flex: 1 1 auto; overflow-y: auto; padding: 8px 20px 18px; scrollbar-width: thin; }
.ind-body::-webkit-scrollbar { width: 7px; }
.ind-body::-webkit-scrollbar-thumb { background: #D6E0EC; border-radius: 8px; }
.ind-group { margin-top: 18px; }
.ind-group:first-child { margin-top: 8px; }
.ind-group-title { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin: 0 0 10px; }
.ind-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(206px, 1fr)); gap: 10px; }
.ind-item {
  display: flex; align-items: center; gap: 11px; text-align: left; cursor: pointer;
  min-width: 0;
  padding: 11px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line);
  color: var(--ink-2); font-family: inherit; transition: border-color .14s, background .14s, transform .1s var(--ease), box-shadow .14s;
}
.ind-item:hover { border-color: #CFE4F7; background: var(--tint); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(23,43,77,.08); }
.ind-item .ind-emoji { flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; font-size: 18px; line-height: 1; border-radius: 9px; background: var(--tint); }
.ind-item:hover .ind-emoji { background: #fff; }
.ind-item.is-current .ind-emoji { background: #E4EFFB; }
.ind-item .ind-label { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; line-height: 1.25; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ind-item.is-current { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(3,124,210,.14); }
.ind-empty { padding: 22px 4px; text-align: center; color: var(--muted); font-size: 13px; }

@media (max-width: 560px) {
  .ind-overlay { padding: 0; align-items: stretch; }
  .ind-modal { width: 100%; max-height: 100%; border-radius: 0; }
  .ind-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ind-close { width: 44px; height: 44px; }
}

/* ═══════════════════════════════════════════════════════════ motion ══ */
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* short-viewport fold-fix — measured 08-26 (scripts/qa-gate-fold-i18n.mjs) on a
   1366x768 laptop: at a 640px viewport once the browser takes its chrome, the
   German/French/Spanish cards run longer than English's and their trust line
   (then their CTA) fell below the fold. Nothing is hidden or truncated; only
   the card's own breathing room shrinks, which lifts the button back above
   the fold in every language.
   09-14: widened 680 → 740 after the "laptop or desktop" sentence added a line to
   the sub — measured with scripts/shot-try-gate.mjs at 1280x720: de/fr/es button
   bottom 743px at the default spacing, 698px with this block applied. */
@media (max-height: 740px) {
  /* `start` is the fallback for browsers without `safe`; with it, a SHORT card (the
     "Request received" state) stays centred and only an overflowing one start-aligns. */
  .gate { align-items: start; align-items: safe center; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-top: 12px; padding-bottom: 12px; }
  .gate-card { padding: 18px 26px 16px; }
  .gate-card .logo { margin-bottom: 12px; }
  .gate-card h1 { font-size: 22px; }
  .gate-card .sub { margin: 0 0 10px; }
  .gate-card .facts { margin-bottom: 12px; gap: 4px; }
  .trust { margin-top: 10px; }
  .privacy { margin-top: 6px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Appended verbatim from demo/public/rtl.css (carve-out task-5-brief Step 3.2).
   Most selectors below target player-only chrome (.vb-convo, .voicebar, .side,
   .pbc-*, .lang-sheet, .bubble, .persona, .stageview, #screen, etc.) that does
   not exist on this page and so these rules are simply inert here. The ones
   that DO match the gate — email/url input direction, the .logo mark/word/tag
   order fix, and the .ind-* industry-picker modal RTL rules — are exactly what
   this file is for; kept unchanged rather than hand-curated so this stays a
   verbatim copy of the source of truth.
   ═══════════════════════════════════════════════════════════════════════════ */

/* rtl.css — right-to-left corrections for OUR CHROME ONLY (Arabic / 🇦🇪).
   ═══════════════════════════════════════════════════════════════════════════════
   Loaded last, after demo.css / bar.css / rail.css, so every rule here is a plain
   override — no specificity games, no !important except where an id-scoped rule in
   demo.css genuinely outranks a class one (marked at the site).

   ACTIVATION — nothing in this file matches until <html dir="rtl"> is set, and the
   ONLY thing that sets it is the direction bootstrap at the bottom of
   i18n-strings.js, which mirrors whatever demo-app.js declares as the document
   language. So today (the UAE flag runs `lang:"en"`) this file is inert; the day
   that entry becomes `lang:"ar"` the chrome flips with no further edit.

   ⛔ THE STREAMED APP MUST NEVER MIRROR. #screen is a live BITMAP of a real Pabau
   account and input-relay.js maps clicks onto its rect. §0 pins the whole live
   frame to direction:ltr so no inherited RTL can reach it, and no rule below ever
   touches .livewrap / .screen-frame / #screen geometry. The picker, the overlays
   and everything outside that box ARE ours and do flip.

   WHAT IS DELIBERATELY LEFT ALONE (see the QA report):
     · the "→" that demo-app.js APPENDS to the "View all success stories" link is a
       raw text node built in JS we don't own — it stays pointing right. Every arrow
       that is its own element (.pbc-prod-arrow, .ps-arrow, .pbc-flow-arrow, the
       carousel chevrons, the dock's ›) is flipped below.
     · the Pabau GO phone overlay (ios-mode.js) and the spotlight tour layer both
       position themselves from measured rects in JS; they are LTR-correct as-is and
       are not touched here.                                                        */

/* ═════════ 0 · the live product is a bitmap — it never flips ═══════════════════ */
html[dir="rtl"] .livewrap,
html[dir="rtl"] .screen-frame,
html[dir="rtl"] #screen { direction: ltr; }

/* Latin-only fields keep their own direction but stay visually on the RTL edge, so
   "you@clinic.com" never renders as "moc.cinilc@uoy"-looking mojibake order. */
html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[inputmode="email"],
html[dir="rtl"] input[type="url"],
html[dir="rtl"] input[type="tel"] { direction: ltr; text-align: right; }

/* Satoshi has no Arabic — name the system Arabic faces explicitly so Chrome picks a
   real one instead of a last-resort fallback. Local fonts only; no network. */
html[dir="rtl"] body {
  font-family: "Satoshi", "SF Arabic", "Geeza Pro", "Noto Sans Arabic", "Segoe UI",
               Tahoma, -apple-system, BlinkMacSystemFont, "Apple Color Emoji", sans-serif;
}

/* ═════════ 1 · the email gate ═════════════════════════════════════════════════ */
html[dir="rtl"] .picker-trigger { text-align: right; }
html[dir="rtl"] .field select {
  background-position: left 13px center;
  padding-right: 13px; padding-left: 34px;
}
/* the boot progress bar fills from the start edge — which is the right one now */
html[dir="rtl"] .gp-bar i { background: linear-gradient(270deg, #2f7df6, #54b7ff); }

/* ═════════ 2 · header + LIVE strip ════════════════════════════════════════════
   Both are plain flex rows, so dir alone reverses them correctly (logo to the right,
   CTAs to the left). Only the physical nudges need flipping. */

/* …with ONE exception, and the comment above was wrong about it: A BRAND LOCKUP IS A
   GRAPHIC, AND A GRAPHIC IS NEVER MIRRORED. `.logo` is a flex row holding the diamond
   mark, the "Pabau" wordmark and a caption, in that DOM order — so dir alone reversed
   it and put our diamond on the RIGHT of our own wordmark, which is not our logo. It
   read as a broken image rather than as Arabic, on the first screen a Gulf prospect
   sees and again in the player header behind everything else.
   Order values are laid out along the flex main axis, and in RTL that axis runs
   right-to-left — so `word:1, mark:2` places the wordmark rightmost and the mark to
   its LEFT, restoring [◆ Pabau] as a left-to-right pair, while the pair as a whole
   still sits on the right edge where the reversed row puts it. The caption and the
   hover "Dashboard" pill follow it on the trailing (left) side, which IS correct to
   mirror — they are text about the logo, not part of it.
   Two lockups exist and both are covered: the gate uses .word/.tag (images), the
   player header uses .fh-word/.fh-tag (text). */
html[dir="rtl"] .logo .word,
html[dir="rtl"] .logo .fh-word   { order: 1; }
html[dir="rtl"] .logo .mark      { order: 2; }
html[dir="rtl"] .logo .tag,
html[dir="rtl"] .logo .fh-tag    { order: 3; }
html[dir="rtl"] .logo .logo-hint { order: 4; }

html[dir="rtl"] .logo-hint { margin-left: 0; margin-right: 2px; transform: translateX(3px); }
html[dir="rtl"] button.logo:hover .logo-hint,
html[dir="rtl"] button.logo:focus-visible .logo-hint { transform: none; }
html[dir="rtl"] .company-chip .cc-chev { margin-left: 0; margin-right: 1px; }

/* the folded bar's language menu hangs off #globeBtn. focus-shell.js measures that
   button as a distance from the RIGHT edge (--langright); mirrored, the same button
   sits --langright from the right of a reversed bar, so its LEFT edge in page
   coordinates is (100vw − --langright − its own width). Anchor to that. */
html[dir="rtl"].focus:not(.embed) .lang-sheet {
  justify-content: flex-end;
  padding: 52px 10px 0 max(10px, calc(100vw - var(--langright, 10px) - 298px));
}
html[dir="rtl"] .lang-sheet .ls-opt { text-align: right; }
html[dir="rtl"] .lang-sheet .ls-opt .ls-check { margin-left: 0; margin-right: auto; }

/* ═════════ 3 · stage overlays + the discovery picker ══════════════════════════ */
html[dir="rtl"] .demo-card { text-align: right; }

/* ═════════ 4 · the pill row ═══════════════════════════════════════════════════
   .quicknav is a flex row that reverses on its own; the label's gutter is physical. */
html[dir="rtl"] .quicknav .qn-label { margin-right: 0; margin-left: 2px; }

/* ═════════ 5 · the Ava dock + the conversation ════════════════════════════════ */
/* the "press to start" ▶ cue lives on the trailing edge of the persona row */
html[dir="rtl"] .persona.is-clickable { padding: 5px 6px 5px 34px; }
html[dir="rtl"] .persona.is-clickable::after {
  right: auto; left: 12px;
  transform: translateY(-50%) rotate(225deg);      /* ▶ becomes ◀ */
  transition: border-color .15s ease, left .12s ease;
}
html[dir="rtl"] .persona.is-clickable:hover::after { right: auto; left: 10px; }
html[dir="rtl"]:not(.mic-on) .voicebar .persona.is-clickable { padding-right: 6px; padding-left: 6px; }
html[dir="rtl"] .caption .cursor { margin-left: 0; margin-right: 1px; }

/* bubbles: align-self:flex-start/end reverse on their own, so only the little
   "tail" corner has to move with them or every bubble points the wrong way. */
html[dir="rtl"] .bubble.agent { border-bottom-left-radius: 13px; border-bottom-right-radius: 5px; }
html[dir="rtl"] .bubble.you   { border-bottom-right-radius: 13px; border-bottom-left-radius: 5px; }

html[dir="rtl"] .sheet-handle { text-align: right; }
html[dir="rtl"] .vb-convo-close { right: auto; left: 10px; }
/* the send paper-plane flies in the reading direction, so in Arabic it flies left */
html[dir="rtl"] .composer .send svg { transform: scaleX(-1); }

/* ═════════ 6 · the marketing rail ═════════════════════════════════════════════ */
html[dir="rtl"] .side { border-left: 0; border-right: 1px solid var(--line); border-radius: var(--r-lg) 0 0 var(--r-lg); }
html[dir="rtl"] .player-center { border-radius: 0 var(--r-lg) var(--r-lg) 0; }

/* every arrow that IS an element flips; translateX after scaleX is already in the
   mirrored axis, so the hover nudge keeps travelling in the reading direction. */
html[dir="rtl"] .pbc-prod-arrow,
html[dir="rtl"] .ps-arrow,
html[dir="rtl"] .pbc-flow-arrow { transform: scaleX(-1); display: inline-block; }
html[dir="rtl"] .pbc-prod-row:hover .pbc-prod-arrow,
html[dir="rtl"] .pbc-sched-btn--ghost:hover .ps-arrow,
html[dir="rtl"] .pbc-flow-more:hover .pbc-flow-arrow { transform: scaleX(-1) translateX(3px); }

html[dir="rtl"] .pbc-prod-row.is-relevant {
  background: linear-gradient(270deg, rgba(3,124,210,.06), transparent 82%);
  padding-left: 6px; padding-right: 8px;
}
html[dir="rtl"] .pbc-flow-card { border-left: 0; border-right: 3px solid var(--blue); }
/* rail.css pins both badge pills past the icon with a physical margin, and its
   #prodRows-scoped selector outranks a class one — match its specificity here. */
html[dir="rtl"] #prodRows .pbc-prod-row .pbc-prod-tag { margin-left: 0; margin-right: 36px; }
html[dir="rtl"] #prodRows .pbc-prod-row.pbc-ind-row { padding: 9px 8px 9px 6px; }

html[dir="rtl"] .pbc-testimonial-mark { right: auto; left: 10px; }
/* the carousel row reverses, so "previous" is now the right-hand button — its
   chevron has to point outward-right or it contradicts its own aria-label. */
html[dir="rtl"] .pbc-ts-arrow svg { transform: scaleX(-1); }

/* ═════════ 7 · modals + drawers ═══════════════════════════════════════════════ */
html[dir="rtl"] .ind-search-wrap svg { left: auto; right: 12px; }
html[dir="rtl"] .ind-search { padding: 10px 34px 10px 12px; }
html[dir="rtl"] .ind-item { text-align: right; }
html[dir="rtl"] .bm-close,
html[dir="rtl"] .sched-drawer .sd-close { right: auto; left: 12px; }
html[dir="rtl"] .bm-av { margin-left: 0; margin-right: -10px; }
html[dir="rtl"] .bm-av:first-child { margin-right: 0; }

/* ═════════ 8 · phone (below 720px) ════════════════════════════════════════════ */
@media (max-width: 720px), (orientation: landscape) and (max-height: 520px) {
  html[dir="rtl"] .vb-main .mic { margin-left: 0; margin-right: auto; }
  html[dir="rtl"] .msheet-handle { text-align: right; }
}

/* ═════════ 9 · THE FOLD (focus-shell) ═════════════════════════════════════════
   Everything here mirrors the four surfaces the fold pins to the right-hand edge:
   the conversation column, the Explore drawer, the floating dock, and the width the
   stage gives up to whichever is open. Same media query the fold itself uses, so
   these rules cannot reach the phone chrome. */
@media (min-width: 901px) and (min-height: 560px) {

  /* ── the conversation column ── */
  html[dir="rtl"].focus:not(.embed) .vb-convo {
    right: auto; left: 0;
    border-left: 0; border-right: 1px solid rgba(15,42,68,.14);
    box-shadow: 20px 0 48px rgba(9,26,48,.18);
    transform: translateX(-101%);
  }
  html[dir="rtl"].focus.chat-open:not(.embed) .vb-convo { transform: none; }
  /* the header chevron collapses the column back toward its own edge */
  html[dir="rtl"].focus:not(.embed) .vb-convo .sheet-handle .sh-chev { transform: rotate(-90deg); }
  html[dir="rtl"].focus:not(.embed) .vb-convo .sheet-handle:hover .sh-chev { transform: rotate(-90deg) scale(1.06); }

  /* ── the floating dock, and the column footer it becomes ── */
  html[dir="rtl"].focus:not(.embed) .voicebar {
    right: auto; left: 16px;
    transition: width .28s var(--ease), left .28s var(--ease), bottom .28s var(--ease), border-radius .28s var(--ease);
  }
  html[dir="rtl"].focus.chat-open:not(.embed) .voicebar {
    left: 0; right: auto;
    border-left: 0; border-right: 1px solid rgba(15,42,68,.14);
    box-shadow: 20px 0 48px rgba(9,26,48,.18);
  }
  html[dir="rtl"].focus.explore-open:not(.embed) .voicebar { right: auto; left: calc(min(300px, 30vw) + 16px); }
  html[dir="rtl"].focus:not(.embed) .voicebar .composer textarea { padding: 8px 12px 8px 4px; }
  html[dir="rtl"].focus.chat-open:not(.embed) .voicebar .dock-collapse { margin-left: 0; margin-right: 2px; }
  html[dir="rtl"].focus.chat-open:not(.embed) .voicebar .dock-collapse svg { transform: scaleX(-1); }

  /* the dock steps to the OTHER corner when a tour step lands under it */
  html[dir="rtl"].focus.dock-dodge:not(.embed) .voicebar { left: auto; right: 16px; }
  html[dir="rtl"].focus.dock-dodge.chat-open:not(.embed) .voicebar { left: 0; right: auto; }

  /* the tucked-away round Ava button stands where the dock stood */
  html[dir="rtl"].focus:not(.embed) .ava-untuck { right: auto; left: 16px; }

  /* ── the Explore drawer ── */
  html[dir="rtl"].focus:not(.embed) .side-right {
    right: auto; left: 0;
    border-left: 0; border-right: 1px solid rgba(15,42,68,.14);
    box-shadow: 20px 0 48px rgba(9,26,48,.18);
    transform: translateX(-101%);
  }
  html[dir="rtl"].focus.explore-open:not(.embed) .side-right { transform: none; }
  html[dir="rtl"].focus:not(.embed) .side-close { right: auto; left: 10px; }

  /* ── the stage gives up the width on the side the panel actually opens on.
        Kane 08-25: a panel must TAKE room, never cover the live product — so the
        margin has to move with the panel or the app is cropped on the wrong edge. */
  html[dir="rtl"].focus:not(.embed) .stageview {
    margin-right: 0; margin-left: 0;
    transition: margin-left .28s var(--ease);
  }
  html[dir="rtl"].focus.chat-open:not(.embed) .stageview { margin-right: 0; margin-left: var(--chatw, 384px); }
  html[dir="rtl"].focus.explore-open:not(.embed) .stageview { margin-right: 0; margin-left: min(300px, 30vw); }
  html[dir="rtl"].focus.ava-tucked:not(.chat-open):not(.embed) .stageview { margin-left: 0; }
}
