/* ==========================================================================
   Taxi in Lisbon — V12.0 booking stylesheet (tbm-booking.css)
   --------------------------------------------------------------------------
   ONE consolidated stylesheet for the whole new 5-step booking flow.
   Replaces the six old TBM sheets on booking-shortcode pages (see CHANGES.md
   for the handles to dequeue — L10N agent owns the dequeue code):
     pro.css, unified-fleet.css, fleet-card-fit.css,
     mobile-readable-navigation.css, review-mobile-compact.css,
     visible-extras-fix.css
   Do NOT add a seventh override layer: fix layout here, in this file only.

   Visual language: preserved from the live premium look (tbm-live-css.css,
   342 KB served CSS, 2026-11-24). No recolour. Tokens below match live
   computed styles: gold #FBBF24 primary action on navy #0F172A text,
   white / soft-neutral surfaces, 16px inputs, 53px+ touch targets.

   Scoping: every rule is scoped under `.tbm-pro[data-tbm-ui]` (the
   shortcode root, kept by the FLOW agent) or `.tbm-v12-*` (new V12
   markup). Scoped selectors also win on specificity over the old sheets
   if a dequeue is missed — that is the single documented specificity
   exception (brief §6); there is no extra override file.

   `!important`: exactly ONE use in this file, on the extras-checkbox
   size (see §6) — the old sheets set 22px with `!important`, so a plain
   rule cannot reach the WCAG 2.2 AA >=24px target if they ever load.

   No hardcoded text in CSS: the only `content` values are the symbols
   "✓" (selected check) and "" (empty). All words come from markup.

   Markup contract (brief §2–§4; FLOW agent owns the markup):
   - Root: `.tbm-pro[data-tbm-ui]` > `form.tbm-pro-form` wrapping the
     five `.tbm-v12-step-panel` panels, then `.tbm-pro-results` and
     `<div class="tbm-v12-summary-slot">`.
   - Stepper: `ol.tbm-v12-stepper` (or legacy `ol.tbm-steps`) > `li`
     with `.is-active` / `.is-done`; each `li` holds
     `<span class="tbm-v12-step-num">` and
     `<span class="tbm-v12-step-label">` (the label span is REQUIRED —
     at <=360px only the current step's label is shown, the rest collapse
     to numbered dots; a bare text node cannot be hidden by CSS).
   - Step 2 cards: `.tbm-v12-cards` > `article.tbm-pro-option.tbm-v12-card`
     with `data-vehicle`, `.is-selected`, `.tbm-result-image`,
     `.tbm-result-body`, `.tbm-option-type`, `h3`, `.tbm-capacity`,
     `.tbm-v12-distance`, `.tbm-v12-per-vehicle`, `.tbm-result-bottom`
     (fare + select button), `.tbm-v12-best-value` badge,
     `.tbm-v12-selected-badge` ("Selected" text, rendered by JS).
   - Step 3 extras: `.tbm-v12-extras` > `label.tbm-v12-extra`
     (checkbox + name + description + price); `.tbm-v12-extras-total`;
     GPS block `.tbm-v12-gps`.
   - Step 4 details: `.tbm-v12-details`; per-field
     `<span class="tbm-field-error" id="err-<name>">` wired via
     `aria-describedby` + `aria-invalid`; `.tbm-v12-error-summary`.
   - Step 5 review: `.tbm-v12-review` > `.tbm-v12-review-section`
     (each with a `.tbm-v12-review-edit` button, `data-goto-step`);
     `.tbm-v12-breakdown` rows; `.tbm-v12-payment` radios;
     `.tbm-v12-submitbar` (sticky bottom).
   - Summary: `.tbm-v12-summary` (moved by JS into `aside.booking-aside`
     as first child when present, else stays in the slot);
     `.tbm-v12-summary-toggle` + `.is-expanded` on mobile.
   - Stale results: `.tbm-v12-stale-notice` + `.tbm-v12-refresh`.
   - Empty state: `.tbm-empty-result` (kept live class) / `.tbm-v12-empty`.
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Tokens + root guard
   -------------------------------------------------------------------------- */
