/*
 * Header overrides — HAND-AUTHORED, not generated.
 *
 * assets/css/d1s.css is written by _handover-pack/tools/extract-theme.py, so
 * anything added there is lost the next time that tool runs. These rules live in
 * their own file for that reason. Loaded after d1s.css (see inc/enqueue.php),
 * which is what lets them override it without an !important anywhere.
 */

/* ---------------------------------------------------------------------------
 * Masthead — one lockup on the left.
 *
 * The whole campaign line used to sit at the far right of the header, roughly
 * 800px from the logo: two separate marks rather than one brand, with the name of
 * the offer floating unanchored on the right. "Drop 1 Size" now sits under the
 * wordmark, where it reads as part of the lockup. "6-Week Challenge" stays on the
 * right. On the checkout that right-hand slot carries the reassurance line
 * instead, and the challenge line is dropped.
 * ------------------------------------------------------------------------- */
.masthead-brand { display: flex; flex-direction: column; align-items: flex-start; --logo-h: 64px; }
.masthead-brand .masthead-tag { text-align: left; }
/* The campaign line splits: "Drop 1 Size" belongs to the lockup, "6-Week
   Challenge" stays out on the right where it always was. The checkout drops the
   challenge line entirely — that slot carries the reassurance line instead. */
.masthead-aside { text-align: right; }

/*
 * The lockup PNG is 900x360 with the artwork inside a transparent margin: the
 * alpha bounding box is (71, 82)-(856, 278). Stacked under the logo that margin
 * shows up as a 12px indent and a 15px gap that are not really there, so the
 * campaign line looks misaligned and adrift. Both scale with the rendered logo
 * height, so they are corrected as a fraction of it:
 *   left margin  71/900 of the width  = 0.197 of the height (the mark is 2.5:1)
 *   lower margin 82/360               = 0.228 of the height
 * Re-measure both if the file is ever replaced.
 */
.masthead-brand .masthead-tag { padding-left: calc(var(--logo-h) * .197); margin-top: calc(6px - var(--logo-h) * .228); }
@media (max-width: 900px) { .masthead-brand { --logo-h: 54px; } }
@media (max-width: 600px) { .masthead-brand { --logo-h: 44px; } }

/* Checkout only: the "secure checkout" line that used to sit in the dark bar.
   #step-label is rewritten by d1s.js — it becomes "✓ Confirmed" on the
   confirmation screen — so it keeps its id here. */
