/* Solaryx Meet — the operator's instant meetings (2026-11-18): the start panel on the home page, the guest link before
   joining, and his live transcript in the call; then the phone: iPhone fixes for every page. Tokens from meet.css. */

/* Persian in the transcript: the system's Arabic-script face where the UI face has none (Geist has no Arabic) */
:root { --font-tx: "Geist", "SF Arabic", "Geeza Pro", "Vazirmatn", "Segoe UI", Tahoma, system-ui, sans-serif; }

/* ── home: a new meeting ─────────────────────────────────────────────── */
.host .lead b { color: var(--ink); font-weight: 600; }
.host-form .input { font-size: 16px; }
.host-list { margin-top: 22px; display: grid; gap: 10px; }
.host-items { display: grid; gap: 8px; }
.host-item { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 14px; border-radius: var(--r-field); background: rgba(7, 7, 9, 0.72); box-shadow: inset 0 0 0 1px var(--line); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.host-item-t { flex: 1; min-width: 0; display: grid; gap: 3px; }
.host-item-t b { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.host-item-t small { color: var(--ink-3); font-size: 12px; }
.host .hint:empty { display: none; }
.host .divider { margin: 26px 0 18px; }
.link-u { text-decoration: underline; text-underline-offset: 3px; color: var(--ink); }
.is-host #home-join > h1, .is-host #home-join > .lead, .is-host #home-join > .divider, .is-host #home-portal, .is-host #host-try-wrap { display: none; }
.is-host-try #host-h, .is-host-try .host > .lead, .is-host-try .host-form, .is-host-try .host .divider { display: none; }
.is-host-try .host .hint { margin: 0 0 18px; color: var(--ink-2); font-size: 14px; }
.foot-btn { padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.foot-btn:hover { color: var(--ink); }
.foot-btn[disabled] { opacity: .5; cursor: progress; }

/* ── before joining: the guest link ─────────────────────────────────── */
.pre-invite { display: grid; gap: 8px; padding: 12px; border-radius: var(--r-field); background: rgba(255, 255, 255, 0.035); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.pre-invite > label { font: 500 12.5px/1 var(--font-ui); color: rgba(245, 245, 242, 0.72); }
.pre-invite .invite-row { display: flex; gap: 8px; }
.pre-invite .invite-row .input { flex: 1; min-width: 0; height: 36px; font: 400 12.5px/1 var(--font-mono); color: var(--ink-2); }
.pre-invite .files-note { line-height: 1.45; }
#name[readonly] { color: var(--ink-2); cursor: default; }

/* ── the call: the transcript, beside the stage ──────────────────────── */
.tx { width: 340px; flex: none; display: flex; flex-direction: column; min-height: 0; position: relative; border-radius: var(--r-card); background: rgba(8, 8, 10, 0.88); box-shadow: inset 0 0 0 1px var(--line); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); overflow: hidden; animation: panelIn .34s var(--out); }
.tx[hidden] { display: none; }
.tx-h { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; border-bottom: 1px solid var(--line); }
.tx-grip { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0; border: 0; background: none; color: var(--ink); font: 600 13.5px/1 var(--font-ui); text-align: left; cursor: default; }
.tx-grip b { font-weight: 600; }
.tx-sub { color: var(--ink-3); font-weight: 500; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-dot { width: 7px; height: 7px; flex: none; border-radius: 2px; background: var(--ink-3); }
.tx[data-state="live"] .tx-dot { background: #7fe0a4; animation: breathe 2.4s ease-in-out infinite; }
.tx[data-state="reconnecting"] .tx-dot, .tx[data-state="connecting"] .tx-dot { background: #f2c94c; }
.tx[data-state="elsewhere"] .tx-dot, .tx[data-state="expired"] .tx-dot, .tx[data-state="unsupported"] .tx-dot { background: var(--alert); }
.tx-acts { display: inline-flex; gap: 2px; }
.tx-b { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 12px 14px 18px; display: flex; flex-direction: column; gap: 12px; scroll-behavior: auto; }
.tx-b .empty { margin: 0; line-height: 1.5; color: var(--ink-3); }
.txl { display: grid; gap: 4px; }
.txl-h { display: flex; align-items: baseline; gap: 8px; font: 500 12px/1.2 var(--font-ui); color: var(--ink-3); }
.txl-h b { color: var(--ink); font-weight: 600; font-size: 12.5px; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.txl.me .txl-h b { color: var(--ink-2); }
.txl-lang { padding: 2px 5px; border-radius: var(--r-tag); background: var(--fill-2); font: 600 10px/1 var(--font-mono); letter-spacing: .04em; color: var(--ink-2); }
.txl-h .t { margin-left: auto; font: 500 11px/1 var(--font-mono); }
.txl p { margin: 0; font: 400 14.5px/1.6 var(--font-tx); color: var(--ink); overflow-wrap: anywhere; unicode-bidi: plaintext; }
.txl p:lang(fa) { font-size: 15.5px; line-height: 1.8; }
.txl.partial p { color: var(--ink-2); }
.txl.ghost { display: flex; align-items: center; gap: 6px; font: 500 12.5px/1 var(--font-ui); color: var(--ink-3); }
.txl.ghost b { color: var(--ink-2); font-weight: 600; }
.txl.ghost i { display: inline-flex; gap: 3px; margin-left: 2px; }
.txl.ghost i span { width: 4px; height: 4px; border-radius: 1px; background: var(--ink-3); animation: txdot 1.2s ease-in-out infinite; }
.txl.ghost i span:nth-child(2) { animation-delay: .15s; } .txl.ghost i span:nth-child(3) { animation-delay: .3s; }
@keyframes txdot { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.tx-jump { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.tx-cap { display: none; }
/* both panels open on a narrow desktop: the meeting panel wins until it closes */
@media (max-width: 1240px) and (min-width: 901px) { .c-body:has(.side2.open) .tx { display: none; } }
.menu-leave { left: auto; right: 0; transform: none; min-width: 230px; }
#m-leave-all span { color: #ffb3b3; }

/* ── the phone: the transcript is a bar over the dock with the last lines, opened to full height from its top ── */
@media (max-width: 900px) {
  .tx { position: fixed; z-index: 7; left: 8px; right: 8px; width: auto; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); max-height: 128px; animation: none; }
  .tx-grip { cursor: pointer; }
  .tx-grip::after { content: ""; width: 8px; height: 8px; margin-left: auto; margin-right: 4px; border-right: 1.6px solid var(--ink-2); border-top: 1.6px solid var(--ink-2); transform: rotate(-45deg) translateY(2px); transition: transform .25s var(--settle); }
  .tx-open .tx-grip::after { transform: rotate(135deg) translateY(2px); }
  .tx-acts { display: none; }
  .tx-open .tx-acts { display: inline-flex; }
  .tx-cap { display: grid; gap: 4px; padding: 8px 12px 10px; font: 400 14px/1.45 var(--font-tx); }
  .tx-cap p { margin: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; unicode-bidi: plaintext; }
  .tx-cap p b { font-weight: 600; color: var(--ink-2); }
  .tx-cap:empty::before { content: "Lines show here as they are said."; color: var(--ink-3); font-size: 13px; }
  .tx-b { display: none; }
  .tx-open .tx { top: calc(64px + env(safe-area-inset-top, 0px)); max-height: none; }
  .tx-open .tx-cap { display: none; }
  .tx-open .tx-b { display: flex; }
  .has-tx .side2.open { z-index: 9; }
  .menu-leave { right: -4px; }
}

/* ── iPhone and every phone, on every page (the mobile audit of 2026-11-18) ── */
/* a field under 16px makes iOS Safari zoom the whole page when it is touched */
@media (pointer: coarse) { .input, .select, #msg, .pin-note textarea { font-size: 16px; } }
/* no grey flash on a tap, no double-tap zoom on the controls, no text selection on a long press of a key */
button, .btn, .ic, .vb, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.ic, .btn, .vb, .seg button, .tabs button { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* the notch and the home indicator: the page uses the whole screen (viewport-fit=cover), its controls stay clear */
.top { padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.c-top { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.top { padding-top: max(18px, env(safe-area-inset-top, 0px)); }
.c-top { padding-top: max(12px, env(safe-area-inset-top, 0px)); }
.foot { padding-bottom: max(18px, env(safe-area-inset-bottom, 0px)); }
.c-dock { padding-bottom: max(16px, calc(env(safe-area-inset-bottom, 0px) + 6px)); }
.c-body { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (max-width: 480px) { .c-dock { padding-bottom: max(12px, calc(env(safe-area-inset-bottom, 0px) + 4px)); } }
/* the camera check on a phone: 4:3 (a phone's camera fills it; 16:9 left 220px), the "camera is off" sign above the
   controls, never under them (it was, at 390px) */
@media (max-width: 560px) {
  .preview { aspect-ratio: 4 / 3; }
  .preview .off { padding-bottom: 64px; gap: 8px; font-size: 13px; }
  .preview .off .avatar { width: 60px; height: 60px; border-radius: 16px; font-size: 22px; }
}
/* the call's top bar on a phone (the e2e of 2026-11-18, an iPhone 14 guest): a long title pushed the bar 22 px past the
   screen and folded the page counter onto two lines over the people. The title gives way, the right side keeps its size. */
.c-left { min-width: 0; flex: 1 1 auto; }
.c-left.chip { overflow: hidden; }
.c-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.c-right { flex: none; }
.pager, .pager span { white-space: nowrap; }
@media (max-width: 480px) {
  .c-top { gap: 8px; }
  .c-top .chip { padding: 0 10px; gap: 8px; }
  .c-clock { display: none; }
  /* the dock: "Leave" sized to its word (it was cut to "Lea" at 40 px), presenting a file stays in the Share menu */
  .c-dock .ic.leave { width: auto; padding: 0 12px; font-size: 13px; }
  .c-dock [data-side="files"] { display: none; }
}
/* the call never scrolls the page under the finger */
.call2 body, .call2 { overscroll-behavior: none; }

/* ── light theme ─────────────────────────────────────────────────────── */
html[data-theme="light"] .tx { background: rgba(255, 255, 255, 0.92); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.07), 0 20px 50px rgba(0, 0, 0, 0.1); }
html[data-theme="light"] .txl-lang { background: rgba(0, 0, 0, 0.06); }
html[data-theme="light"] .host-item { background: rgba(255, 255, 255, 0.86); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); }
html[data-theme="light"] .pre-invite { background: rgba(0, 0, 0, 0.025); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.07); }
html[data-theme="light"] .pre-invite > label { color: rgba(12, 12, 13, 0.7); }
html[data-theme="light"] #m-leave-all span { color: #b42323; }
@media (prefers-reduced-motion: reduce) { .tx { animation: none; } .txl.ghost i span, .tx[data-state="live"] .tx-dot { animation: none; } }
