/* =====================================================================
   Halflight Health · telehealth clinic on Aurora
   Adds the waiting-room card, the booking steps, the device check,
   the fee calculator, the appointment countdown and the video room.
   Everything else is Aurora's own kit. Prefix: th-.
   ===================================================================== */

.th-q { display: block; font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); }
.th-small { font-size: 13px; color: var(--faint); }
.th-sample { margin-left: auto; padding: 2px 8px; border-radius: var(--r-pill); border: 1px solid var(--line); font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }

/* ---------------------------------------------------------------- hero: copy left, waiting room right */
.th-hero { align-items: stretch; text-align: left; }
.th-hero-in { width: 100%; max-width: calc(var(--content) + 2 * var(--gutter)); margin-inline: auto; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr); gap: var(--s-7); align-items: center; }
.th-hero h1 { max-width: 12ch; }
.th-hero .lead { max-width: 34rem; }
.th-hero .hero-ctas, .th-hero .hero-links { justify-content: flex-start; }

.th-room { position: relative; display: grid; gap: var(--s-4); padding: var(--s-5); border-radius: var(--r-lg); border: 1px solid color-mix(in srgb, var(--lilac) 26%, transparent); background: linear-gradient(160deg, rgb(255 255 255 / 0.09), rgb(255 255 255 / 0.025)); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 30px 80px -30px rgb(0 0 0 / 0.8); }
.th-room::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: var(--spectrum-soft); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0.55; pointer-events: none; }
.th-room-top { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.th-live { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--st-live); box-shadow: 0 0 12px var(--st-live); }
html:not(.calm) .th-live::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--st-live); animation: th-ping 2.2s var(--ease) infinite; }
@keyframes th-ping { from { transform: scale(0.6); opacity: 0.9; } to { transform: scale(2.2); opacity: 0; } }
.th-room.closed .th-live { background: var(--st-soon); box-shadow: 0 0 12px var(--st-soon); }
.th-room.closed .th-live::after { border-color: var(--st-soon); }
.th-room-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; border-radius: var(--r-md); overflow: hidden; background: var(--line); }
.th-room-stats > div { display: grid; gap: 2px; padding: 14px 16px; background: rgb(0 0 0 / 0.45); }
.th-room-stats b { font-size: 2rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.th-room-stats b small { font-size: 0.9rem; font-weight: 500; color: var(--muted); }
.th-room-stats > div > span { font-size: 12px; color: var(--muted); }
.th-room-lab { font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); }
.th-room-slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: -6px; }
.th-room-slots a { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: rgb(0 0 0 / 0.3); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; transition: border-color var(--d-fast), background-color var(--d-fast), transform 0.25s var(--spring); }
.th-room-slots a small { font-size: 11px; font-weight: 500; color: var(--faint); }
.th-room-slots a:hover { border-color: var(--line-3); background: rgb(255 255 255 / 0.08); transform: translateY(-1px); }
html:not(.calm) .th-room-slots a { animation: th-in 0.6s var(--spring-soft) both; animation-delay: calc(var(--i, 0) * 70ms + 400ms); }
@keyframes th-in { from { opacity: 0; transform: translateY(8px); } }
.th-room-cta { width: 100%; }
.th-tick { display: inline-block; }
html:not(.calm) .th-tick.bump { animation: th-bump 0.5s var(--spring); }
@keyframes th-bump { 40% { transform: translateY(-4px); opacity: 0.5; } }

/* ---------------------------------------------------------------- "not by telehealth" */
.th-not { border-color: rgb(252 211 77 / 0.22); }
.th-not h3 { color: rgb(253 230 138 / 0.95); }

