/*
 * visits · area styles: the Visits tab, booking (book.js) and the visit loop
 * (visit.js). Built on the shared tokens and components; nothing here
 * restyles a shared component outside this area's own classes.
 */

/* ── Visit cards ────────────────────────────────────────────────────────── */
.vlist {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  margin: 0 var(--s4);
}
.vcard {
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--e1);
  overflow: hidden;
}
.vcard.is-soon {
  box-shadow: var(--e1), inset 0 0 0 1.5px color-mix(in srgb, var(--brand) 40%, transparent);
}
.vcard-main {
  display: flex;
  align-items: center;
  gap: var(--s3);
  width: 100%;
  padding: var(--s4);
  text-align: left;
  transition: background var(--d-press) var(--ease-out);
}
.vcard-main:active {
  background: var(--surface-sunken);
}
.vcard-main > .grow {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.vcard-when {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-foot);
  font-weight: 600;
  color: var(--brand-ink);
}
.vcard-name {
  display: block;
}
.vcard-sub {
  display: block;
}
.vcard-cta {
  padding: 0 var(--s4) var(--s4);
}

/* Two facts side by side (when / how) */
.vd-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s4);
  padding-top: var(--s4);
  border-top: 0.5px solid var(--line);
}
.vd-facts .eyebrow {
  display: block;
  margin-bottom: 4px;
}
.vd-mode {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ts-xl .vd-facts,
.ts-ax .vd-facts {
  grid-template-columns: minmax(0, 1fr);
}

.vbullets {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
.vbullets li {
  position: relative;
  padding-left: 18px;
  line-height: 1.45;
}
.vbullets li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Banners inside sheets sit flush with the sheet's padding */
.vs .banner,
.bleed-x .banner {
  margin-left: 0;
  margin-right: 0;
}

/* ── Radio rows (one choice in a group) ─────────────────────────────────── */
.vpick[aria-checked="true"] {
  background: color-mix(in srgb, var(--brand-tint) 70%, var(--surface));
}
.vpick .vradio {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--line-strong);
  transition: box-shadow var(--d-fast) var(--ease-out);
}
.vpick[aria-checked="true"] .vradio {
  box-shadow: inset 0 0 0 7px var(--brand);
}
.vpick[disabled] {
  opacity: 1;
  cursor: not-allowed;
}
.vpick[disabled] .row-title,
.vpick[disabled] .row-ic {
  opacity: 0.45;
}
.vpick[disabled] .vradio {
  opacity: 0.35;
}
.vpick .row-val {
  color: var(--text-2);
  font-weight: 600;
  font-size: var(--fs-sub);
}
.crisis-line {
  display: block;
  margin-top: 4px;
  color: #5b54c9;
  font-weight: 600;
}
.hc .crisis-line {
  color: #3f38a8;
}

/* Emergency signs */
.vsigns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.vsigns li {
  position: relative;
  padding-left: 20px;
  font-size: var(--fs-body);
  line-height: 1.35;
}
.vsigns li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.5em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
}

/* ── Providers ──────────────────────────────────────────────────────────── */
.plist {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  margin: 0 var(--s4);
}
.pcard {
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--e1);
  padding: var(--s2) var(--s4) var(--s4);
}
.pcard-main {
  display: flex;
  align-items: center;
  gap: var(--s3);
  width: calc(100% + 2 * var(--s4));
  margin: 0 calc(-1 * var(--s4));
  padding: var(--s2) var(--s4);
  text-align: left;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.pcard-main:active {
  background: var(--surface-sunken);
}
.pcard-main > .grow {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pcard-meta {
  margin-top: 2px;
}
.pcard-pills {
  margin-top: var(--s2);
}
.vrating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-sub);
}
.vrating .vstar-ic {
  color: #b7791f;
  fill: #f2c94c;
}
.vrating .muted {
  font-weight: 400;
}

/* Time chips */
.vslots {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}
.chip.vslot {
  min-height: var(--tap);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--brand-ink);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 35%, var(--line-strong));
}
.chip.vslot.more {
  color: var(--text-2);
  font-weight: 500;
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.chip.vslot[aria-pressed="true"] {
  color: #fff;
  background: var(--brand);
  box-shadow: none;
}

/* Provider profile header */
.vprof {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--s3) var(--gutter) 0;
}
.vprof .av.xl {
  width: 96px;
  height: 96px;
}
.vprof .av-wrap .presence {
  width: 18px;
  height: 18px;
  right: 4px;
  bottom: 4px;
}