.tbm-pro[data-tbm-ui] {
  --tbm-ink: #0F172A;
  --tbm-ink-soft: #334155;
  --tbm-muted: #64748B;
  --tbm-gold: #FBBF24;
  --tbm-gold-deep: #E8A900;
  --tbm-gold-soft: #FEF3C7;
  --tbm-paper: #F8FAFC;
  --tbm-surface: #FFFFFF;
  --tbm-line: #E2E8F0;
  --tbm-line-soft: #E9EDF0;
  --tbm-error: #973F30;
  --tbm-error-bg: #FDF0EE;
  --tbm-ok: #166534;
  --tbm-ok-bg: #F0FDF4;
  --tbm-radius: 14px;
  --tbm-radius-lg: 18px;
  --tbm-focus: #B49560;
  --tbm-shadow: 0 5px 14px rgba(25, 43, 32, .05);
  --tbm-shadow-lg: 0 12px 40px rgba(4, 27, 44, .14);

  color: var(--tbm-ink);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.6;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.tbm-pro[data-tbm-ui] *,
.tbm-v12-summary *,
.tbm-v12-submitbar * {
  box-sizing: border-box;
  min-width: 0;
}

.tbm-pro[data-tbm-ui] img,
.tbm-v12-summary img {
  max-width: 100%;
  height: auto;
}

/* Long typed values (addresses, references) must never force overflow. */
.tbm-pro[data-tbm-ui] .tbm-v12-summary,
.tbm-pro[data-tbm-ui] .tbm-review-route,
.tbm-pro[data-tbm-ui] .tbm-v12-review-section {
  overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
   1. Stepper — five steps, fits at 320px
   Live defect F-30: the old 3-step pills truncated "Details & payment"
   at 320px. V12 short labels (Journey / Vehicle / Extras / Details /
   Review) fit at 320px; at <=360px only numbered dots + the CURRENT
   step's label are shown.
   -------------------------------------------------------------------------- */
.tbm-pro[data-tbm-ui] .tbm-v12-stepper,
.tbm-pro[data-tbm-ui] .tbm-steps {
  display: flex;
  list-style: none;
  padding: 0 0 16px;
  margin: 0 0 24px;
  border-bottom: 1px solid var(--tbm-line);
  gap: 6px;
  justify-content: space-between;
}

.tbm-pro[data-tbm-ui] .tbm-v12-stepper li,
.tbm-pro[data-tbm-ui] .tbm-steps li {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #99A09D;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  min-width: 0;
}

.tbm-pro[data-tbm-ui] .tbm-v12-stepper .tbm-v12-step-num,
.tbm-pro[data-tbm-ui] .tbm-steps li > .tbm-v12-step-num {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid #E4E7E3;
  border-radius: 50%;
  background: #FFFFFF;
}

/* FIX 2026-11-25 #2 — the label span is a TEXT flex item, never a disc.
   The legacy `li > span` selectors above used to match it too, squeezing
   "Journey" into a 28px circle (it rendered "Jour" + "ney" spilling over
   the next disc). This rule states the label's own sizing explicitly so
   no future disc rule can capture it again. */
.tbm-pro[data-tbm-ui] .tbm-v12-stepper .tbm-v12-step-label {
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
}

.tbm-pro[data-tbm-ui] .tbm-v12-stepper li.is-active,
.tbm-pro[data-tbm-ui] .tbm-v12-stepper li.is-current,
.tbm-pro[data-tbm-ui] .tbm-steps li.active {
  color: var(--tbm-ink);
}

.tbm-pro[data-tbm-ui] .tbm-v12-stepper li.is-active .tbm-v12-step-num,
.tbm-pro[data-tbm-ui] .tbm-v12-stepper li.is-current .tbm-v12-step-num,
.tbm-pro[data-tbm-ui] .tbm-steps li.active > .tbm-v12-step-num {
  background: #1C2928;
  border-color: #1C2928;
  color: #EEE3CC;
}

.tbm-pro[data-tbm-ui] .tbm-v12-stepper li.is-done,
.tbm-pro[data-tbm-ui] .tbm-steps li.done {
  color: #8E6F37;
}

.tbm-pro[data-tbm-ui] .tbm-v12-stepper li.is-done .tbm-v12-step-num,
.tbm-pro[data-tbm-ui] .tbm-steps li.done > .tbm-v12-step-num {
  background: #F4EDDF;
  color: #8E6F37;
  border-color: #ECE0CA;
}

.tbm-pro[data-tbm-ui] .tbm-v12-stepper li.is-done .tbm-v12-step-num::after {
  content: "✓";
  font-size: 13px;
  line-height: 1;
}

/* <=430px: numbered dots + current-step label only. The number span is
   visually hidden for done steps (the check replaces it) but the label
   span of non-current steps is hidden, so five dots + one label fit.
   FIX 2026-11-25: breakpoint raised 360px -> 430px — at 390px all five
   labels (Journey/Vehicle/Extras/Details/Review + discs) need ~400-425px
   and the first label clipped to "Jour" (verified live on staging).
   Covers all five V12 test widths (320/360/375/390/430); above 430px the
   booking column is wide enough for all five labels. Also matches the
   legacy `active` class (server-rendered markup) as well as
   `is-active`/`is-current` (set by pro.js), so the current label can
   never be hidden by this rule. */
@media (max-width: 430px) {
  .tbm-pro[data-tbm-ui] .tbm-v12-stepper {
    gap: 4px;
  }

  .tbm-pro[data-tbm-ui] .tbm-v12-stepper li:not(.is-active):not(.is-current):not(.active) .tbm-v12-step-label {
    display: none;
  }

  .tbm-pro[data-tbm-ui] .tbm-v12-stepper li.is-active .tbm-v12-step-label,
  .tbm-pro[data-tbm-ui] .tbm-v12-stepper li.is-current .tbm-v12-step-label,
  .tbm-pro[data-tbm-ui] .tbm-v12-stepper li.active .tbm-v12-step-label {
    white-space: normal;
  }
}

/* --------------------------------------------------------------------------
   2. Form basics — labels above inputs, 16px inputs, 53px+ targets
   (live computed: input 16px/58px, submit 53–58px — preserved).
   -------------------------------------------------------------------------- */
.tbm-pro[data-tbm-ui] .tbm-form-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.tbm-pro[data-tbm-ui] .tbm-form-mark {
  flex: 0 0 auto;
  font-size: 20px;
  line-height: 1.2;
  color: var(--tbm-gold-deep);
}

.tbm-pro[data-tbm-ui] .tbm-eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #9C7E43;
}

.tbm-pro[data-tbm-ui] .tbm-form-heading h2 {
  font-size: clamp(21px, 5.5vw, 30px);
  font-weight: 850;
  line-height: 1.2;
  letter-spacing: -.5px;
  color: #092849;
  margin: 4px 0 0;
}

.tbm-pro[data-tbm-ui] .tbm-private-badge {
  margin-left: auto;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  color: var(--tbm-ink-soft);
  background: var(--tbm-paper);
  border: 1px solid var(--tbm-line);
  border-radius: 999px;
  padding: 6px 10px;
  white-space: nowrap;
}

.tbm-pro[data-tbm-ui] .tbm-section-caption {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 800;
  color: var(--tbm-ink);
  margin: 24px 0 12px;
}

.tbm-pro[data-tbm-ui] .tbm-section-caption > span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  font-size: 12px;
  font-weight: 800;
  color: #EEE3CC;
  background: #1C2928;
  border-radius: 50%;
}

.tbm-pro[data-tbm-ui] .tbm-v12-step-panel {
  min-width: 0;
}

.tbm-pro[data-tbm-ui] .tbm-v12-step-panel[hidden] {
  display: none;
}

.tbm-pro[data-tbm-ui] .tbm-v12-step-panel.is-hidden {
  display: none;
}

.tbm-pro[data-tbm-ui] .tbm-v12-step-intro {
  font-size: 14px;
  color: var(--tbm-muted);
  margin: 0 0 16px;
}

.tbm-pro[data-tbm-ui] label,
.tbm-pro-dialog label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--tbm-ink-soft);
  line-height: 1.5;
  margin: 0 0 16px;
}

.tbm-pro[data-tbm-ui] label > small,
.tbm-pro-dialog label > small {
  font-size: 12px;
  font-weight: 500;
  color: var(--tbm-muted);
}

.tbm-pro[data-tbm-ui] input:not([type="hidden"]):not([type="radio"]):not([type="checkbox"]),
.tbm-pro[data-tbm-ui] select,
.tbm-pro[data-tbm-ui] textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 53px;
  padding: 13px 14px;
  border: 1px solid #E4E7E3;
  border-radius: 11px;
  background: #FAFBF8;
  color: var(--tbm-ink);
  font: 500 16px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
  margin: 7px 0 0;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.tbm-pro[data-tbm-ui] textarea {
  min-height: 96px;
  resize: vertical;
}

.tbm-pro[data-tbm-ui] input::placeholder,
.tbm-pro[data-tbm-ui] textarea::placeholder {
  font-size: 14px;
  font-weight: 400;
  color: #959E9D;
}

.tbm-pro[data-tbm-ui] input:focus,
.tbm-pro[data-tbm-ui] select:focus,
.tbm-pro[data-tbm-ui] textarea:focus {
  outline: 0;
  border-color: var(--tbm-focus);
  box-shadow: 0 0 0 3px rgba(180, 149, 96, .15);
}

.tbm-pro[data-tbm-ui] input[type="date"],
.tbm-pro[data-tbm-ui] input[type="time"] {
  appearance: none;
  -webkit-appearance: none;
}