/* ---------------------------------------------------------------- fee calculator */
.th-feecalc { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--s-6); align-items: center; padding: var(--s-6); border-radius: var(--r-lg); }
.th-feecalc-q { display: grid; gap: 10px; justify-items: start; }
.th-feecalc-q .th-q + .seg { margin-bottom: 10px; }
.th-feecalc-a { padding-left: var(--s-6); border-left: 1px solid var(--line); }
.th-feecalc-a b { display: block; margin: 6px 0 8px; font-size: clamp(2.2rem, 1.6rem + 2vw, 3.2rem); font-weight: 700; letter-spacing: -0.035em; line-height: 1; background: var(--spectrum); -webkit-background-clip: text; background-clip: text; color: transparent; }
html:not(.calm) .th-feecalc-a b.swap { animation: th-bump 0.5s var(--spring); }
.th-feecalc-a p { font-size: 14px; }

/* ---------------------------------------------------------------- booking */
.th-book-sec { padding-top: 0; }
.th-book { max-width: 760px; margin-inline: auto; }
.th-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: var(--s-5); counter-reset: st; }
.th-steps li { counter-increment: st; position: relative; display: grid; gap: 8px; font-size: 12.5px; font-weight: 500; color: var(--faint); transition: color var(--d-fast); }
.th-steps li::before { content: ""; height: 3px; border-radius: 3px; background: rgb(255 255 255 / 0.12); transition: background var(--d-base) var(--ease); }
.th-steps li.done, .th-steps li[aria-current="step"] { color: var(--ink); }
.th-steps li.done::before, .th-steps li[aria-current="step"]::before { background: var(--spectrum); }
.th-panel { gap: var(--s-5); padding: var(--s-6); border-radius: var(--r-lg); }
html:not(.calm) .th-panel.arrive { animation: th-panel 0.55s var(--spring-soft); }
@keyframes th-panel { from { opacity: 0; transform: translateX(var(--from, 24px)); } }
.th-h { font-size: 1.375rem; font-weight: 600; letter-spacing: -0.02em; }
.th-choices .choice span small { font-weight: 400; opacity: 0.7; }
.th-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: var(--s-4); border-top: 1px solid var(--line); }
.th-need { font-size: 13px; color: color-mix(in srgb, var(--magenta) 70%, white); }
.th-checks { display: grid; gap: 10px; }

.th-days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.th-days::-webkit-scrollbar { display: none; }
.th-days button { flex: none; display: grid; justify-items: center; gap: 2px; min-width: 76px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line-2); background: rgb(0 0 0 / 0.25); font-size: 12px; color: var(--muted); transition: border-color var(--d-fast), background-color var(--d-fast), color var(--d-fast); }
.th-days button b { font-size: 1.25rem; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.th-days button:hover { border-color: var(--line-3); }
.th-days button[aria-pressed="true"] { background: var(--cta); border-color: var(--cta); color: rgb(0 0 0 / 0.6); }
.th-days button[aria-pressed="true"] b { color: var(--cta-ink); }
.th-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; min-height: 92px; }
.th-slots button { padding: 10px 8px; border-radius: 12px; border: 1px solid var(--line-2); background: rgb(0 0 0 / 0.25); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; transition: border-color var(--d-fast), background-color var(--d-fast), transform 0.25s var(--spring); }
.th-slots button:hover:not(:disabled) { border-color: var(--line-3); transform: translateY(-1px); }
.th-slots button[aria-pressed="true"] { background: var(--cta); border-color: var(--cta); color: var(--cta-ink); }
.th-slots button:disabled { opacity: 0.3; text-decoration: line-through; cursor: not-allowed; }
.th-slots button.next { border-color: color-mix(in srgb, var(--lilac) 50%, transparent); }
.th-slots .th-empty { grid-column: 1 / -1; align-self: center; font-size: 14px; color: var(--faint); }
html:not(.calm) .th-slots button { animation: th-in 0.4s var(--spring-soft) both; animation-delay: calc(var(--i, 0) * 22ms); }