/* ── Week strip ─────────────────────────────────────────────────────────── */
.vweek-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s2);
}
.vweek-h .icon-btn {
  background: var(--card);
  box-shadow: var(--e1);
}
.vdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.vday {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 64px;
  border-radius: var(--r);
  background: var(--card);
  box-shadow: var(--e1);
  transition: background var(--d-fast) var(--ease-out), color var(--d-fast) var(--ease-out);
}
.vday-w {
  font-size: var(--fs-cap);
  font-weight: 600;
  color: var(--text-2);
}
.vday-n {
  font-size: var(--fs-t3);
  font-weight: 700;
}
.vday[disabled] {
  background: transparent;
  box-shadow: none;
  cursor: default;
}
.vday[disabled] .vday-n {
  color: var(--slate-400);
  font-weight: 500;
}
.hc .vday[disabled] .vday-n {
  color: var(--slate-500);
}
.vday.on {
  background: var(--brand);
  color: #fff;
}
.vday.on .vday-w {
  color: rgba(255, 255, 255, 0.82);
}
.vday-dot {
  position: absolute;
  bottom: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.vday.on .vday-dot {
  background: #fff;
}
.ts-ax .vdays {
  gap: 3px;
}
.ts-ax .vday {
  min-height: 72px;
  border-radius: 10px;
}
.vtimes .eyebrow {
  display: block;
}

/* ── Intake: severity ───────────────────────────────────────────────────── */
.vsev-read {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.vsev-read .pill {
  margin-left: var(--s2);
  align-self: center;
}
.vsev {
  --p: 0%;
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: var(--tap);
  margin: var(--s2) 0 0;
  background: transparent;
  cursor: pointer;
}
.vsev::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--brand) var(--p), var(--slate-200) var(--p));
}
.vsev::-moz-range-track {
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--brand) var(--p), var(--slate-200) var(--p));
}
.vsev::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 30px;
  height: 30px;
  margin-top: -11px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25), 0 0 0 0.5px rgba(15, 23, 42, 0.08);
}
.vsev::-moz-range-thumb {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25);
}
.vsev:focus-visible {
  outline: none;
}
.vsev:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 40%, transparent), 0 2px 8px rgba(15, 23, 42, 0.25);
}
.vsev-scale {
  display: flex;
  justify-content: space-between;
}
.section.vinvalid .chip {
  box-shadow: inset 0 0 0 1px var(--danger);
}
.section [data-sym-err] .field-err {
  margin-top: var(--s3);
}

/* ── Review: consent checkbox ───────────────────────────────────────────── */
.vconsent .vcbox {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: inset 0 0 0 2px var(--line-strong);
  transition: background var(--d-fast) var(--ease-out);
}
.vconsent[aria-checked="true"] .vcbox {
  background: var(--brand);
  box-shadow: none;
}
.section.vinvalid .vconsent .vcbox {
  box-shadow: inset 0 0 0 2px var(--danger);
}
.section.vinvalid .group {
  box-shadow: var(--e1), inset 0 0 0 1px var(--danger);
}

/* ── Booked ─────────────────────────────────────────────────────────────── */
.booked-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--s6) var(--gutter) var(--s2);
}
.booked-check {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--ok);
  box-shadow: 0 0 0 10px var(--ok-tint);
  animation: v-booked-pop 520ms var(--ease-ios) both;
}
@keyframes v-booked-pop {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .booked-check {
    animation: none;
  }
}

/* ── Get ready ──────────────────────────────────────────────────────────── */
.vcheck {
  align-items: flex-start;
  padding-top: 14px;
  padding-bottom: 14px;
}
.vcheck .row-main {
  display: flex;
  flex-direction: column;
}
.vcheck .btn-ghost.btn-sm {
  padding-left: 0;
  margin-left: 0;
}
.av-test {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-top: var(--s3);
  flex-wrap: wrap;
}
.av-test[hidden] {
  display: none;
}
.av-test-cam {
  width: 64px;
  height: 84px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(160deg, var(--teal-600), var(--navy-700));
}
.vmeter {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 28px;
}
.vmeter i {
  display: block;
  width: 5px;
  height: 30%;
  border-radius: 2px;
  background: var(--slate-300);
  transition: height 180ms var(--ease-out), background 180ms var(--ease-out);
}
.vmeter i:nth-child(odd) {
  height: 55%;
}
.vmeter i.on {
  background: var(--ok-icon);
  height: 100%;
}
.vmeter i.on:nth-child(3n) {
  height: 65%;
}