.masthead-status { font-size: 12px; font-weight: 600; color: #6b6b6b; text-align: right; }

/* ---------------------------------------------------------------------------
 * Checkout header — two rows, not three.
 *
 * The white "Reserving: … / Back to landing page" strip has moved up into the
 * dark bar, which previously carried only a duplicate of the brand and the
 * reassurance line. Those rules were written for a white background, so the dark
 * versions are here.
 * ------------------------------------------------------------------------- */
.topbar { padding: 13px 0; }
/* .wrap is 1100 wide but .masthead-inner is 1200, so the two rows of the header
   started 74px apart. 1248 = 1200 + the 24px padding either side, which lines the
   reserving line up under the logo and the button under the secure-checkout line
   at every width. */
.topbar-inner { flex-wrap: wrap; max-width: 1248px; }
.topbar .lbl { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--tobacco-light); font-weight: 700; }
.topbar .selected { font-size: 16px; font-weight: 800; color: var(--cream); }
.topbar .selected .price { color: var(--orange); margin-left: 8px; }
.topbar .tier-wave-line { font-size: 12px; color: #c4b3a3; margin-top: 3px; letter-spacing: .02em; }
.topbar .tier-wave-line strong { color: var(--orange); font-weight: 800; }
.topbar .change {
  font-size: 13px; font-weight: 600; font-family: inherit;
  color: var(--cream); background: transparent;
  border: 1px solid rgba(245, 243, 238, .3);
  padding: 7px 15px; border-radius: 100px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.topbar .change:hover { border-color: var(--cream); background: rgba(245, 243, 238, .1); }

@media (max-width: 600px) {
  /* The base sheet right-aligns every tag; only the one on the right wants it. */
  .masthead-brand .masthead-tag { text-align: left; }
  .masthead-status { font-size: 11px; max-width: 42%; }
  .topbar-inner { gap: 12px; }
  .topbar .selected { font-size: 15px; }
}


/* ============================================================
   Fusion / Pilates timetable grid
   ------------------------------------------------------------
   Added 2026-09-09, replacing the day-by-row chip list. Times down the side, days
   across the top, matching the shape of U Fit's own timetable document.

   Why a grid: the question this module answers is "is there anything at 6pm?",
   which is a column scan. The old list made you read seven rows and transpose them
   in your head. It also degraded badly on 2026-09-07 when class names came out of
   the cells for the four-week rotation, leaving 26 chips all reading "Fusion"
   inside a block already headed "FUSION".

   Because the cells carry a marker rather than a class name the columns can be
   narrow, so all seven days fit inside a 390px phone viewport with no horizontal
   scroll. That is the whole reason this shape works here.

   Hand-authored, and it lives HERE rather than in d1s.css because the generator
   rewrites that file and would drop it.
   ============================================================ */

/* Visually hidden, still read aloud. Each filled cell carries its own "Wed 18:00"
   so the grid is navigable without sight of the row and column headers. */
.tt-vh {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

.tt-grid {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.tt-grid-caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.tt-grid th,
.tt-grid td {
  padding: 0;
  text-align: center;
  border: 1px solid #ece7dc;
}

/* Day headers */
.tt-grid thead th {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8a8279;
  padding: 6px 0;
  border-top: 0;
  border-left: 0;
  border-right: 0;
}
.tt-grid thead th:first-child { width: 52px; }

/* Time labels down the left */
.tt-grid tbody th {
  width: 52px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink, #1d1b16);
  text-align: right;
  padding: 0 8px 0 0;
  border-left: 0;
  border-top: 0;
  border-bottom: 0;
  white-space: nowrap;
}

.tt-grid tbody td {
  height: 30px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
}

/* A slot that runs */
.tt-grid td.is-on {
  background: #f2ded4;
  color: #b8491e;
  font-size: 15px;
}
.tt-grid--pilates td.is-on { background: #e2e6ea; color: #4a6076; }

/* Saturday 10:00 — the one slot whose class is the same in all four weeks */
.tt-grid td.is-unite {
  background: var(--orange, #b8491e);
  color: #fff;
  font-size: 9px;
  text-transform: uppercase;
}

/* An empty slot. Faint rather than blank so the grid still reads as a grid. */
.tt-grid td.is-off { background: #fbf9f5; }

.tt-rotation-note {
  font-size: 12.5px;
  line-height: 1.55;
  color: #5c564c;
  margin-top: 12px;
  padding: 10px 12px;
  background: #f9f6f0;
  border-left: 3px solid var(--orange, #b8491e);
  border-radius: 4px;
}
.tt-rotation-note strong { color: var(--ink, #1d1b16); }

@media (max-width: 520px) {
  .tt-grid thead th:first-child,
  .tt-grid tbody th { width: 44px; }
  .tt-grid tbody th { font-size: 11px; padding-right: 5px; }
  .tt-grid thead th { font-size: 10px; }
  .tt-grid tbody td { height: 27px; }
  .tt-grid td.is-on { font-size: 13px; }
  .tt-grid td.is-unite { font-size: 7.5px; letter-spacing: 0; }
}

/* ============================================================
   FUSION TIMETABLE — four-week rotation, U Fit's own styling
   ------------------------------------------------------------
   Added 2026-09-10. A visual match for U Fit's timetable PDF: coloured class
   blocks in their palette, week tabs, the month-trial banner, their legend and
   footnote. Replaces the marker grid of 2026-09-09, which existed only because a
   single week could not name a class truthfully. Four weeks can.

   Class colours arrive as an inline `--fus-c` / `--fus-ink` custom property from
   config, so adding or recolouring a class is a config edit, not a CSS edit.

   Visible by default — no expander. Pilates keeps one, below.

   Hand-authored, and it lives HERE because the generator rewrites d1s.css.
   ============================================================ */

.fus-tt {
  margin: 28px 0 8px;
  padding: 22px 22px 18px;
  background: #fdfbf7;
  border: 1px solid #ece7dc;
  border-radius: 10px;
}

.fus-tt-head { display: flex; justify-content: flex-end; margin-bottom: 14px; }
.fus-tt-title { text-align: right; line-height: 1.25; }
.fus-tt-kicker {
  display: block;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: #7c8899;
}
.fus-tt-tag {
  display: block;
  font-family: "EB Garamond", Georgia, serif;
  font-style: italic;
  font-size: 25px;
  color: var(--orange, #b8491e);
}

/* Month-trial banner */
.fus-tt-trial {
  display: flex; gap: 14px; align-items: baseline;
  padding: 11px 14px; margin-bottom: 16px;
  background: #fbf1ec;
  border-radius: 6px;
  font-size: 13px; line-height: 1.5; color: #5c564c;
}
.fus-tt-trial-lbl {
  flex: none;
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--orange, #b8491e);
}

/* Week tabs */
.fus-tt-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.fus-tt-tab {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px;
  padding: 8px 4px;
  background: #f4efe5;
  border: 1px solid #e6dfd1;
  border-radius: 7px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.fus-tt-tab:hover { background: #efe8db; }
.fus-tt-tab-sm {
  font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: #7c8899;
}
.fus-tt-tab-n {
  font-family: "EB Garamond", Georgia, serif;
  font-size: 21px; line-height: 1;
  color: #8a8279;
}
.fus-tt-tab.is-active {
  background: #fff;
  border-color: var(--orange, #b8491e);
  box-shadow: 0 1px 0 var(--orange, #b8491e) inset, 0 -2px 0 var(--orange, #b8491e) inset;
}
.fus-tt-tab.is-active .fus-tt-tab-n { color: var(--orange, #b8491e); }

.fus-tt-panel:not(.is-active) { display: none; }

/* The grid */
.fus-grid {
  width: 100%;
  border-collapse: separate;
  border-spacing: 5px;
  table-layout: fixed;
  font-variant-numeric: tabular-nums;
}
.fus-vh {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

.fus-grid thead th {
  padding: 12px 4px;
  background: #f4efe5;
  border-radius: 6px;
  font-size: 12px; font-weight: 800;
  letter-spacing: 0.09em; text-transform: uppercase;
  color: #2f211a;
}
.fus-day-abbr { display: none; }

.fus-wkcell { width: 11%; }
.fus-wkcell-sm {
  display: block;
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.16em; color: #7c8899;
}
.fus-wkcell-n {
  display: block;
  font-family: "EB Garamond", Georgia, serif;
  font-size: 23px; line-height: 1.1;
  font-weight: 400; letter-spacing: 0;
  color: var(--orange, #b8491e);
}

/* Time column */
.fus-time {
  background: #f4efe5;
  border-radius: 6px;
  padding: 10px 4px;
  text-align: center;
}
.fus-time-t {
  display: block;
  font-size: 13px; font-weight: 800; color: #2f211a;
}
.fus-time-trial {
  display: block; margin-top: 1px;
  font-size: 8.5px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--orange, #b8491e);
}

/* Cells */
.fus-cell {
  height: 54px;
  border-radius: 6px;
  text-align: center;
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
}
.fus-cell.is-empty { background: #f6f2ea; }
.fus-cell.is-on {
  background: var(--fus-c, #2f211a);
  color: var(--fus-ink, #fff);
}
/* Trial slots are outlined rather than filled, exactly as U Fit mark them. */
.fus-cell.is-on.is-trial {
  background: #fff;
  color: var(--fus-c, #2f211a);
  border: 1.5px dashed var(--fus-c, #2f211a);
  line-height: 1.15;
}
.fus-badge {
  display: block; width: fit-content; margin: 3px auto 0;
  padding: 1px 5px;
  background: var(--orange, #b8491e);
  border-radius: 3px;
  font-size: 8px; font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff;
}

/* Legend + footnote */
.fus-tt-legend {
  display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: center;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid #ece7dc;
}
.fus-key {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; color: #2f211a;
}
.fus-key i { width: 15px; height: 15px; border-radius: 3px; flex: none; }
.fus-key-trial { background: #fff; border: 1.5px dashed var(--orange, #b8491e); }

.fus-tt-note {
  margin: 12px 0 0;
  text-align: center;
  font-family: "EB Garamond", Georgia, serif;
  font-style: italic;
  font-size: 14.5px;
  color: #6b6459;
}

@media (max-width: 860px) {
  .fus-tt { padding: 16px 12px 14px; }
  .fus-tt-tag { font-size: 20px; }
  .fus-grid { border-spacing: 3px; }
  .fus-day-full { display: none; }
  .fus-day-abbr { display: inline; }
  .fus-grid thead th { font-size: 10px; padding: 8px 2px; letter-spacing: 0.04em; }
  .fus-wkcell { width: 13%; }
  .fus-wkcell-n { font-size: 18px; }
  .fus-time-t { font-size: 11px; }
  .fus-cell { height: 42px; font-size: 9.5px; letter-spacing: 0.02em; }
  .fus-badge { display: none; }
  .fus-tt-trial { flex-direction: column; gap: 4px; font-size: 12px; }
}

@media (max-width: 560px) {
  .fus-tt { padding: 14px 8px 12px; }
  .fus-grid { border-spacing: 2px; }
  .fus-grid thead th { font-size: 8.5px; padding: 6px 1px; }
  .fus-wkcell-sm { display: none; }
  .fus-time { padding: 6px 2px; }
  .fus-time-t { font-size: 10px; }
  .fus-time-trial { font-size: 7px; letter-spacing: 0.04em; }
  .fus-cell { height: 34px; font-size: 7.5px; letter-spacing: 0; }
  .fus-cell.is-on.is-trial { border-width: 1px; }
  .fus-tt-tab-n { font-size: 18px; }
  .fus-tt-legend { gap: 6px 12px; }
  .fus-key { font-size: 11px; gap: 5px; }
  .fus-key i { width: 12px; height: 12px; }
  .fus-tt-note { font-size: 13px; }
}

/* ------------------------------------------------------------------
   Post-payment classes panel (screen-4).
   Replaced the six-week planner on 2026-09-15: the team confirm the
   classes, so all this has to do is say so and name the Kickstart
   Saturday. Reuses .post-pay-schedule / .pps-header, and borrows the
   dark cocoa card the planner's week header used.
   ------------------------------------------------------------------ */
#post-pay-classes .pps-header { border-bottom: none; padding-bottom: 0; margin-bottom: 18px; }
.pps-kickstart { background: linear-gradient(135deg, var(--cocoa) 0%, var(--cocoa-deep) 100%); color: #fff; border-radius: 12px; padding: 22px 20px; text-align: center; }
.pps-kickstart-lbl { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ember-light); font-weight: 800; margin-bottom: 8px; }
.pps-kickstart-date { font-size: 26px; font-weight: 800; letter-spacing: -.01em; line-height: 1.15; }
.pps-kickstart-time:not(:empty) { font-size: 13px; color: rgba(255,255,255,.72); margin-top: 8px; font-weight: 600; }
@media (max-width: 600px) {
  .pps-kickstart { padding: 18px 14px; }
  .pps-kickstart-date { font-size: 21px; }
}

/* ============================================================
   NEXT DATE TO BE CONFIRMED (2026-11-23)
   body.d1s-tbc is set by inc/waves.php for first paint and kept in step by
   d1sDatesTbc() / applyTbcState() in d1s.js. No date: no picker, no stepper,
   no payment, no "live" bookings ticker.
   ============================================================ */
.d1s-tbc .live-ticker,
.d1s-tbc .wave-picker-note,
.d1s-tbc .d1s-stepper,
.d1s-tbc #d1s-step-1 .field:has(#start-date-picker) { display: none !important; }
.d1s-tbc .wave-grid { grid-template-columns: 1fr; max-width: 420px; margin-left: auto; margin-right: auto; }
.d1s-tbc .d1s-tbc-card { cursor: default; }
.d1s-tbc .d1s-tbc-card .date { font-size: clamp(26px, 6vw, 34px); }
.d1s-tbc-done { text-align: center; padding: 8px 0 4px; }
.d1s-tbc-done .d1s-step-nav { justify-content: center; }
