/**
 * The booking funnel — /book, plus the screen Stripe returns to.
 *
 * Its own file rather than another 400 lines on the end of `pages.css`, which
 * RM-017 already flags as the file most likely to become unpleasant. The funnel
 * is one self-contained page with no styles shared outside it, which makes it
 * the natural first split rather than a preemptive one.
 *
 * Every colour, radius and shadow here is a token from `tokens.css` (DD-011).
 */

/* ---------- utility ---------- */

/* Visible to a screen reader, not to the eye. Used for the "(current step)"
   note in the stepper, where the visual cue is colour alone. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.banner-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}

/* One column, because the second one held the form that moved to /book. */
.contact-grid-info {
  max-width: 560px;
  margin-inline: auto;
}

@media (min-width: 1024px) {
  .contact-grid-info {
    grid-template-columns: 1fr;
  }
}

/* ---------- layout ---------- */

.co-wrap {
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
  align-items: start;
}

@media (min-width: 1024px) {
  .co-wrap {
    grid-template-columns: minmax(0, 1.6fr) minmax(240px, 0.7fr);
  }
}

.co-card {
  padding: 28px 24px 22px;
}

@media (min-width: 640px) {
  .co-card {
    padding: 34px 32px 26px;
  }
}

.co-h {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
}

.co-sub {
  margin-top: 8px;
  margin-bottom: 22px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-60);
}

.co-note {
  margin-top: 20px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-55);
}

.co-note a,
.co-privacy a {
  color: var(--royal);
  font-weight: 600;
}

/* ---------- stepper ---------- */

.co-steps {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.co-steps::-webkit-scrollbar {
  display: none;
}

.co-step {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 7px 13px 7px 8px;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  color: var(--ink-45);
  background: rgba(var(--ink-rgb), 0.04);
}

.co-step-n {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  font-size: 11.5px;
  color: var(--ink-45);
  background: rgba(var(--ink-rgb), 0.08);
}

.co-step.is-now {
  color: var(--royal);
  background: rgba(var(--royal-rgb), 0.1);
}

.co-step.is-now .co-step-n {
  color: var(--cloud);
  background: var(--royal);
}

.co-step.is-done {
  color: var(--ink-60);
}

.co-step.is-done .co-step-n {
  color: var(--cloud);
  background: var(--gold-deep);
}

/* ---------- plan step ---------- */

.co-plans {
  display: grid;
  gap: 12px;
}

.co-plan {
  display: grid;
  gap: 5px;
  padding: 18px 20px;
  text-align: left;
  cursor: pointer;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--cloud);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.co-plan:hover {
  border-color: var(--royal-light);
  box-shadow: var(--shadow-card);
}

.co-plan.on {
  border-color: var(--royal);
  box-shadow: var(--shadow-card);
}

.co-plan-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.co-plan-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}

.co-plan-badge {
  padding: 3px 9px;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--gold);
}

.co-plan-price {
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 700;
  color: var(--royal);
}

.co-plan-price span {
  margin-left: 5px;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-50);
}

.co-plan-what {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-60);
}

.co-plan-save {
  margin-top: 3px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gold-deep);
}

/* ---------- series ---------- */

.co-series {
  margin-top: 22px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--mist);
}

.co-series-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.co-series-head h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}

.co-series-span {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-50);
}

.co-series-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.co-series-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.co-series-row:last-child {
  border-bottom: 0;
}

.co-series-n {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 800;
  color: var(--cloud);
  background: var(--royal);
}

.co-series-when {
  flex: 1;
  font-weight: 600;
  color: var(--ink);
}

.co-series-skip {
  flex: 0 0 auto;
  padding: 4px 11px;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-55);
  background: var(--cloud);
}

.co-series-skip:hover {
  border-color: var(--royal-light);
  color: var(--royal);
}

/* A skipped week stays visible and struck through. Removing the row would
   silently renumber the ones after it, and a parent double-checking their
   dates would find a week that simply isn't mentioned. */