/* ── Dark screens (waiting room) ───────────────────────────────────────── */
.vdark {
  background: radial-gradient(110% 60% at 50% 0%, #1b3684 0%, var(--navy-950) 70%);
}
.vdark .nav-back,
.vdark .nav-text,
.vdark .icon-btn {
  color: #fff;
}
.vdark.scrolled .nav,
.vdark .nav.solid {
  background: color-mix(in srgb, var(--navy-950) 80%, transparent);
  box-shadow: 0 0.5px 0 rgba(255, 255, 255, 0.14);
}
.vdark .foot {
  background: color-mix(in srgb, var(--navy-950) 88%, transparent);
  box-shadow: 0 -0.5px 0 rgba(255, 255, 255, 0.12);
}
.wr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s4);
  padding: var(--s2) var(--gutter) var(--s4);
}
.wr-self {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-xl);
  display: grid;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(80% 70% at 50% 35%, #2b8f8a 0%, #13305f 70%, #0b1533 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.wr-self.off {
  background: #121a33;
}
.wr-self-av {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 34px;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.24);
}
.wr-self-tag {
  position: absolute;
  left: 14px;
  bottom: 12px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: var(--fs-foot);
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
}
.wr-tools {
  display: flex;
  gap: var(--s3);
  width: 100%;
}
.wr-tool {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: var(--tap);
  border-radius: var(--r);
  font-size: var(--fs-sub);
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}
.wr-tool[aria-pressed="true"] {
  background: #fff;
  color: var(--navy-900);
}
.wr-tool span {
  display: grid;
}
.wr-card {
  width: 100%;
  padding: var(--s5);
  border-radius: var(--r-lg);
  text-align: center;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.wr-muted {
  color: rgba(255, 255, 255, 0.78);
}
.wr-unit {
  color: rgba(255, 255, 255, 0.78);
  font-size: var(--fs-t3);
}
.wr-ic.off {
  width: 56px;
  height: 56px;
  margin: 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.12);
}
.wr-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s2) var(--s4);
  font-size: var(--fs-foot);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.86);
}
.wr-facts span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.wr-facts .ic {
  color: var(--teal-300);
}
.wr-demo {
  text-align: center;
}
.wr-demo .btn-ghost {
  color: var(--teal-200);
}
.wr-demo p {
  max-width: 30ch;
  margin: 2px auto 0;
}