.tbm-pro[data-tbm-ui] .tbm-field {
  display: block;
  position: relative;
}

/* FIX 2026-11-25 #3 — icon clearance for the pick-up/drop-off fields.
   The base input rule uses three :not() pseudo-classes, giving it
   specificity (0,5,1), so this rule's plain (0,3,1) never applied: at
   desktop widths the text started at 14px, directly under the 22px icon
   (placeholder "Airport, hotel or full address" rendered as "rport, …").
   A legacy theme.css mobile-only rule gave 37px, which is why phones
   looked fine. This selector mirrors the base rule's :not() chain,
   reaching (0,6,1), so 43px clearance applies at EVERY width. */
.tbm-pro[data-tbm-ui] .tbm-field input:not([type="hidden"]):not([type="radio"]):not([type="checkbox"]) {
  padding-left: 43px;
}

.tbm-pro[data-tbm-ui] .tbm-field-icon {
  position: absolute;
  left: 14px;
  top: 20px;
  font-size: 18px;
  line-height: 1;
  color: #9B804E;
  pointer-events: none;
}

.tbm-pro[data-tbm-ui] .tbm-pro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 15px;
}

.tbm-pro[data-tbm-ui] .tbm-locations {
  display: grid;
  gap: 4px;
}

.tbm-pro[data-tbm-ui] .tbm-locations.paired {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 15px;
}

.tbm-pro[data-tbm-ui] .tbm-use-location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-top: 8px;
  padding: 8px 12px;
  border: 1px solid var(--tbm-line);
  border-radius: 10px;
  background: #FFFFFF;
  color: var(--tbm-ink-soft);
  font: 700 13px/1.3 system-ui, -apple-system, "Segoe UI", sans-serif;
  cursor: pointer;
}

.tbm-pro[data-tbm-ui] .tbm-location-message {
  display: block;
  font-size: 12px;
  color: var(--tbm-muted);
  margin-top: 6px;
}

.tbm-pro[data-tbm-ui] .tbm-location-message:empty {
  display: none;
}

.tbm-pro[data-tbm-ui] .tbm-driver-choices {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  border: 0;
  padding: 0;
  margin: 0 0 12px;
}

.tbm-pro[data-tbm-ui] .tbm-driver-choices legend {
  font-size: 14px;
  font-weight: 800;
  color: var(--tbm-ink);
  padding: 0;
  margin-bottom: 8px;
}

.tbm-pro[data-tbm-ui] .tbm-driver-choices label {
  position: relative;
  margin: 0;
  cursor: pointer;
}

.tbm-pro[data-tbm-ui] .tbm-driver-choices label > span {
  display: block;
  padding: 14px;
  border: 1px solid var(--tbm-line);
  border-radius: var(--tbm-radius);
  background: #FFFFFF;
}

.tbm-pro[data-tbm-ui] .tbm-driver-choices label:has(input:checked) > span {
  border-color: var(--tbm-gold-deep);
  background: var(--tbm-gold-soft);
}

.tbm-pro[data-tbm-ui] .tbm-driver-choices input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: var(--tbm-gold-deep);
}

.tbm-pro[data-tbm-ui] .tbm-driver-rate-note {
  font-size: 13px;
  line-height: 1.6;
  color: var(--tbm-ink-soft);
  background: var(--tbm-paper);
  border: 1px solid var(--tbm-line-soft);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0 0 16px;
}

.tbm-pro[data-tbm-ui] .tbm-rental-summary {
  font-size: 13px;
  color: var(--tbm-muted);
  margin: 4px 0 16px;
}

/* Primary + secondary actions. Live submit: gold #FBBF24, navy text,
   14px radius, 53–58px tall — preserved. */
.tbm-pro[data-tbm-ui] .tbm-pro-btn,
.tbm-pro[data-tbm-ui] .tbm-v12-continue,
.tbm-pro[data-tbm-ui] .tbm-v12-submitbar button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 53px;
  padding: 14px 19px;
  border: 0;
  border-radius: var(--tbm-radius);
  background: var(--tbm-gold);
  color: var(--tbm-ink);
  font: 800 16px/1.3 system-ui, -apple-system, "Segoe UI", sans-serif;
  cursor: pointer;
  transition: transform .15s ease, background-color .15s ease;
}

.tbm-pro[data-tbm-ui] .tbm-pro-btn:hover,
.tbm-pro[data-tbm-ui] .tbm-v12-continue:hover,
.tbm-pro[data-tbm-ui] .tbm-v12-submitbar button[type="submit"]:hover {
  transform: translateY(-1px);
  background: #FCD34D;
}

.tbm-pro[data-tbm-ui] .tbm-pro-btn:disabled,
.tbm-pro[data-tbm-ui] .tbm-v12-continue:disabled,
.tbm-pro[data-tbm-ui] .tbm-v12-submitbar button[type="submit"]:disabled {
  opacity: .65;
  cursor: wait;
  transform: none;
}

.tbm-pro[data-tbm-ui] .tbm-v12-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 53px;
  padding: 14px 19px;
  border: 1px solid var(--tbm-line);
  border-radius: var(--tbm-radius);
  background: #FFFFFF;
  color: var(--tbm-ink);
  font: 700 15px/1.3 system-ui, -apple-system, "Segoe UI", sans-serif;
  cursor: pointer;
}

.tbm-pro[data-tbm-ui] .tbm-v12-step-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.tbm-pro[data-tbm-ui] .tbm-v12-step-actions .tbm-v12-continue {
  flex: 1 1 auto;
}

.tbm-pro[data-tbm-ui] .tbm-v12-step-actions .tbm-v12-back {
  flex: 0 0 auto;
}

.tbm-pro[data-tbm-ui] .tbm-pro-fine {
  font-size: 12px;
  line-height: 1.7;
  color: #818985;
  margin: 13px 0 0;
}

.tbm-pro[data-tbm-ui] .tbm-pro-msg {
  font-size: 13px;
  line-height: 1.6;
  color: #5B726A;
  padding: 10px 0 0;
}

.tbm-pro[data-tbm-ui] .tbm-pro-msg:empty {
  display: none;
}

.tbm-pro[data-tbm-ui] .tbm-pro-msg.is-error {
  color: var(--tbm-error);
}

/* --------------------------------------------------------------------------
   3. Step 1 — travellers row + guidance hints
   Replaces the fake <details class="tbm-travellers"> (audit F-07):
   always-visible row, labels above inputs.
   -------------------------------------------------------------------------- */
.tbm-pro[data-tbm-ui] .tbm-v12-travellers {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 15px;
  padding: 16px;
  border: 1px solid var(--tbm-line);
  border-radius: var(--tbm-radius-lg);
  background: #FFFFFF;
  margin: 0 0 12px;
}

