/* Voizual — public call experience (mobile-first) */
/* Web fonts and the Voizual palette come from brand.css, loaded first. */

:root {
  --blue: #00529B; --gold: #D4AF37; --gold-dark: #B8942A; --midnight: #020617; --slate: #F8FAFC;
  --sand: #E8DFD7; --ink: #0f172a; --muted: #64748b; --line: #e2e8f0; --danger: #dc2626; --ok: #15803d;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px); --sar: env(safe-area-inset-right, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { height: 100%; font-size: 16px; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100%; background: var(--slate); color: var(--ink); font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; line-height: 1.45; overscroll-behavior: none; }
body.in-call { background: #000; overflow: hidden; }
h1, h2 { margin: 0; line-height: 1.15; }
button { font: inherit; cursor: pointer; touch-action: manipulation; }
[hidden] { display: none !important; }
.muted { color: var(--muted); margin: .25rem 0 0; }
.error { color: var(--danger); }

/* ---------- start ---------- */
.screen { min-height: 100dvh; display: flex; flex-direction: column; }
.start { background: linear-gradient(180deg, #fff 0%, var(--slate) 55%, var(--sand) 100%); padding: calc(var(--sat) + 1.25rem) max(1.25rem, var(--sar)) calc(var(--sab) + 1.5rem) max(1.25rem, var(--sal)); }
.start-brand { text-align: center; }
.start-brand img { width: 200px; height: auto; }
.start-brand.small img { width: 150px; }
.start-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .9rem; max-width: 420px; margin: 0 auto; width: 100%; }
.portrait-wrap { width: min(62vw, 240px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; box-shadow: 0 20px 50px rgba(0, 82, 155, .18), 0 0 0 6px #fff; background: var(--sand); }
.portrait { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
/* The avatar's idle recording (public.js setupIdleLoop) lies over the portrait and fades in once it really
   plays, so a still photo is what shows until then. Both are framed the same way, so nothing shifts. */
.portrait-wrap, .vz-portrait-button { position: relative; }
.vz-idle-loop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; opacity: 0; transition: opacity .8s ease; }
.vz-idle-loop.ready { opacity: 1; }
.start h1 { font-size: clamp(1.5rem, 6vw, 2rem); color: var(--midnight); font-weight: 700; }
.lede { margin: 0; color: var(--muted); max-width: 32ch; }
.call-btn { margin-top: .5rem; display: inline-flex; align-items: center; gap: .75rem; background: var(--ok); color: #fff; border: none; border-radius: 999px; padding: 1rem 2rem; font-size: 1.15rem; font-weight: 600; box-shadow: 0 12px 30px rgba(21, 128, 61, .35); transition: transform .08s; }
.call-btn:active { transform: scale(.97); }
.call-btn:disabled { opacity: .6; }
.call-icon { width: 1.4rem; height: 1.4rem; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15 15 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.6 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.6 3.6a1 1 0 0 1-.25 1z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15 15 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.6 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.6 3.6a1 1 0 0 1-.25 1z'/%3E%3C/svg%3E") center/contain no-repeat; }
.note { font-size: .8rem; color: var(--muted); margin: 0; max-width: 34ch; }
/* Leads turned off (Admin → Settings): just the agent and the Call button */
body.no-leads #screen-start .start-brand, body.no-leads #screen-start .lede, body.no-leads #startNote { display: none; }

/* ---------- call ---------- */
/* The call looks like the admin's test call (the FaceTime look): a black page, and inside the stage the soft-focus
   room (background.jpg) behind the avatar. Phones in portrait: edge to edge. Anything wider (desktop, tablets in
   landscape, phones in landscape): the admin's portrait phone frame. */
.call { position: relative; height: 100dvh; min-height: 0; background: #05060a; overflow: hidden; }
.call-layout { position: relative; height: 100%; }
.stage { position: relative; height: 100%; overflow: hidden; background: #000; isolation: isolate; }
.stage::before { content: ""; position: absolute; inset: 0; background: url("/static/background.jpg") center / cover no-repeat; z-index: 0; }
.stage video, .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; z-index: 1; }
.poster { filter: brightness(.6); transition: opacity .6s; animation: breathe 2.4s ease-in-out infinite; }
.stage.live .poster { opacity: 0; animation: none; }
@keyframes breathe { 50% { filter: brightness(.4); } }
/* Protoface: a square frame with the avatar's portrait padded into it. public.js measures that padding and
   scales it away (--video-zoom) so the picture fills the width at the top edge; the space left below it is
   black, with the picture fading into it over --video-aspect (the picture's own shape). */
/* A padded square frame: the near-white bars are scaled away (--video-zoom) until the picture itself fills
   the width, it sits at the top edge, and what is left below it is black with the picture fading into it. */
.stage.padded-video { background: #000; }
.stage.padded-video::before { display: none; }
.stage.padded-video video { object-fit: contain; object-position: center top;
  transform: scale(var(--video-zoom, 1)); transform-origin: 50% 0; }
/* the picture's own shape, so the fade ends exactly where it does and black carries on below */
.stage.padded-video.has-gap.live::after { content: ""; position: absolute; top: 0; left: 0; right: 0;
  aspect-ratio: var(--video-aspect, 1); background: linear-gradient(180deg, transparent 74%, #000);
  z-index: 1; pointer-events: none; }

.stage.top-video { background: #000; }
.stage.top-video::before { display: none; }          /* no room background behind it */
.stage.top-video video { object-fit: contain; object-position: center top;
  transform: scale(var(--video-zoom, 1)); transform-origin: 50% 0; }
.stage.top-video.has-gap.live::after { content: ""; position: absolute; top: 0; left: 0; right: 0;
  aspect-ratio: var(--video-aspect, 1); background: linear-gradient(180deg, transparent 78%, #000); z-index: 1; pointer-events: none; }

/* LAM backend: the transparent WebGL avatar fills the stage over the page's room background */
/* clip-path (not only border-radius) also clips the GPU-composited canvas in the rounded frame */
.avatar-stage { position: absolute; inset: 0; z-index: 1; border-radius: var(--stage-radius, 0px); clip-path: inset(0 round var(--stage-radius, 0px)); transition: opacity .6s; }
/* while ringing the portrait poster shows; the avatar appears when the agent answers (like the video in LemonSlice) */
.stage:not(.live) .avatar-stage { opacity: 0; }
.avatar-stage canvas { display: block; }
.stage-top, .captions, .controls { z-index: 2; }
.audio-unlock { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 3; display: inline-flex; align-items: center; gap: .55rem; padding: .85rem 1.4rem; border: 0; border-radius: 999px; background: rgba(0,0,0,.62); color: #fff; font: inherit; font-weight: 600; font-size: 1.05rem; cursor: pointer; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: audio-unlock-pulse 1.8s ease-in-out infinite; }
.audio-unlock .ico-sound { width: 1.25rem; height: 1.25rem; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 5 6 9H2v6h4l5 4V5z'/%3E%3Cpath d='M15.5 8.5a5 5 0 0 1 0 7'/%3E%3Cpath d='M19 5a10 10 0 0 1 0 14'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 5 6 9H2v6h4l5 4V5z'/%3E%3Cpath d='M15.5 8.5a5 5 0 0 1 0 7'/%3E%3Cpath d='M19 5a10 10 0 0 1 0 14'/%3E%3C/svg%3E") center / contain no-repeat; }
@keyframes audio-unlock-pulse { 50% { box-shadow: 0 0 0 .6rem rgba(255,255,255,.12); } }
.stage-top { position: absolute; top: 0; left: 0; right: 0; padding: calc(var(--sat) + .9rem) calc(var(--sar) + 1rem) 2.5rem calc(var(--sal) + 1rem); background: linear-gradient(180deg, rgba(0,0,0,.55), transparent); color: #fff; text-align: center; pointer-events: none; transition: opacity .4s; }
.stage-name { font-size: 1.35rem; font-weight: 600; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.stage-status { font-size: .9rem; opacity: .9; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.timer { font-variant-numeric: tabular-nums; }

/* captions: subtitles over the call, newest at the bottom, older fade */
.captions { position: absolute; left: calc(var(--sal) + .75rem); right: calc(var(--sar) + .75rem); bottom: calc(var(--sab) + 7.2rem); display: flex; flex-direction: column; justify-content: flex-end; gap: .35rem; pointer-events: none; max-height: 42%; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, transparent, #000 22%); mask-image: linear-gradient(180deg, transparent, #000 22%); }
.captions.off { display: none; }
/* a page of the business's website the agent pointed to (find_website_page) */
.page-card { position: absolute; left: 50%; transform: translateX(-50%); top: calc(var(--sat) + 5.2rem); z-index: 5; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: .15rem .5rem; width: min(92%, 24rem); padding: .6rem .45rem .5rem .85rem; border-radius: 16px; background: rgba(255, 255, 255, .96); color: #0b1220; box-shadow: 0 8px 28px rgba(0,0,0,.3); }
.page-card[hidden] { display: none; }
.page-card-text { display: flex; flex-direction: column; min-width: 0; }
.page-card-title { font-weight: 600; font-size: .95rem; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.page-card-host { font-size: .75rem; opacity: .65; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-card-open { display: inline-flex; align-items: center; gap: .35rem; padding: .5rem .8rem; border-radius: 999px; background: #5b4ff5; color: #fff; font-size: .85rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.page-card-open:hover { background: #4b3fe6; }
.page-card-open:focus-visible { outline: 3px solid #a7a2ff; outline-offset: 2px; }
.page-card-open svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.page-card-note { grid-column: 1 / -1; margin: .1rem 0 0; font-size: .72rem; opacity: .65; }
.page-card-close { flex: none; width: 2rem; height: 2rem; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 1.2rem; cursor: pointer; }
.cap { align-self: flex-start; max-width: 92%; padding: .45rem .75rem; border-radius: 14px; background: rgba(2, 6, 23, .6); color: #fff; font-size: 1.02rem; line-height: 1.35; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); text-shadow: 0 1px 2px rgba(0,0,0,.5); transition: opacity .6s, transform .3s; word-wrap: break-word; }
.cap.you { align-self: flex-end; background: rgba(0, 82, 155, .72); }
.cap .who { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; opacity: .75; margin-bottom: .1rem; }
.cap.partial { opacity: .85; }
.cap.old { opacity: .35; }
.cap.gone { opacity: 0; transform: translateY(-6px); }
/* links in captions/transcript: site pages open in a new tab, booking opens the form in the call */
.cap a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; pointer-events: auto; word-break: break-word; }
.cap a.book-link { color: var(--gold); }



.controls { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; align-items: flex-end; gap: 1.6rem; padding: 1.5rem 1rem calc(var(--sab) + 1.1rem); background: linear-gradient(0deg, rgba(0,0,0,.6), transparent); transition: opacity .4s; }
.stage.idle .controls, .stage.idle .stage-top { opacity: 0; }
.ctl { display: flex; flex-direction: column; align-items: center; gap: .35rem; background: none; border: none; color: #fff; padding: 0; }
.ctl .ico { width: 3.6rem; height: 3.6rem; border-radius: 50%; background: rgba(255,255,255,.22); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); display: grid; place-items: center; position: relative; transition: background .15s, transform .08s; }
.ctl:active .ico { transform: scale(.94); }
.ctl .ico::after { content: ""; width: 1.55rem; height: 1.55rem; background: #fff; -webkit-mask: var(--m) center/contain no-repeat; mask: var(--m) center/contain no-repeat; }
.ctl.end .ico { background: #ef4444; width: 4.2rem; height: 4.2rem; }
.ctl[aria-pressed="true"]:not(.end) .ico { background: #fff; }
.ctl[aria-pressed="true"]:not(.end) .ico::after { background: var(--midnight); }
.ctl-label { font-size: .72rem; opacity: .9; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.ico-mic { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 15a4 4 0 0 0 4-4V6a4 4 0 0 0-8 0v5a4 4 0 0 0 4 4zm6-4a6 6 0 0 1-12 0H4a8 8 0 0 0 7 7.93V22h2v-3.07A8 8 0 0 0 20 11z'/%3E%3C/svg%3E"); }
#muteBtn[aria-pressed="true"] .ico-mic { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 11h-1.7a5.3 5.3 0 0 1-.4 2l1.2 1.2c.5-1 .9-2 .9-3.2zM14.9 11.1V6a3 3 0 0 0-6 0v.2l6 6zM4.3 3 3 4.3l6 6V11a3 3 0 0 0 3 3c.4 0 .8-.1 1.2-.2l1.7 1.7a5.4 5.4 0 0 1-2.9.8 5.2 5.2 0 0 1-5.2-5.3H5a7 7 0 0 0 6 6.9V21h2v-3.1c.9-.1 1.8-.4 2.6-.9l4.2 4.2 1.3-1.3L4.3 3z'/%3E%3C/svg%3E"); }
.ico-end { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 9c-1.6 0-3.15.25-4.6.72v3.1c0 .4-.23.74-.56.9-1 .5-1.9 1.13-2.7 1.87a1 1 0 0 1-1.4 0L.29 13.15a1 1 0 0 1 0-1.4A16.97 16.97 0 0 1 12 7c4.6 0 8.78 1.8 11.71 4.75a1 1 0 0 1 0 1.4l-2.45 2.44a1 1 0 0 1-1.4 0 11.4 11.4 0 0 0-2.7-1.87.99.99 0 0 1-.56-.9v-3.1C15.15 9.25 13.6 9 12 9z'/%3E%3C/svg%3E"); }
.ico-translate { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4.5 3h15A2.5 2.5 0 0 1 22 5.5v10a2.5 2.5 0 0 1-2.5 2.5H12l-5.2 3.9V18H4.5A2.5 2.5 0 0 1 2 15.5v-10A2.5 2.5 0 0 1 4.5 3z' fill='none' stroke='black' stroke-width='1.7' stroke-linejoin='round'/%3E%3Ctext x='4.6' y='14' font-family='Arial,Helvetica,sans-serif' font-size='8.6' font-weight='700'%3EA%3C/text%3E%3Ctext x='11.4' y='14' font-family='sans-serif' font-size='8' font-weight='700'%3E%E6%96%87%3C/text%3E%3C/svg%3E"); }
#langBtn[aria-expanded="true"] .ico { background: #fff; }
#langBtn[aria-expanded="true"] .ico::after { background: var(--midnight); }
/* in-call language menu (flag grid, like iOS): choosing a language restarts the call in that language */
.lang-menu { position: absolute; z-index: 5; left: 50%; bottom: calc(var(--sab) + 7.6rem); transform: translateX(-50%); width: min(26rem, calc(100% - 1.5rem)); max-height: calc(100% - 13rem); overflow-y: auto; padding: .6rem; border: 1px solid rgba(255,255,255,.5); border-radius: 22px; background: rgba(247,250,250,.96); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); box-shadow: 0 16px 60px rgba(7,29,57,.35); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .35rem; animation: lang-rise .22s cubic-bezier(.2,.8,.2,1); }
.lang-menu[hidden] { display: none; }
.lang-menu button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; min-width: 0; min-height: 4.6rem; padding: .5rem .25rem; border: 1px solid transparent; border-radius: 14px; background: transparent; color: #193b50; font-size: .8rem; line-height: 1.2; }
.lang-menu button .flag { font-size: 1.6rem; line-height: 1.1; }
.lang-menu button .flag-code { display: grid; place-items: center; width: 2.1rem; height: 1.6rem; border-radius: 5px; background: #193b50; color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .04em; }
.lang-menu button:hover { background: #e7eff2; }
.lang-menu button[aria-checked="true"] { background: #e2edf0; border-color: #8daebd; font-weight: 600; }
.lang-menu button[aria-checked="true"]::after { content: "✓"; position: absolute; top: .3rem; inset-inline-end: .45rem; font-size: .75rem; }
.lang-menu button:focus-visible { outline: 3px solid #57b3d5; outline-offset: 2px; }
@keyframes lang-rise { from { opacity: 0; transform: translate(-50%, 12px) scale(.96); } }
@media (prefers-reduced-motion: reduce) { .lang-menu { animation: none; } }
.ico-cc { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zm-9 7H9.5v-.5h-2v3h2V13H11v1a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1v-4a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v1zm7 0h-1.5v-.5h-2v3h2V13H18v1a1 1 0 0 1-1 1h-3a1 1 0 0 1-1-1v-4a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v1z'/%3E%3C/svg%3E"); }


/* ---- anything wider than a portrait phone: centred portrait frame ---- */
@media (min-aspect-ratio: 4/5) {
  .call-layout { display: grid; place-items: center; padding: calc(var(--sat) + 1rem) calc(var(--sar) + 1rem) calc(var(--sab) + 1rem) calc(var(--sal) + 1rem); }
  /* the same phone frame as the admin's test call */
  .stage { width: min(430px, 100%); height: min(92vh, 900px); max-height: 100%; border-radius: 36px; --stage-radius: 36px; box-shadow: 0 0 0 10px #16181d, 0 30px 80px #000; }
  .stage-top { padding-top: 1.1rem; }
  .controls { padding-bottom: 1.1rem; }
  .captions { bottom: 6.6rem; left: .6rem; right: .6rem; }
}
/* phones in landscape: the frame is short, so compact controls and captions */
@media (min-aspect-ratio: 4/5) and (max-height: 500px) {
  .call-layout { padding: .5rem calc(var(--sar) + .5rem) .5rem calc(var(--sal) + .5rem); }
  .stage { width: auto; height: 100%; aspect-ratio: 2 / 3; border-radius: 18px; --stage-radius: 18px; box-shadow: 0 0 0 6px #16181d, 0 16px 40px #000; }
  .stage-top { padding: .5rem .5rem 1.5rem; } .stage-name { font-size: 1rem; } .stage-status { font-size: .75rem; }
  .controls { gap: .9rem; padding: .6rem .5rem .6rem; }
  .ctl .ico { width: 2.6rem; height: 2.6rem; } .ctl.end .ico { width: 3rem; height: 3rem; } .ctl .ico::after { width: 1.2rem; height: 1.2rem; } .ctl-label { display: none; }
  .captions { bottom: 4.2rem; max-height: 34%; }
  .lang-menu { bottom: 4rem; max-height: calc(100% - 5rem); }
  .lang-menu button { min-height: 3.2rem; }
  .cap { font-size: .82rem; padding: .3rem .55rem; }
}

.stage.square-video video { object-fit: contain; object-position: center 38%; }

/* ---------- post-call cards ---------- */
.card-screen { background: linear-gradient(180deg, #fff 0%, var(--slate) 60%, var(--sand) 100%); padding: calc(var(--sat) + 1.1rem) max(1rem, var(--sar)) calc(var(--sab) + 1.5rem) max(1rem, var(--sal)); align-items: center; gap: 1.25rem; }
.card { background: #fff; border-radius: 22px; box-shadow: 0 16px 50px rgba(2, 6, 23, .1); padding: 1.6rem 1.25rem; width: 100%; max-width: 440px; text-align: center; display: flex; flex-direction: column; gap: .8rem; }
.card.wide { max-width: 560px; text-align: start; }
.card h2 { font-size: 1.45rem; color: var(--midnight); }
.card-avatar img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; object-position: top; margin: 0 auto; display: block; box-shadow: 0 0 0 4px var(--sand); }
.lead { margin: 0; font-size: 1.05rem; }
.lead.strong { font-weight: 600; color: var(--blue); margin-top: .5rem; }
.check-mark { width: 64px; height: 64px; border-radius: 50%; background: var(--gold); color: var(--midnight); font-size: 2rem; font-weight: 700; display: grid; place-items: center; margin: 0 auto; }
.form { display: flex; flex-direction: column; gap: .8rem; text-align: start; }
.field { display: flex; flex-direction: column; gap: .3rem; font-size: .9rem; font-weight: 600; color: var(--ink); }
.field input, .field select, .field textarea { font: inherit; font-weight: 400; font-size: 16px; padding: .75rem .85rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.field.invalid input, .field.invalid select { border-color: var(--danger); }
.two { display: grid; grid-template-columns: 1fr; gap: .8rem; }
@media (min-width: 480px) { .two { grid-template-columns: 1fr 1fr; } }
.consent { display: flex; gap: .6rem; align-items: flex-start; font-size: .88rem; color: #334155; }
.consent input { width: 1.15rem; height: 1.15rem; margin-top: .1rem; accent-color: var(--blue); flex-shrink: 0; }
.consent.invalid { color: var(--danger); }
.hp { position: absolute; left: -9999px; opacity: 0; }
.btn { border: none; border-radius: 12px; padding: .9rem 1.2rem; font-weight: 600; font-size: 1rem; width: 100%; }
.btn.primary { background: var(--gold); color: var(--midnight); box-shadow: 0 8px 20px rgba(212, 175, 55, .35); }
.btn.primary:hover { background: var(--gold-dark); }
.btn.primary:disabled { opacity: .6; }
.btn.ghost { background: transparent; color: var(--blue); }
.field-error { color: var(--danger); font-size: .88rem; margin: 0; }
.fineprint { font-size: .75rem; color: var(--muted); margin: 0; }
.trust { list-style: none; padding: 0; margin: .25rem 0 0; display: grid; gap: .4rem; grid-template-columns: 1fr; font-size: .85rem; color: #334155; }
.trust li { background: var(--slate); border: 1px solid var(--line); border-radius: 12px; padding: .5rem .75rem; }
.trust li::before { content: "✓ "; color: var(--blue); font-weight: 700; }
@media (min-width: 480px) { .trust { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); } }
.trust li:empty, .trust:not(:has(li:not(:empty))) { display: none; }   /* an agent without promises shows none */

/* language picker: compact pill; the invisible native select on top gives the platform's own list */
.lang-picker { position: fixed; z-index: 30; top: calc(var(--sat) + .7rem); inset-inline-end: calc(var(--sar) + .7rem); display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .7rem; border-radius: 999px; background: rgba(255,255,255,.88); border: 1px solid var(--line); color: var(--ink); font-size: .82rem; font-weight: 600; letter-spacing: .03em; box-shadow: 0 4px 14px rgba(2,6,23,.08); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.lang-picker { cursor: pointer; font: inherit; font-size: .86rem; font-weight: 600; letter-spacing: 0; padding: .4rem .75rem .4rem .6rem; }
.lang-picker:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.lang-current { display: inline-flex; align-items: center; gap: .45rem; }
.lang-current .flag { font-family: var(--vz-flags); font-size: 1.05rem; line-height: 1; }
.lang-current .flag-code { font-size: .68rem; padding: .1rem .3rem; border-radius: 4px; background: currentColor; color: transparent; text-shadow: 0 0 0 #fff; }
.lang-caret { width: .5rem; height: .5rem; margin: -.2rem .1rem 0 .1rem; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); opacity: .7; }
body.in-call .lang-picker { display: none; }

/* the consultation form over a running call */
.screen.overlay { position: fixed; inset: 0; z-index: 40; min-height: 0; overflow-y: auto; overscroll-behavior: contain; background: rgba(2, 6, 23, .62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.screen.overlay .start-brand { display: none; }
.screen.overlay .card { margin: auto 0; }
.card-close { display: none; }
.screen.overlay .card-close { display: grid; place-items: center; position: sticky; top: .25rem; align-self: flex-end; margin: -.6rem -.35rem -2.9rem 0; width: 2.5rem; height: 2.5rem; border: none; border-radius: 50%; background: var(--slate); color: var(--ink); font-size: 1.5rem; line-height: 1; z-index: 1; box-shadow: 0 2px 8px rgba(2, 6, 23, .12); }
[dir="rtl"] .screen.overlay .card-close { margin: -.6rem 0 -2.9rem -.35rem; }
.screen.overlay .card-close:hover { background: var(--line); }
.screen.overlay .card.wide h2 { padding-inline-end: 2.75rem; }
/* sent during the call: a short success state, then the form closes by itself */
.form-success { display: none; }
.card.sent > :not(.form-success) { display: none; }
.card.sent .form-success { display: flex; flex-direction: column; align-items: center; gap: .9rem; padding: 1.5rem 0; text-align: center; animation: success-in .25s ease-out; }
.card.sent .check-mark { animation: success-pop .5s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes success-in { from { opacity: 0; transform: scale(.96); } }
@keyframes success-pop { 0% { transform: scale(.3); opacity: 0; } 70% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }

.toast { position: fixed; left: 50%; bottom: calc(var(--sab) + 1rem); transform: translateX(-50%); background: var(--midnight); color: #fff; padding: .7rem 1rem; border-radius: 12px; z-index: 50; max-width: calc(100vw - 2rem); box-shadow: 0 10px 30px rgba(0,0,0,.35); font-size: .95rem; }
.toast.error { background: #7f1d1d; }
/* during a call, above the captions/controls so End stays reachable */
body.in-call .toast { bottom: auto; top: calc(var(--sat) + 8rem); }

/* a flag drawn as an image where the language has no emoji flag (web/flags/ku.svg): the size of the emoji ones */
.flag img, .lang-pop-flag img, .lang-current .flag img { display: inline-block; width: 1.1em; height: auto; border-radius: 2px; vertical-align: -.08em; }
.lang-menu button .flag img { width: 2.1rem; }

/* the free trial's time left during a call (web/public.js trialBadge) */
.trial-left { display: inline-block; margin-left: 8px; padding: 1px 9px; border-radius: 999px; background: rgba(101, 91, 255, .28);
  color: #e8e6ff; font-size: .78rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.trial-left.low { background: rgba(240, 180, 41, .3); color: #ffe7a6; }


/* credits (web/public.js creditProblem): the way on, "Buy credits" or a company's website, in the note under the Call
   button and in the passing message */
#startError a, .toast a { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.vz-chat-log .vz-msg-text a { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
