/* The voice layout of the page (/book), on top of app.css and under v4.css: one screen that never scrolls. The header,
   the progress, what's chosen so far, one block for the current step (it scrolls inside when it's long, like a day's
   trains) and the mic. */

.vapp{height:100%;height:100dvh}
.vmain{flex:1;min-height:0;display:flex;flex-direction:column;gap:14px;width:100%;max-width:640px;margin:0 auto;padding:16px max(16px,env(safe-area-inset-right,0px)) 0 max(16px,env(safe-area-inset-left,0px))}

/* Progress: the same three steps as /book, large */
.vprog{flex:none}
.vprog .steps{max-width:none}
.vprog .steps ol{gap:10px}
.vprog .step{align-items:stretch;gap:8px;padding:4px 2px;font-size:16px;line-height:1.25}
.vprog .step .bar{height:10px;border-radius:5px}
.vprog .step .bar s{border-radius:5px}
.vprog .step .st-l{justify-content:center;gap:6px}
.vprog .step[aria-current="step"]{color:var(--brand-ink);font-weight:500}
.vprog .step[aria-current="step"] .bar{box-shadow:0 0 0 3px var(--brand-soft)}

/* What's chosen so far */
.vsum{flex:none;display:flex;flex-wrap:wrap;align-items:center;gap:6px;min-height:32px;max-height:70px;overflow:hidden}
.vs-i{height:32px;padding:0 12px;border-radius:16px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--line);font-size:14px;font-weight:500;white-space:nowrap;font-variant-numeric:tabular-nums;transition:box-shadow .15s,color .15s}
.vs-i:not(:disabled):hover{box-shadow:inset 0 0 0 1px var(--brand);color:var(--brand-ink)}
.vs-i:disabled{color:var(--ink)}
.vs-tot{margin-left:auto;padding-left:6px;font-size:18px;font-weight:500;font-variant-numeric:tabular-nums}
.vs-empty{font-size:14px;color:var(--muted)}

/* The block: one card at a time, as tall as it needs and no taller than the space */
.vstage{flex:1;min-height:0;display:flex;flex-direction:column}
.vstage:empty{display:none}
.vstage>.card{flex:0 1 auto;min-height:0;max-height:100%;overflow-y:auto;overscroll-behavior:contain;animation:vin .22s ease-out}
@keyframes vin{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
/* Long lists scroll inside the card, under its title */
.vstage>.vtrain-card,.vstage>.vroute{overflow:hidden}
.vtrain-card>.vtrains,.vroute>.city-list{flex:0 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain}
.vroute>.city-list{margin:0 -4px;padding:0 4px 2px}

/* The day's trains, short rows */
.vtrains{list-style:none;margin:0 -16px -16px;padding:0;border-top:1px solid var(--line)}
.vtrains>li+li{border-top:1px solid var(--line)}
.vtr{width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px 12px;padding:12px 16px;text-align:left;transition:background .15s}
.vtr:hover{background:var(--surface-2)}
.vtr.sel{background:var(--brand-soft)}
.vtr-t{display:flex;align-items:center;gap:10px;font-size:19px;font-weight:500;font-variant-numeric:tabular-nums}
.vtr-p{text-align:right;font-size:17px;font-weight:500;white-space:nowrap;font-variant-numeric:tabular-nums}
.vtr-p small{margin-right:4px;font-size:13px;font-weight:400;color:var(--ink-2)}
.vtr-m{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:center;gap:2px 10px;font-size:13px;color:var(--ink-2)}

/* Options (cities, fares, stations) on the card's grey: white, with a line */
.vstage .opt{background:var(--bg);box-shadow:inset 0 0 0 1px var(--line)}
.vstage .opt:hover{background:var(--surface-2)}
.vstage .opt[aria-pressed="true"]{background:var(--brand-soft);box-shadow:inset 0 0 0 2px var(--brand)}
.vopts{display:flex;flex-direction:column;gap:8px}
.vopts .opt{padding:12px 14px}
/* The details: the pay button (or what's still missing) stays in sight while the form scrolls */
.vstage>.card [data-pay],.vstage>.card .pay-hint{position:sticky;bottom:0;z-index:1}
.vstage>.card .pay-hint{background:var(--surface);box-shadow:0 -14px 0 var(--surface)}
.vstage>.card [data-pay]{box-shadow:0 -14px 0 var(--surface),0 16px 0 var(--surface)}

/* The mic: the one button. It glows with the voice level (--lvl, 0 to 1): blue while Chloe speaks, green while you do */
.vdock{flex:none;display:flex;justify-content:center;padding:16px 16px calc(20px + env(safe-area-inset-bottom,0px))}
.vmic{--lvl:0;--glow:var(--brand);position:relative;width:76px;height:76px;border-radius:50%;background:var(--brand);color:var(--on-brand);display:grid;place-items:center;box-shadow:0 8px 22px rgba(22,93,246,.3);transition:background .2s,transform .12s}
.vmic:hover{background:var(--brand-hover)}
.vmic:active{transform:scale(.96)}
.vmic:focus-visible{outline-offset:6px}
.vmic svg{width:30px;height:30px}
.vmic::before,.vmic::after{content:"";position:absolute;inset:0;border-radius:50%;pointer-events:none}
/* Behind the button (no stacking context of its own), so the glow never tints it */
.vmic::before{z-index:-1;background:var(--glow);filter:blur(12px);opacity:calc(var(--lvl) * .85);transform:scale(calc(1.05 + var(--lvl) * .7))}
.vmic.listening{--glow:var(--ok)}
.vmic.speaking{--glow:var(--brand)}
/* In a conversation: a ring around it; while connecting the ring breathes */
.vmic:not(.idle)::after{box-shadow:0 0 0 3px var(--bg),0 0 0 6px var(--glow)}
.vmic.thinking::after{animation:vbreath 1.2s ease-in-out infinite}
@keyframes vbreath{50%{opacity:.3}}

.voice-ui .toast{bottom:calc(124px + env(safe-area-inset-bottom,0px))}

@media (max-width:620px){
  .vmain{gap:12px;padding-top:12px}
  .vprog .step{font-size:15px}
}
@media (max-height:700px){
  .vmain{gap:10px;padding-top:10px}
  .vprog .step .bar{height:8px}
  .vdock{padding-top:10px;padding-bottom:calc(12px + env(safe-area-inset-bottom,0px))}
  .vmic{width:64px;height:64px}
  .vmic svg{width:26px;height:26px}
}
@media (prefers-reduced-motion:reduce){
  .vmic::before{transform:none}
}