/* ── The call ───────────────────────────────────────────────────────────── */
.callv {
  background: #070d22;
  color: #fff;
}
.call-remote {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(70% 50% at 50% 42%, #2a5ea8 0%, #183a78 45%, #0b1533 85%), #0b1533;
}
.call-av {
  position: relative;
  z-index: 1;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 46px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #1e3a8a;
  background: #dbeafe;
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
}
.call-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 132px;
  height: 132px;
  margin: -66px 0 0 -66px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(94, 234, 212, 0.55);
  animation: v-speak 2.4s var(--ease-out) infinite;
}
.call-ring.r2 {
  animation-delay: 1.2s;
}
@keyframes v-speak {
  from {
    transform: scale(1);
    opacity: 0.9;
  }
  to {
    transform: scale(1.55);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .call-ring {
    animation: none;
    transform: scale(1.12);
    opacity: 0.6;
  }
  .call-ring.r2 {
    display: none;
  }
}
.call-top {
  position: absolute;
  z-index: 2;
  top: calc(var(--safe-top) + 8px);
  left: var(--s4);
  right: 132px;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}
.call-top .pill {
  background: rgba(0, 0, 0, 0.32);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.call-name {
  position: absolute;
  z-index: 2;
  left: var(--gutter);
  bottom: calc(var(--safe-bottom) + 132px);
  display: flex;
  flex-direction: column;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}
.call-name .sub {
  color: rgba(255, 255, 255, 0.8);
}
.call-self {
  position: absolute;
  z-index: 2;
  top: calc(var(--safe-top) + 8px);
  right: var(--s4);
  width: 104px;
  height: 148px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  background: radial-gradient(80% 70% at 50% 35%, #2b8f8a 0%, #13305f 80%);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.call-self.off {
  background: #1a2240;
  color: rgba(255, 255, 255, 0.8);
}
.call-muted {
  position: absolute;
  left: 8px;
  bottom: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.5);
}
.call-controls {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding: var(--s4) var(--s3) calc(var(--safe-bottom) + var(--s3));
  background: linear-gradient(180deg, transparent, rgba(5, 10, 28, 0.82) 30%);
}
.vctl {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}
.vctl-b {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  transition: background var(--d-fast) var(--ease-out), transform var(--d-press) var(--ease-out);
}
.vctl:active .vctl-b {
  transform: scale(0.94);
}
.vctl[aria-pressed="true"] .vctl-b {
  background: #fff;
  color: var(--navy-900);
}
.vctl.end .vctl-b {
  background: var(--red-600);
}
.vctl-l {
  white-space: nowrap;
}
.ts-ax .vctl-l,
.ts-xl .vctl-l {
  font-size: 12px;
}
.call-lost {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--s8);
  text-align: center;
  background: rgba(7, 13, 34, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.call-lost .sub {
  color: rgba(255, 255, 255, 0.82);
}
.vspin {
  width: 40px;
  height: 40px;
  margin: 0 auto;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  animation: spin 900ms linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .vspin {
    animation-duration: 3s;
  }
}

/* ── Rate ───────────────────────────────────────────────────────────────── */
.vrate-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--s4) var(--s6) 0;
}
.vstars {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: var(--s6);
}
.vstar-btn {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--slate-400);
  transition: transform var(--d-press) var(--ease-out), color var(--d-fast) var(--ease-out);
}
.vstar-btn.on {
  color: #b7791f;
}
.vstar-btn.on .ic {
  fill: #f2c94c;
}
.vstar-btn:active {
  transform: scale(0.9);
}
.rate-word {
  min-height: 1.4em;
}

/* ── Visit summary ──────────────────────────────────────────────────────── */
.avs-signed {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: var(--s3);
  border-top: 0.5px solid var(--line);
  font-size: var(--fs-foot);
  font-weight: 600;
  color: var(--ok);
}
.avs-plan {
  display: flex;
  flex-direction: column;
}
.avs-item {
  display: flex;
  gap: var(--s3);
  padding: var(--s3) 0;
}
.avs-item + .avs-item {
  border-top: 0.5px solid var(--line);
}
.avs-item:first-child {
  padding-top: 0;
}
.avs-item:last-child {
  padding-bottom: 0;
}
.avs-item .row-ic {
  margin-top: 1px;
}
.avs-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  font-size: var(--fs-foot);
  font-weight: 600;
  color: var(--ok);
}
.avs-help {
  align-items: flex-start;
  padding-top: 14px;
  padding-bottom: 14px;
}
.avs-911 .row-title {
  font-weight: 600;
}

/* ── In-call chat ───────────────────────────────────────────────────────── */
.vcchat {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  min-height: 160px;
}
.vbub {
  max-width: 82%;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.vbub span {
  padding: 10px 14px;
  border-radius: 18px;
  font-size: var(--fs-sub);
  line-height: 1.4;
}
.vbub small {
  font-size: 12px;
  color: var(--text-2);
  padding: 0 6px;
}
.vbub.them span {
  background: var(--surface-sunken);
  border-bottom-left-radius: 6px;
}
.vbub.me {
  align-self: flex-end;
  align-items: flex-end;
}
.vbub.me span {
  background: var(--brand);
  color: #fff;
  border-bottom-right-radius: 6px;
}
.vcchat-in {
  display: flex;
  gap: var(--s2);
  align-items: center;
}
.vcchat-in .input {
  flex: 1;
  min-height: var(--tap);
  border-radius: var(--r-pill);
}
.vcchat-in .send {
  flex: none;
  background: var(--brand);
  color: #fff;
}
