/* Kirby self-serve SPA styles. Visual language lifted from the Variant-B
   rules of the #43 prototype (prototypes/frontend-flow-prototype.html @
   eb62702), with selectors renamed to the class names app.js emits.
   Dropped: wizard (A) rail, card-stack (C) ring/hero, dev panel, variant
   switcher, brand header, pills, and the prototype's generic .card/.pad
   shells (folded into .gate/.form/.banner/.state-body below). */

/* ---- page shell + typography (lifted) ---- */

:root {
  --bg: #f5f4f7; --card: #ffffff; --ink: #1d1b22; --muted: #6b6775;
  --line: #e6e3ec; --pink: #e5568f; --pink-ink: #b83a6f; --pink-soft: #fdeef4;
  --ok: #1f9d6b; --ok-soft: #e7f6ee; --warn: #c98a1a; --warn-soft: #fdf3e0;
  --err: #d0433e; --err-soft: #fbeceb; --blue: #3b6fd4; --blue-soft: #eaf0fc;
  --radius: 14px; --shadow: 0 8px 30px rgba(30,20,50,.10);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0 0 .35em; line-height: 1.2; }
p { margin: 0 0 .8em; line-height: 1.5; }
button { font: inherit; cursor: pointer; }
input, select { font: inherit; }
a { color: var(--pink-ink); }

input[type=text], input[type=tel], input[type=email], input[type=date], select {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; color: var(--ink);
}
input:focus, select:focus { outline: 2px solid var(--pink); outline-offset: 0; border-color: var(--pink); }

/* shell: prototype .app padding + .wrap-b width */
#app { min-height: 100vh; padding: 28px 16px 120px; max-width: 860px; margin: 0 auto; }

/* ---- buttons (lifted from .btn/.btn.primary/.btn.ghost/.rm; app.js uses
       bare buttons for primary actions, .secondary and .remove for the rest) ---- */