/* device check */
.th-check { display: grid; gap: 1px; border-radius: var(--r-md); overflow: hidden; background: var(--line); }
.th-check-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 14px 16px; background: rgb(0 0 0 / 0.4); font-size: 14px; font-weight: 500; }
.th-check-row em { font-style: normal; font-size: 13px; color: var(--faint); }
.th-check-row .th-meter { grid-column: 2 / -1; display: flex; gap: 3px; height: 14px; align-items: flex-end; }
.th-meter i { flex: 1; height: 20%; border-radius: 2px; background: rgb(255 255 255 / 0.12); transition: height 0.12s linear, background-color var(--d-fast); }
.th-check-row.ok .th-meter i { background: var(--spectrum); background-size: 800% 100%; }
.th-dot { width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--line-3); }
.th-check-row.busy .th-dot { border-color: var(--lilac); border-top-color: transparent; animation: th-spin 0.8s linear infinite; }
.th-check-row.ok .th-dot { border-color: var(--st-live); background: var(--st-live); box-shadow: 0 0 10px var(--st-live); }
.th-check-row.ok em { color: rgb(167 243 208 / 0.9); }
@keyframes th-spin { to { transform: rotate(360deg); } }
.th-summary:empty { display: none; }
.th-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; padding: var(--s-4) var(--s-5); border-radius: var(--r-md); border: 1px solid var(--line); background: rgb(0 0 0 / 0.3); }
.th-summary b { display: block; font-size: 15px; font-weight: 600; }
.th-summary .th-fee b { font-size: 1.25rem; }

/* done */
.th-done { position: relative; overflow: hidden; border-color: color-mix(in srgb, var(--lilac) 30%, transparent); }
.th-done::before { content: ""; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--violet) 45%, transparent), transparent 70%); filter: blur(30px); pointer-events: none; }
.th-done > * { position: relative; }
.th-done .badge { justify-self: start; align-self: flex-start; }
.th-appt { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; padding: var(--s-5) 0; border-block: 1px solid var(--line); }
.th-appt b { display: block; margin-top: 4px; font-size: 1.05rem; font-weight: 600; }