.tbm-pro[data-tbm-ui] .tbm-v12-travellers label {
  margin-bottom: 0;
}

.tbm-pro[data-tbm-ui] .tbm-v12-travellers .tbm-v12-travellers-notes {
  grid-column: 1 / -1;
}

.tbm-pro[data-tbm-ui] .tbm-v12-capacity-hint,
.tbm-pro[data-tbm-ui] .tbm-v12-autocomplete-hint {
  font-size: 13px;
  line-height: 1.6;
  color: var(--tbm-muted);
  background: var(--tbm-paper);
  border: 1px solid var(--tbm-line-soft);
  border-radius: 12px;
  padding: 10px 12px;
  margin: 0 0 12px;
}

.tbm-pro[data-tbm-ui] .tbm-v12-capacity-hint:empty,
.tbm-pro[data-tbm-ui] .tbm-v12-autocomplete-hint:empty {
  display: none;
}

/* Large-party / large-luggage guidance (v_capacity_large_pax/_bags):
   guidance only — never blocks search, so it reads as a note, not an error. */
.tbm-pro[data-tbm-ui] .tbm-v12-capacity-hint.is-large {
  color: var(--tbm-ink-soft);
  border-color: #FDE68A;
  background: #FFFBEB;
}

/* --------------------------------------------------------------------------
   4. Step 2 — vehicle grid + cards
   Audit F-13: the old list was a single column of 628x681px cards.
   V12: 1 col mobile, 2 col >=720px, 3 col >=1100px; consistent 16:10
   image with aspect-ratio reserve (no layout shift, audit F-17).
   -------------------------------------------------------------------------- */
.tbm-pro[data-tbm-ui] .tbm-pro-results:not(:empty) {
  margin-top: 32px;
}

.tbm-pro[data-tbm-ui] .tbm-result-heading {
  margin-bottom: 17px;
}

.tbm-pro[data-tbm-ui] .tbm-result-heading h3 {
  font-size: 23px;
  letter-spacing: -.6px;
  margin: 5px 0;
  color: var(--tbm-ink);
}

.tbm-pro[data-tbm-ui] .tbm-result-heading p {
  font-size: 13px;
  color: #77827C;
  margin: 0;
}

.tbm-pro[data-tbm-ui] .tbm-v12-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

@media (min-width: 720px) {
  .tbm-pro[data-tbm-ui] .tbm-v12-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .tbm-pro[data-tbm-ui] .tbm-v12-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.tbm-pro[data-tbm-ui] .tbm-pro-option.tbm-v12-card,
.tbm-pro[data-tbm-ui] .tbm-pro-option {
  display: flex;
  flex-direction: column;
  border: 1px solid #E1E7DF;
  background: #FFFFFF;
  border-radius: 17px;
  overflow: hidden;
  box-shadow: var(--tbm-shadow);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.tbm-pro[data-tbm-ui] .tbm-result-image {
  position: relative;
  background: #F5F5F0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.tbm-pro[data-tbm-ui] .tbm-result-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tbm-pro[data-tbm-ui] .tbm-no-photo {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 120px;
  font-size: 13px;
  color: var(--tbm-muted);
  text-align: center;
  padding: 16px;
}

.tbm-pro[data-tbm-ui] .tbm-result-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  flex: 1 1 auto;
}

.tbm-pro[data-tbm-ui] .tbm-option-type {
  font-size: 11px;
  font-weight: 800;
  color: #9C7E43;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.tbm-pro[data-tbm-ui] .tbm-result-body h3 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.5px;
  line-height: 1.25;
  color: var(--tbm-ink);
  margin: 0;
}

.tbm-pro[data-tbm-ui] .tbm-capacity {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tbm-pro[data-tbm-ui] .tbm-capacity > span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--tbm-line);
  border-radius: 999px;
  background: var(--tbm-paper);
  font-size: 13px;
  font-weight: 700;
  color: var(--tbm-ink-soft);
  white-space: nowrap;
}

.tbm-pro[data-tbm-ui] .tbm-v12-distance {
  font-size: 13px;
  color: var(--tbm-muted);
  margin: 0;
}

.tbm-pro[data-tbm-ui] .tbm-v12-per-vehicle {
  font-size: 12px;
  color: var(--tbm-muted);
  margin: 0;
}

.tbm-pro[data-tbm-ui] .tbm-result-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--tbm-line-soft);
}

.tbm-pro[data-tbm-ui] .tbm-result-bottom small {
  display: block;
  font-size: 11px;
  color: var(--tbm-muted);
  margin-bottom: 3px;
}

.tbm-pro[data-tbm-ui] .tbm-result-bottom strong,
.tbm-pro[data-tbm-ui] .tbm-live-total {
  font-size: 20px;
  font-weight: 850;
  color: var(--tbm-ink);
  white-space: nowrap;
}

.tbm-pro[data-tbm-ui] .tbm-result-bottom button,
.tbm-pro[data-tbm-ui] .tbm-v12-select-btn {
  flex: 0 0 auto;
  min-height: 53px;
  padding: 12px 16px;
  border: 0;
  border-radius: 12px;
  background: var(--tbm-ink);
  color: #FFFFFF;
  font: 700 14px/1.3 system-ui, -apple-system, "Segoe UI", sans-serif;
  cursor: pointer;
  transition: background-color .15s ease;
}

.tbm-pro[data-tbm-ui] .tbm-result-bottom button:hover,
.tbm-pro[data-tbm-ui] .tbm-v12-select-btn:hover {
  background: #1E293B;
}

/* "Best value" badge — cheapest card only, rank-driven, honest. */
.tbm-pro[data-tbm-ui] .tbm-v12-best-value {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--tbm-gold);
  color: var(--tbm-ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .18);
}

/* Selected state (audit F-18): gold border + check + "Selected" badge.
   The check is a symbol (::after "✓"); the badge text is JS-rendered. */
.tbm-pro[data-tbm-ui] .tbm-pro-option.tbm-v12-card.is-selected,
.tbm-pro[data-tbm-ui] .tbm-pro-option.is-selected {
  border: 2px solid var(--tbm-gold-deep);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, .35), var(--tbm-shadow);
}

.tbm-pro[data-tbm-ui] .tbm-v12-selected-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--tbm-ink);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.tbm-pro[data-tbm-ui] .tbm-v12-selected-badge::before {
  content: "✓";
  font-size: 12px;
  line-height: 1;
  color: var(--tbm-gold);
}

.tbm-pro[data-tbm-ui] .tbm-pro-option.tbm-v12-card.is-selected .tbm-result-bottom button,
.tbm-pro[data-tbm-ui] .tbm-pro-option.is-selected .tbm-result-bottom button,
.tbm-pro[data-tbm-ui] .tbm-v12-select-btn[aria-pressed="true"] {
  background: var(--tbm-gold);
  color: var(--tbm-ink);
}