button {
  padding: 11px 18px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; background: var(--pink); color: #fff;
}
button:hover { background: var(--pink-ink); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.secondary { background: #fff; border-color: var(--line); color: var(--ink); }
button.secondary:hover { background: #fff; border-color: var(--muted); }
button.remove { border: none; background: none; color: var(--err); font-weight: 600; font-size: 13px; padding: 6px 8px; }
button.remove:hover { background: none; text-decoration: underline; }

/* ---- sections (prototype .card + .pad, one per app.js phase) ---- */

.gate, .form {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px;
}
.gate { max-width: 520px; margin: 24px auto 0; }   /* prototype .wrap-a width */
.gate input { margin-bottom: 12px; }
.gate button { display: block; width: 100%; }       /* prototype .btn.block */
.form > input { margin-bottom: 12px; }              /* the bare email input */
.form h2 { margin-top: 18px; }
.form > button:not(.secondary) {                    /* the submit button: .btn.primary.block.big */
  display: block; width: 100%; padding: 16px 22px; font-size: 16px; margin-top: 16px;
}
.live { margin: 0 auto; }  /* wrapper only; the docked .banner + .state-body carry the cards */

/* ---- flow strip (prototype .flow/.flow .step with the now/later accent,
       renamed to app.js's .flow-strip/.flow-step) ---- */

.flow { margin: 2px 0 16px; }
.flow-strip { display: flex; gap: 10px; }
.flow-step { flex: 1; border-radius: 12px; padding: 12px; }
.flow-step.now { background: var(--pink-soft); }
.flow-step.later { background: var(--blue-soft); }
.flow-step b { display: block; font-size: 13px; margin-bottom: 3px; }
.flow-step span { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.35; }
@media (max-width: 560px) {
  .flow-strip { flex-wrap: wrap; }
  .flow-step { flex: 0 0 46%; }
}

/* ---- form rows (prototype .row flex + .daterow card, renamed) ---- */

.names { display: flex; gap: 10px; margin-bottom: 12px; }
.names > * { flex: 1; min-width: 0; }
.phone { display: flex; gap: 8px; margin-bottom: 12px; }
.phone select { flex: 0 1 190px; min-width: 0; }
.phone input { flex: 1; min-width: 0; }
.date-rows { margin-bottom: 10px; }
.date-row {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  border: 1px solid var(--line); border-radius: 12px; padding: 12px;
  margin-bottom: 10px; background: #fbfafc;
}
.date-row input[type=date] { flex: 1 1 140px; min-width: 0; }
.date-row select { flex: 1 1 120px; min-width: 0; }
.date-row .remove { flex: 0 0 auto; }

/* ---- consent label (lifted) ---- */

.consent {
  display: flex; gap: 10px; align-items: flex-start; font-size: 13px;
  color: var(--muted); background: #faf9fc; border: 1px solid var(--line);
  border-radius: 10px; padding: 12px; margin: 14px 0;
}
.consent input { margin-top: 2px; }

/* ---- live session: docked banner + stepper (prototype .dock card +
       .steps/.node/.bubble/.cap/.link, renamed to .banner/.stepper/.step/.dot) ---- */

.banner {
  position: sticky; top: 12px; z-index: 5; margin-bottom: 16px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 18px 12px;
}
.banner .poll-blip { position: absolute; top: 10px; right: 16px; }

.stepper { display: flex; align-items: flex-start; margin: 8px 0 4px; counter-reset: step; }
.step { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; }
.step::after {                       /* connecting line (prototype .steps .link) */
  content: ""; position: absolute; top: 14px; left: 50%; width: 100%;
  height: 2px; background: var(--line);
}
.step:last-child::after { display: none; }
.step.done::after { background: var(--ok); }
.step .dot {                         /* prototype .steps .bubble */
  position: relative; z-index: 1; counter-increment: step;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-size: 13px; font-weight: 700; background: var(--line); color: var(--muted);
}
.step .dot::before { content: counter(step); }
.step.done .dot { background: var(--ok); color: #fff; }
.step.active .dot { background: var(--pink); color: #fff; box-shadow: 0 0 0 5px var(--pink-soft); }
.step > span:not(.dot) { font-size: 10.5px; margin-top: 5px; color: var(--muted); max-width: 86px; }
.step.done > span:not(.dot) { color: var(--ink); }
.step.active > span:not(.dot) { color: var(--pink-ink); font-weight: 600; }

/* live body card below the dock */
.state-body {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px;
}
.state-body:has(> .spinner) { text-align: center; }

/* spinner (new - the prototype had none; matches the pink accent) */
.spinner {
  width: 28px; height: 28px; border-radius: 50%; margin: 4px auto 14px;
  border: 3px solid var(--pink-soft); border-top-color: var(--pink);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* countdown digits (tabular numerals, from the prototype ring timer) */
.countdown { font-variant-numeric: tabular-nums; }

/* poll indicator (prototype .poll + .poll .blip + blip keyframes, renamed) */
.poll-blip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11.5px; color: var(--muted);
}
.poll-blip::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--ok); animation: blip 3s ease infinite;
}
@keyframes blip { 0% { transform: scale(.4); opacity: .3; } 50% { transform: scale(1.5); } 100% { transform: scale(1); opacity: 1; } }

/* big mobile number (prototype .tel) + call link (prototype a.btn.primary.big) */
.big { font-size: 30px; font-weight: 800; letter-spacing: .5px; margin: 2px 0 6px; }
a.call {
  display: block; text-align: center; margin: 8px 0 12px;
  background: var(--pink); color: #fff; font-weight: 600;
  padding: 16px 22px; font-size: 16px; border-radius: 10px; text-decoration: none;
}
a.call:hover { background: var(--pink-ink); }

/* ---- text utilities (lifted: .hint/.muted/.summary; .error is the red hint) ---- */

.error { color: var(--err); font-size: 13px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.muted { color: var(--muted); }
.summary { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.summary li { margin-bottom: 6px; }