/* ---------------------------------------------------------------- my appointments */
.th-appts { padding-top: 0; }
.th-next { gap: var(--s-4); padding: var(--s-6); border-radius: var(--r-lg); border-color: color-mix(in srgb, var(--lilac) 26%, transparent); }
.th-next-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.th-count b { display: block; margin-top: 4px; font-size: clamp(3rem, 2rem + 4vw, 5rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.th-next.ready .th-count b { background: var(--spectrum); -webkit-background-clip: text; background-clip: text; color: transparent; }
.th-next-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.th-next-actions .btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
html:not(.calm) .th-next.ready [data-join] { animation: th-glow 2.4s var(--ease) infinite; }
@keyframes th-glow { 50% { box-shadow: 0 0 0 6px rgb(255 255 255 / 0.12), 0 0 30px color-mix(in srgb, var(--violet) 60%, transparent); } }
.th-resched { display: grid; gap: 10px; padding-top: var(--s-4); border-top: 1px solid var(--line); }
.th-msg { padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line-2); background: rgb(0 0 0 / 0.35); font-size: 14px; color: var(--ink-2); }
.th-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.th-skip { justify-self: start; align-self: flex-start; margin-top: 4px; font-size: 13px; color: var(--faint); }

/* the video room (a demo) */
.th-room-dlg { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgb(0 0 0 / 0.7); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
html:not(.calm) .th-room-dlg { animation: th-fade 0.35s var(--ease); }
@keyframes th-fade { from { opacity: 0; } }
.th-call { position: relative; width: min(960px, 100%); aspect-ratio: 16 / 10; max-height: calc(100vh - 32px); border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line-2); background: #05060a; }
html:not(.calm) .th-call { animation: th-pop 0.5s var(--spring-soft); }
@keyframes th-pop { from { transform: scale(0.94); opacity: 0; } }
.th-call-bg { position: absolute; inset: 0; background: radial-gradient(60% 70% at 30% 30%, color-mix(in srgb, var(--violet) 40%, transparent), transparent 70%), radial-gradient(50% 60% at 75% 70%, color-mix(in srgb, var(--magenta) 30%, transparent), transparent 70%), radial-gradient(40% 50% at 70% 20%, color-mix(in srgb, var(--ice) 25%, transparent), transparent 70%); filter: blur(10px); }
html:not(.calm) .th-call-bg { animation: th-drift 12s ease-in-out infinite alternate; }
@keyframes th-drift { to { transform: scale(1.12) translate(3%, -2%); } }
.th-call-mid { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 14px; padding: 24px; text-align: center; }
.th-avatar { display: grid; place-items: center; width: 96px; height: 96px; border-radius: 50%; border: 1px solid var(--line-3); background: rgb(0 0 0 / 0.35); font-size: 1.75rem; font-weight: 600; letter-spacing: -0.02em; }
html:not(.calm) .th-call.waiting .th-avatar { animation: th-breathe 2.6s ease-in-out infinite; }
@keyframes th-breathe { 50% { box-shadow: 0 0 0 14px rgb(255 255 255 / 0.05), 0 0 0 28px rgb(255 255 255 / 0.03); } }
.th-call-mid h2 { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; }
.th-call-mid p { max-width: 34ch; font-size: 14px; color: var(--muted); }
.th-self { position: absolute; right: 16px; top: 16px; display: grid; place-items: center; width: 22%; min-width: 96px; aspect-ratio: 4 / 3; border-radius: 12px; border: 1px solid var(--line-2); background: linear-gradient(160deg, #1b1d2a, #0b0c12); font-size: 12px; color: var(--muted); }
.th-call-bar { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; gap: 10px; padding: 8px; border-radius: var(--r-pill); border: 1px solid var(--line); background: rgb(0 0 0 / 0.55); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.th-call-bar button { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgb(255 255 255 / 0.1); transition: background-color var(--d-fast); }
.th-call-bar button:hover { background: rgb(255 255 255 / 0.18); }
.th-call-bar button[aria-pressed="true"] { background: #fff; color: #000; }
.th-call-bar button.end { width: auto; padding: 0 18px; border-radius: var(--r-pill); background: #e5484d; font-size: 14px; font-weight: 600; color: #fff; }
.th-call-bar svg { width: 20px; height: 20px; }
.th-call-time { position: absolute; left: 16px; top: 16px; padding: 4px 10px; border-radius: var(--r-pill); background: rgb(0 0 0 / 0.5); font: 500 12px/1.4 var(--mono); color: var(--muted); }
.th-call-note { position: absolute; left: 16px; bottom: 20px; max-width: 30%; font-size: 11px; color: var(--ghost); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .th-hero-in { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
  .th-feecalc { grid-template-columns: minmax(0, 1fr); }
  .th-feecalc-a { padding-left: 0; padding-top: var(--s-5); border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .th-hero h1 { max-width: none; }
  .th-hero .hero-ctas { align-self: stretch; }
  .th-panel, .th-next, .th-feecalc { padding: var(--s-5); }
  .th-steps li { font-size: 11px; }
  .th-summary, .th-appt { grid-template-columns: minmax(0, 1fr); }
  .th-nav .btn { padding-inline: 18px; }
  .th-next-actions .btn { flex: 1 1 auto; }
  .th-call { aspect-ratio: 3 / 4; }
  .th-call-note { display: none; }
  .th-self { width: 30%; }
}

/* ---------------------------------------------------------------- small fits on Aurora's kit */
.page-head .crumbs + .badge { margin-top: 14px; }
.card-lg h3 + p { margin-top: 8px; }
.table thead th.num { color: var(--faint); }
.field-set .seg, .th-feecalc-q .seg { justify-self: start; }
.th-feecalc-q .th-q + .choices { margin-bottom: 10px; }
.th-call-bar button.end { white-space: nowrap; }
.th-slots .th-part { grid-column: 1 / -1; margin-top: 6px; font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); }
.th-slots .th-part:first-child { margin-top: 0; }