/* Stale results (F-11 fix): journey edits after results exist mark the
   results stale instead of wiping them; the notice + Search again button
   sit in the results area and in the summary. */
.tbm-pro[data-tbm-ui] .tbm-v12-stale-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin: 0 0 16px;
  border: 1px solid #FDE68A;
  border-radius: 12px;
  background: #FFFBEB;
  font-size: 13px;
  line-height: 1.5;
  color: var(--tbm-ink-soft);
}

.tbm-pro[data-tbm-ui] .tbm-v12-stale-notice:empty {
  display: none;
}

.tbm-pro[data-tbm-ui] .tbm-v12-refresh {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  background: var(--tbm-ink);
  color: #FFFFFF;
  font: 700 13px/1.3 system-ui, -apple-system, "Segoe UI", sans-serif;
  cursor: pointer;
}

/* Empty state (audit F-38): server empty_reason rendered distinctly,
   with the concrete next step (custom-quote link). */
.tbm-pro[data-tbm-ui] .tbm-empty-result,
.tbm-pro[data-tbm-ui] .tbm-v12-empty {
  padding: 28px 22px;
  border: 1px solid var(--tbm-line);
  border-radius: var(--tbm-radius-lg);
  background: var(--tbm-paper);
  text-align: center;
}

.tbm-pro[data-tbm-ui] .tbm-empty-result h3,
.tbm-pro[data-tbm-ui] .tbm-v12-empty h3 {
  font-size: 20px;
  color: var(--tbm-ink);
  margin: 0 0 8px;
}

.tbm-pro[data-tbm-ui] .tbm-empty-result p,
.tbm-pro[data-tbm-ui] .tbm-v12-empty p {
  font-size: 14px;
  color: var(--tbm-muted);
  margin: 0 0 16px;
}

.tbm-pro[data-tbm-ui] .tbm-empty-result a,
.tbm-pro[data-tbm-ui] .tbm-v12-empty a,
.tbm-pro[data-tbm-ui] .tbm-v12-empty-cta {
  display: inline-flex;
  align-items: center;
  min-height: 53px;
  padding: 13px 20px;
  border-radius: var(--tbm-radius);
  background: var(--tbm-gold);
  color: var(--tbm-ink);
  font-weight: 800;
  font-size: 15px;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   5. Step 3 — extras & travel details
   Extras moved here from Step 1 (audit F-08). One card per extra.
   -------------------------------------------------------------------------- */
.tbm-pro[data-tbm-ui] .tbm-v12-extras {
  display: grid;
  gap: 12px;
  border: 0;
  padding: 0;
  margin: 0 0 16px;
}

.tbm-pro[data-tbm-ui] .tbm-v12-extras legend {
  font-size: 15px;
  font-weight: 800;
  color: var(--tbm-ink);
  padding: 0;
  margin-bottom: 4px;
}

.tbm-pro[data-tbm-ui] .tbm-v12-extra,
.tbm-pro[data-tbm-ui] .tbm-journey-extra {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  margin: 0;
  border: 1px solid var(--tbm-line);
  border-radius: var(--tbm-radius);
  background: #FFFFFF;
  cursor: pointer;
  font-size: 14px;
}

/* THE one !important in this file (documented): the old sheets set the
   extras checkbox to 22px WITH !important
   (`.tbm-journey-extra input[type=checkbox]{...width:22px!important...
   height:22px!important}` in visible-extras-fix/pro.css). A plain rule
   cannot reach the WCAG 2.2 AA >=24px target while those sheets load,
   so the size is forced here. If the six old sheets are dequeued as
   specified, this !important is harmless redundancy, not a dependency. */
.tbm-pro[data-tbm-ui] .tbm-v12-extra input[type="checkbox"],
.tbm-pro[data-tbm-ui] .tbm-journey-extra input[type="checkbox"] {
  flex: 0 0 24px;
  width: 24px !important;
  height: 24px !important;
  min-height: 24px !important;
  margin: 2px 0 0;
  accent-color: var(--tbm-gold-deep);
  cursor: pointer;
}

.tbm-pro[data-tbm-ui] .tbm-v12-extra .tbm-v12-extra-text,
.tbm-pro[data-tbm-ui] .tbm-journey-extra span {
  flex: 1 1 auto;
  min-width: 0;
}

.tbm-pro[data-tbm-ui] .tbm-v12-extra-name {
  display: block;
  font-weight: 800;
  color: var(--tbm-ink);
}

.tbm-pro[data-tbm-ui] .tbm-v12-extra-desc,
.tbm-pro[data-tbm-ui] .tbm-journey-extra small {
  display: block;
  font-weight: 400;
  font-size: 13px;
  line-height: 1.5;
  color: var(--tbm-muted);
  margin-top: 3px;
}

.tbm-pro[data-tbm-ui] .tbm-v12-extra-price,
.tbm-pro[data-tbm-ui] .tbm-journey-extra strong {
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 800;
  color: #153E50;
  white-space: nowrap;
}

/* Child Seat €0 renders as "Free", never "€0.00" (audit F-26). */
.tbm-pro[data-tbm-ui] .tbm-v12-extra-price.is-free {
  color: var(--tbm-ok);
}

.tbm-pro[data-tbm-ui] .tbm-v12-extra:has(input:checked),
.tbm-pro[data-tbm-ui] .tbm-journey-extra:has(input:checked) {
  border-color: var(--tbm-gold-deep);
  background: var(--tbm-gold-soft);
}

.tbm-pro[data-tbm-ui] .tbm-v12-extras-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--tbm-line-soft);
  border-radius: 12px;
  background: var(--tbm-paper);
  font-size: 14px;
  font-weight: 700;
  color: var(--tbm-ink);
}

.tbm-pro[data-tbm-ui] .tbm-v12-extras-total strong {
  font-size: 16px;
  font-weight: 850;
  white-space: nowrap;
}

.tbm-pro[data-tbm-ui] .tbm-no-extras {
  font-size: 13px;
  color: var(--tbm-muted);
  margin: 6px 0 14px;
}

/* GPS consent lives here in V12 (was Step 1). Same opt-in behaviour. */
.tbm-pro[data-tbm-ui] .tbm-v12-gps,
.tbm-pro[data-tbm-ui] .tbm-journey-gps {
  border: 1px solid var(--tbm-line);
  border-radius: var(--tbm-radius);
  background: #FFFFFF;
  padding: 14px 16px;
  margin: 0 0 16px;
  min-width: 0;
}

.tbm-pro[data-tbm-ui] .tbm-v12-gps summary,
.tbm-pro[data-tbm-ui] .tbm-journey-gps summary {
  font-size: 14px;
  font-weight: 800;
  color: var(--tbm-ink);
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.tbm-pro[data-tbm-ui] .tbm-v12-gps label,
.tbm-pro[data-tbm-ui] .tbm-journey-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--tbm-ink-soft);
  margin: 12px 0;
  cursor: pointer;
}