.co-series-row.is-skipped .co-series-when {
  color: var(--ink-40);
  text-decoration: line-through;
}

.co-series-row.is-skipped .co-series-n {
  color: var(--ink-40);
  background: rgba(var(--ink-rgb), 0.08);
}

.co-series-note {
  margin-top: 12px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-55);
}

/* ---------- details step ---------- */

.co-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.co-opt {
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-45);
}

.co-privacy {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-55);
}

/* ---------- review step ---------- */

.co-review {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .co-review {
    grid-template-columns: 1fr 1fr;
  }
}

.co-review-block {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--mist);
}

.co-review-block h3 {
  margin-bottom: 8px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-55);
}

.co-review-block p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
}

.co-review-sessions {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink);
  font-weight: 600;
}

.co-review-sessions span {
  display: inline-block;
  min-width: 20px;
  font-weight: 700;
  color: var(--ink-45);
}

.co-review-flex {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--gold-deep);
}

.co-edit {
  margin-top: 10px;
  padding: 0;
  cursor: pointer;
  border: 0;
  background: none;
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--royal);
  text-decoration: underline;
}

.co-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 2px solid var(--line);
}

.co-total-l {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-60);
}

.co-total-v {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  color: var(--ink);
}

.co-total-note {
  margin-top: 2px;
  margin-bottom: 18px;
  font-size: 12.5px;
  color: var(--ink-55);
}

.co-pay {
  font-size: 15px;
}

.co-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 12px;
  text-align: center;
  color: var(--ink-50);
}

.co-error {
  display: none;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid var(--error-border);
  border-radius: var(--radius-md);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--error);
  background: var(--error-soft);
}

.co-error.show {
  display: block;
}

.co-error a {
  color: var(--error);
  font-weight: 700;
}

/* ---------- nav ---------- */

.co-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

/* ---------- summary rail ---------- */

.co-summary {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--cloud);
  box-shadow: var(--shadow-card);
}

@media (min-width: 1024px) {
  .co-summary {
    position: sticky;
    top: 96px;
  }
}

.co-summary-h {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-50);
}

.co-summary-plan {
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  color: var(--ink);
}

.co-summary-sessions {
  font-size: 13px;
  color: var(--ink-60);
}

.co-summary-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-60);
}

.co-summary-total strong {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--ink);
}

.co-summary-fine {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--ink-45);
}

/* ---------- confirmation ---------- */

.co-confirm-wrap {
  min-height: 62vh;
}

.co-confirm {
  max-width: 560px;
}

.co-confirm-card {
  padding: 36px 30px 32px;
  text-align: center;
}

.co-confirm-card h1 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
}

.co-confirm-sub {
  margin-top: 10px;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-60);
}

.co-confirm-ref {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 20px 0;
  padding: 11px 14px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  background: var(--mist);
}

.co-confirm-ref span {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-50);
}

.co-confirm-ref strong {
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--ink);
}

.co-confirm-sessions {
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.co-confirm-sessions li {
  display: flex;
  gap: 8px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
}

.co-confirm-sessions li:last-child {
  border-bottom: 0;
}

.co-confirm-sessions span {
  min-width: 20px;
  color: var(--ink-45);
}

.co-confirm-where {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--ink-50);
}

.co-confirm-next {
  margin-top: 20px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-65);
}

.co-confirm-next a {
  color: var(--royal);
  font-weight: 600;
}

.co-confirm-fine {
  margin-top: 12px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-55);
}

.co-confirm-card .btn {
  margin-top: 20px;
}

.co-confirm-card.is-pending {
  border-top: 3px solid var(--gold);
}

.co-confirm-card.is-cancelled {
  border-top: 3px solid var(--ink-35);
}

.co-spinner {
  width: 30px;
  height: 30px;
  margin: 0 auto 18px;
  border: 3px solid rgba(var(--royal-rgb), 0.18);
  border-top-color: var(--royal);
  border-radius: 50%;
  animation: co-spin 0.8s linear infinite;
}

@keyframes co-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .co-spinner {
    animation-duration: 2.4s;
  }
}