.tbm-pro[data-tbm-ui] .tbm-v12-gps input[type="checkbox"],
.tbm-pro[data-tbm-ui] .tbm-journey-consent input[type="checkbox"] {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  min-height: 24px;
  margin: 0;
  accent-color: var(--tbm-gold-deep);
}

.tbm-pro[data-tbm-ui] .tbm-v12-gps-btn,
.tbm-pro[data-tbm-ui] .tbm-journey-get-gps,
.tbm-pro[data-tbm-ui] .tbm-review-get-gps {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--tbm-line);
  border-radius: 10px;
  background: #FFFFFF;
  color: var(--tbm-ink);
  font: 700 13px/1.3 system-ui, -apple-system, "Segoe UI", sans-serif;
  cursor: pointer;
}

.tbm-pro[data-tbm-ui] .tbm-v12-gps-status,
.tbm-pro[data-tbm-ui] .tbm-journey-gps-status,
.tbm-pro[data-tbm-ui] .tbm-review-gps-status {
  display: block;
  font-size: 12px;
  color: var(--tbm-muted);
  margin-top: 10px;
}

/* --------------------------------------------------------------------------
   6. Step 4 — customer details (page section, NOT a modal)
   Inline per-field errors (audit F-37): <span class="tbm-field-error">
   wired via aria-describedby + aria-invalid; error summary moves focus
   to the first invalid field.
   -------------------------------------------------------------------------- */
.tbm-pro[data-tbm-ui] .tbm-v12-details {
  min-width: 0;
}

.tbm-pro[data-tbm-ui] .tbm-field-error {
  display: none;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--tbm-error);
  margin-top: 6px;
}

.tbm-pro[data-tbm-ui] .tbm-field-error.is-visible {
  display: block;
}

/* JS toggles .is-visible; also show when the field is marked invalid,
   so an error can never be set without being visible. */
.tbm-pro[data-tbm-ui] label:has([aria-invalid="true"]) .tbm-field-error {
  display: block;
}

.tbm-pro[data-tbm-ui] input[aria-invalid="true"],
.tbm-pro[data-tbm-ui] select[aria-invalid="true"],
.tbm-pro[data-tbm-ui] textarea[aria-invalid="true"] {
  border-color: var(--tbm-error);
  background: var(--tbm-error-bg);
  box-shadow: 0 0 0 3px rgba(151, 63, 48, .12);
}

.tbm-pro[data-tbm-ui] input[aria-invalid="true"]:focus,
.tbm-pro[data-tbm-ui] select[aria-invalid="true"]:focus,
.tbm-pro[data-tbm-ui] textarea[aria-invalid="true"]:focus {
  border-color: var(--tbm-error);
  box-shadow: 0 0 0 3px rgba(151, 63, 48, .18);
}

.tbm-pro[data-tbm-ui] .tbm-v12-error-summary {
  display: none;
  padding: 12px 14px;
  margin: 0 0 16px;
  border: 1px solid #FECDC2;
  border-radius: 12px;
  background: var(--tbm-error-bg);
  font-size: 14px;
  font-weight: 700;
  color: var(--tbm-error);
}

.tbm-pro[data-tbm-ui] .tbm-v12-error-summary.is-visible {
  display: block;
}

.tbm-pro[data-tbm-ui] .tbm-v12-terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--tbm-ink-soft);
  cursor: pointer;
}

.tbm-pro[data-tbm-ui] .tbm-v12-terms input[type="checkbox"] {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  min-height: 24px;
  margin: 0;
  accent-color: var(--tbm-gold-deep);
}

.tbm-pro[data-tbm-ui] .tbm-v12-terms a {
  color: var(--tbm-ink);
  text-decoration: underline;
}

/* Legacy checkbox row kept for the old dialog markup, if reused. */
.tbm-pro[data-tbm-ui] .tbm-checkbox,
.tbm-pro-dialog .tbm-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.tbm-pro[data-tbm-ui] .tbm-checkbox input[type="checkbox"] {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  min-height: 24px;
  margin: 0;
  accent-color: var(--tbm-gold-deep);
}

/* --------------------------------------------------------------------------
   7. Step 5 — review & confirm (read-only review + sticky submit bar)
   Fixes audit F-19: the old <dialog> hid its submit below the fold on
   mobile. Review is now a page section; the submit bar sticks to the
   viewport bottom on desktop AND mobile.
   -------------------------------------------------------------------------- */
.tbm-pro[data-tbm-ui] .tbm-v12-review {
  min-width: 0;
}

.tbm-pro[data-tbm-ui] .tbm-v12-review-section {
  padding: 16px;
  border: 1px solid var(--tbm-line);
  border-radius: var(--tbm-radius-lg);
  background: #FFFFFF;
  margin: 0 0 12px;
}

.tbm-pro[data-tbm-ui] .tbm-v12-review-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.tbm-pro[data-tbm-ui] .tbm-v12-review-section h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--tbm-ink);
  margin: 0;
}

.tbm-pro[data-tbm-ui] .tbm-v12-review-edit {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--tbm-line);
  border-radius: 10px;
  background: #FFFFFF;
  color: var(--tbm-ink);
  font: 700 13px/1.3 system-ui, -apple-system, "Segoe UI", sans-serif;
  cursor: pointer;
}

.tbm-pro[data-tbm-ui] .tbm-v12-review-section p {
  font-size: 14px;
  color: var(--tbm-ink-soft);
  margin: 4px 0;
}

.tbm-pro[data-tbm-ui] .tbm-review-route {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--tbm-ink);
}

.tbm-pro[data-tbm-ui] .tbm-review-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  color: var(--tbm-muted);
}

.tbm-pro[data-tbm-ui] .tbm-v12-breakdown {
  border-top: 1px solid var(--tbm-line-soft);
  padding-top: 12px;
  margin-top: 12px;
}

.tbm-pro[data-tbm-ui] .tbm-v12-breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 14px;
  color: var(--tbm-ink-soft);
  padding: 4px 0;
}

.tbm-pro[data-tbm-ui] .tbm-v12-breakdown-row strong {
  font-weight: 800;
  color: var(--tbm-ink);
  white-space: nowrap;
}

.tbm-pro[data-tbm-ui] .tbm-v12-breakdown-row.is-total {
  font-size: 16px;
  font-weight: 800;
  color: var(--tbm-ink);
  border-top: 1px solid var(--tbm-line);
  padding-top: 10px;
  margin-top: 6px;
}

.tbm-pro[data-tbm-ui] .tbm-v12-breakdown-row.is-total strong {
  font-size: 20px;
  font-weight: 850;
}

/* Kept live total box (dialog-era class) shares the breakdown look. */
.tbm-pro[data-tbm-ui] .tbm-pro-total {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--tbm-line-soft);
  border-radius: 12px;
  background: var(--tbm-paper);
  margin: 12px 0;
}

.tbm-pro[data-tbm-ui] .tbm-pro-total small {
  display: block;
  font-size: 12px;
  color: var(--tbm-muted);
  margin-top: 3px;
}

/* Payment choice: radios as full-width cards, one-line note each. */
.tbm-pro[data-tbm-ui] .tbm-v12-payment,
.tbm-pro[data-tbm-ui] .tbm-payment-choice {
  display: grid;
  gap: 12px;
  border: 0;
  padding: 0;
  margin: 0 0 12px;
}

.tbm-pro[data-tbm-ui] .tbm-v12-payment legend,
.tbm-pro[data-tbm-ui] .tbm-payment-choice legend {
  font-size: 15px;
  font-weight: 800;
  color: var(--tbm-ink);
  padding: 0;
  margin-bottom: 4px;
}

.tbm-pro[data-tbm-ui] .tbm-v12-pay-option,
.tbm-pro[data-tbm-ui] .tbm-payment-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--tbm-line);
  border-radius: var(--tbm-radius);
  background: #FFFFFF;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: var(--tbm-ink);
}

.tbm-pro[data-tbm-ui] .tbm-v12-pay-option input[type="radio"],
.tbm-pro[data-tbm-ui] .tbm-payment-option input[type="radio"] {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--tbm-gold-deep);
}

.tbm-pro[data-tbm-ui] .tbm-v12-pay-option:has(input:checked),
.tbm-pro[data-tbm-ui] .tbm-payment-option:has(input:checked) {
  border-color: var(--tbm-gold-deep);
  background: var(--tbm-gold-soft);
}

.tbm-pro[data-tbm-ui] .tbm-v12-pay-note {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--tbm-muted);
  margin-top: 3px;
}

.tbm-pro[data-tbm-ui] .tbm-v12-payment-note {
  font-size: 13px;
  line-height: 1.6;
  color: var(--tbm-muted);
  margin: 0 0 12px;
}

/* Sticky submit bar — desktop and mobile. Sits above the page bottom
   (safe-area aware); the floating WhatsApp bar is hidden while Step 5
   is open (§10), so the two never overlap. */
.tbm-pro[data-tbm-ui] .tbm-v12-submitbar {
  position: sticky;
  bottom: 0;
  z-index: 40;
  margin: 20px -16px -16px;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--tbm-line);
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 -8px 24px rgba(15, 23, 42, .10);
}

.tbm-pro[data-tbm-ui] .tbm-v12-submitbar .tbm-v12-submit-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--tbm-ink-soft);
  margin-bottom: 10px;
}

.tbm-pro[data-tbm-ui] .tbm-v12-submitbar .tbm-v12-submit-total strong {
  font-size: 20px;
  font-weight: 850;
  color: var(--tbm-ink);
  white-space: nowrap;
}

.tbm-pro[data-tbm-ui] .tbm-v12-submit-fine {
  font-size: 12px;
  line-height: 1.6;
  color: var(--tbm-muted);
  text-align: center;
  margin: 10px 0 0;
}

/* --------------------------------------------------------------------------
   8. Sticky summary (.tbm-v12-summary)
   Desktop: sticky panel, first child of aside.booking-aside when present
   (JS moves the node; reassurance content stays below it). Mobile
   <=720px: the same node becomes a compact bar — total + toggle for
   the full breakdown — pinned to the top while scrolling the form.
   Content is server-provided prices only; the browser never prices.
   -------------------------------------------------------------------------- */
.tbm-v12-summary-slot:empty {
  display: none;
}

.tbm-v12-summary {
  background: #FFFFFF;
  border: 1px solid var(--tbm-line);
  border-radius: var(--tbm-radius-lg);
  box-shadow: var(--tbm-shadow);
  padding: 18px;
  color: var(--tbm-ink);
  font-size: 14px;
  line-height: 1.6;
  min-width: 0;
  max-width: 100%;
}

.tbm-v12-summary h2,
.tbm-v12-summary .tbm-v12-summary-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--tbm-ink);
  margin: 0 0 10px;
}

.tbm-v12-summary .tbm-v12-summary-route {
  font-size: 15px;
  font-weight: 700;
  color: var(--tbm-ink);
  margin: 0 0 4px;
}

.tbm-v12-summary .tbm-v12-summary-meta {
  font-size: 13px;
  color: var(--tbm-muted);
  margin: 0 0 12px;
}

.tbm-v12-summary .tbm-v12-summary-rows {
  border-top: 1px solid var(--tbm-line-soft);
  padding-top: 10px;
}

.tbm-v12-summary .tbm-v12-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 3px 0;
  font-size: 13px;
  color: var(--tbm-ink-soft);
}

.tbm-v12-summary .tbm-v12-summary-row strong {
  font-weight: 800;
  color: var(--tbm-ink);
  white-space: nowrap;
}

.tbm-v12-summary .tbm-v12-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  border-top: 1px solid var(--tbm-line);
  padding-top: 10px;
  margin-top: 8px;
  font-size: 15px;
  font-weight: 800;
  color: var(--tbm-ink);
}

.tbm-v12-summary .tbm-v12-summary-total strong {
  font-size: 20px;
  font-weight: 850;
  white-space: nowrap;
}

.tbm-v12-summary .tbm-v12-summary-empty {
  font-size: 13px;
  color: var(--tbm-muted);
  margin: 0;
}

.tbm-v12-summary .tbm-v12-summary-toggle {
  display: none;
}

.tbm-v12-summary .tbm-v12-stale-notice {
  margin-bottom: 12px;
}

/* Desktop sticky panel (in the aside, or in-flow after the form). */
@media (min-width: 721px) {
  aside.booking-aside .tbm-v12-summary {
    position: sticky;
    top: 24px;
  }

  .tbm-v12-summary-slot .tbm-v12-summary {
    position: sticky;
    top: 24px;
  }
}

/* Mobile <=720px: compact bar. Collapsed by default: total + toggle
   only; .is-expanded (JS toggle) reveals the breakdown. Sticky to the
   top so it is reachable without scrolling past the whole form. */
@media (max-width: 720px) {
  .tbm-v12-summary {
    position: sticky;
    top: 8px;
    z-index: 30;
    padding: 12px 14px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
  }

  .tbm-v12-summary .tbm-v12-summary-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid var(--tbm-line);
    border-radius: 10px;
    background: #FFFFFF;
    color: var(--tbm-ink);
    font: 700 13px/1.3 system-ui, -apple-system, "Segoe UI", sans-serif;
    cursor: pointer;
  }

  .tbm-v12-summary .tbm-v12-summary-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .tbm-v12-summary .tbm-v12-summary-head .tbm-v12-summary-total {
    border-top: 0;
    padding-top: 0;
    margin-top: 0;
    flex: 1 1 auto;
  }

  .tbm-v12-summary:not(.is-expanded) .tbm-v12-summary-body {
    display: none;
  }

  .tbm-v12-summary.is-expanded .tbm-v12-summary-body {
    display: block;
    margin-top: 10px;
  }
}

/* --------------------------------------------------------------------------
   9. Success view (copy unchanged; structure kept from live pro.js)
   -------------------------------------------------------------------------- */
.tbm-pro[data-tbm-ui] .tbm-success-view {
  text-align: center;
  padding: 24px 8px;
}

.tbm-pro[data-tbm-ui] .tbm-success-logo {
  max-width: 180px;
  margin: 0 auto 12px;
}

.tbm-pro[data-tbm-ui] .tbm-success-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--tbm-ok-bg);
  color: var(--tbm-ok);
  font-size: 28px;
  font-weight: 800;
}

.tbm-pro[data-tbm-ui] .tbm-success-view h2 {
  font-size: 24px;
  color: var(--tbm-ink);
  margin: 8px 0;
}

.tbm-pro[data-tbm-ui] .tbm-success-view p {
  font-size: 14px;
  color: var(--tbm-ink-soft);
  margin: 8px 0;
}

.tbm-pro[data-tbm-ui] .tbm-success-reference {
  display: grid;
  gap: 2px;
  padding: 14px;
  margin: 16px 0;
  border: 1px solid var(--tbm-line);
  border-radius: 12px;
  background: var(--tbm-paper);
}

.tbm-pro[data-tbm-ui] .tbm-success-reference span {
  font-size: 12px;
  color: var(--tbm-muted);
}

.tbm-pro[data-tbm-ui] .tbm-success-reference strong {
  font-size: 20px;
  color: var(--tbm-ink);
}

.tbm-pro[data-tbm-ui] .tbm-success-reference small {
  font-size: 12px;
  color: var(--tbm-muted);
}

.tbm-pro[data-tbm-ui] .tbm-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(15, 23, 42, .25);
  border-top-color: var(--tbm-ink);
  border-radius: 50%;
  animation: tbm-v12-spin .8s linear infinite;
}

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

/* --------------------------------------------------------------------------
   10. WhatsApp float while Step 5 is open — EXTENDS the live rule
   Live (tbm-live-css.css): `.tbm-review-open .mobile-actions,
   .tbm-review-open #tbm-pwa-btn { visibility: hidden }`.
   The floating WhatsApp button is `.til-bottom-whatsapp` inside the
   fixed `.mobile-actions` bar (theme footer.php) — hiding the bar
   already hides it. The explicit `.til-bottom-whatsapp` selector below
   covers the button if the theme ever moves it out of that bar.
   The button is NOT un-floated (owner decision 2026-11-15); it is only
   hidden while Step 5 (review) is open, exactly like .mobile-actions.
   `body.tbm-review-open` is the class pro.js adds when review opens.
   -------------------------------------------------------------------------- */
body.tbm-review-open .mobile-actions,
body.tbm-review-open #tbm-pwa-btn,
body.tbm-review-open .til-bottom-whatsapp,
body.tbm-review-open .mobile-actions .til-bottom-whatsapp {
  visibility: hidden;
}

/* --------------------------------------------------------------------------
   11. Legacy <dialog> fallback — kept minimal
   V12 Step 5 is a page section, not a modal. If a dialog is ever still
   opened (e.g. a missed call path), it must not hide its submit: the
   dialog is capped to the viewport and its own submit bar sticks.
   -------------------------------------------------------------------------- */
dialog.tbm-pro-dialog {
  max-width: min(640px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  width: 100%;
  padding: 20px;
  border: 1px solid var(--tbm-line);
  border-radius: var(--tbm-radius-lg);
  box-shadow: var(--tbm-shadow-lg);
  color: var(--tbm-ink);
}

dialog.tbm-pro-dialog .tbm-close {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--tbm-line);
  border-radius: 50%;
  background: #FFFFFF;
  color: var(--tbm-ink);
  font-size: 20px;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   12. Narrow widths — single-column grids, no document overflow
   Live baseline (2026-11-24): no overflow at 320–430px; inputs 53–58px.
   These rules keep it that way for the new markup.
   -------------------------------------------------------------------------- */
@media (max-width: 720px) {
  .tbm-pro[data-tbm-ui] .tbm-pro-grid,
  .tbm-pro[data-tbm-ui] .tbm-locations.paired,
  .tbm-pro[data-tbm-ui] .tbm-v12-travellers,
  .tbm-pro[data-tbm-ui] .tbm-driver-choices {
    grid-template-columns: minmax(0, 1fr);
  }

  .tbm-pro[data-tbm-ui] .tbm-v12-travellers label {
    margin-bottom: 12px;
  }

  .tbm-pro[data-tbm-ui] .tbm-v12-travellers label:last-child {
    margin-bottom: 0;
  }

  .tbm-pro[data-tbm-ui] .tbm-private-badge {
    display: none;
  }

  .tbm-pro[data-tbm-ui] .tbm-v12-step-actions {
    flex-direction: column;
  }

  .tbm-pro[data-tbm-ui] .tbm-v12-step-actions .tbm-v12-back {
    order: 2;
  }

  .tbm-pro[data-tbm-ui] .tbm-result-bottom {
    flex-wrap: wrap;
  }

  .tbm-pro[data-tbm-ui] .tbm-result-bottom button,
  .tbm-pro[data-tbm-ui] .tbm-v12-select-btn {
    flex: 1 1 100%;
  }
}

@media (max-width: 360px) {
  .tbm-pro[data-tbm-ui] .tbm-form-heading h2 {
    font-size: 21px;
  }

  .tbm-pro[data-tbm-ui] .tbm-result-body {
    padding: 14px;
  }

  .tbm-pro[data-tbm-ui] .tbm-v12-submitbar {
    margin-left: -12px;
    margin-right: -12px;
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* --------------------------------------------------------------------------
   13. Reduced motion + focus visibility
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .tbm-pro[data-tbm-ui] *,
  .tbm-v12-summary *,
  .tbm-v12-submitbar * {
    animation-duration: .01ms;
    transition-duration: .01ms;
  }
}

.tbm-pro[data-tbm-ui] a:focus-visible,
.tbm-pro[data-tbm-ui] button:focus-visible,
.tbm-pro[data-tbm-ui] input:focus-visible,
.tbm-pro[data-tbm-ui] select:focus-visible,
.tbm-pro[data-tbm-ui] textarea:focus-visible,
.tbm-pro[data-tbm-ui] summary:focus-visible,
.tbm-v12-summary a:focus-visible,
.tbm-v12-summary button:focus-visible {
  outline: 3px solid var(--tbm-focus);
  outline-offset: 3px;
}
