/* ════════════════════════════════════════════════════════════════
   MR JOLLY ROLLY — BOOKING WIDGET v2 (white design system)
   Clean-slate stylesheet. Scoped exclusively under .bw-v2-wrapper.
   Legacy style.css is deliberately ignored for these components.
   ════════════════════════════════════════════════════════════════ */

/* ── Design tokens ── */
.bw-v2-wrapper {
  --bw-amber: #FFC107;
  --bw-amber-dark: #E0A800;
  --bw-dark: #212529;
  --bw-muted: #6C757D;
  --bw-border: #DEE2E6;
  --bw-border-hover: #CED4DA;
  --bw-divider: #E9ECEF;
  --bw-blue: #70b5f9;
  --bw-red: #DC3545;
  --bw-green: #198754;
  --bw-page-bg: #F0F2F5;
  --bw-radius: 8px;
  --bw-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --bw-focus: 0 0 0 3px rgba(255, 193, 7, 0.15);
}

/* ── Localized reset (sandbox from legacy styles) ── */
.bw-v2-wrapper,
.bw-v2-wrapper *,
.bw-v2-wrapper *::before,
.bw-v2-wrapper *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.bw-v2-wrapper {
  position: relative;
  width: 100%;
  max-width: 480px;
  min-width: 0;
  background: var(--bw-page-bg);
  border-radius: 12px;
  padding: 20px;
  height: auto;
  overflow: visible;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  color: var(--bw-dark);
  color-scheme: light;
  font-family: 'Barlow', 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

.bw-v2-wrapper input,
.bw-v2-wrapper select,
.bw-v2-wrapper textarea,
.bw-v2-wrapper button {
  font-family: inherit;
}

.bw-v2-wrapper h1,
.bw-v2-wrapper h2,
.bw-v2-wrapper h3,
.bw-v2-wrapper h4,
.bw-v2-wrapper p {
  margin: 0;
}

/* ── Header ── */
.bw-v2-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.bw-v2-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--bw-dark);
  line-height: 1.05;
}

.bw-v2-stepind {
  display: none;
}

/* Step number tracks the active page via :has() - pure CSS, no JS.
   Falls back to "1" on older browsers. */
.bw-v2-stepind em {
  font-style: normal;
  font-weight: 800;
  color: var(--bw-dark);
  font-size: 0;
}

.bw-v2-stepind em::before {
  content: "1";
  font-size: 13px;
  font-weight: 800;
  color: var(--bw-dark);
}

.bw-v2-wrapper:has(.pages.slide-2) .bw-v2-stepind em::before {
  content: "2";
}

.bw-v2-wrapper:has(.pages.slide-3) .bw-v2-stepind em::before {
  content: "3";
}

/* ── Stepper bars (identical on all 3 pages so nothing jumps) ── */
.bw-v2-topbar,
.bw-v2-resultbar,
.bw-v2-bookingbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  height: 54px;
  padding: 0 8px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--bw-divider);
  background: transparent;
}

.bw-v2-resultbar,
.bw-v2-bookingbar {
  justify-content: space-between;
}

/* Top-right step counter (1 / 3, 2 / 3, 3 / 3) */
.bw-v2-topbar::after,
.bw-v2-resultbar::after,
.bw-v2-bookingbar::after {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748B;
  white-space: nowrap;
}

.bw-v2-topbar::after {
  content: "1 / 3";
}

.bw-v2-resultbar::after {
  content: "2 / 3";
}

.bw-v2-bookingbar::after {
  content: "3 / 3";
}

.bw-v2-barwrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}

.bw-v2-step {
  font-size: 11px;
  font-weight: 700;
  color: #64748B;
  background: transparent;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 14px;
  white-space: nowrap;
  border-radius: 9999px;
  transition: background .18s, color .18s, box-shadow .18s;
}

.bw-v2-step.current {
  background: #1E2029;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

.bw-v2-arrow {
  color: #CBD5E1;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.bw-v2-back {
  order: -1;
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  white-space: nowrap;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 50%;
  font-size: 0;
  color: var(--bw-dark);
  cursor: pointer;
  transition: border-color .15s, color .15s;
}

.bw-v2-back::before {
  content: "\2190";
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

/* Invisible 44px hit area (mobile-friendly tap target) */
.bw-v2-back::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}

.bw-v2-back:hover {
  border-color: var(--bw-dark);
  color: var(--bw-dark);
}

/* ── Shells (uniform whitespace across all 3 steps) ── */
.bw-v2-shell,
.bw-v2-resultshell,
.bw-v2-bookingshell {
  background: transparent;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ════════════════════════════════════════════════════════════════
   STEP 1 — GET A QUOTE
   ════════════════════════════════════════════════════════════════ */

/* ── Routing card ── */
.bw-v2-routebox {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--bw-divider);
  border-radius: var(--bw-radius);
  padding: 12px 14px;
  box-shadow: var(--bw-shadow);
}

/* Vertical dotted rail — runs dot-centre (FROM) to dot-centre (TO).
   top/bottom couple to the fixed 12px card padding + 40px row geometry,
   so the rail always joins the dots even when VIA rows are injected,
   and never pokes past the red dot. */
.bw-v2-routebox::before {
  content: "";
  position: absolute;
  left: 18px; /* centres under the 10px dots in the left gutter */
  top: 32px;
  bottom: 32px;
  width: 2px;
  border-left: 2px dotted #CBD5E1;
  pointer-events: none;
  z-index: 1;
}

/* Route rows: inline axis [dot][label][input] with a 10px rhythm */
.bw-v2-fieldrow {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0;
  border-radius: 8px;
  cursor: text;
  transition: background .15s;
}

.bw-v2-fieldrow:hover {
  background: #F8F9FA;
}

/* Origin dot — 10px flex target, yellow, leading the FROM row */
.bw-v2-routebox > .bw-v2-fieldrow:first-child::before {
  content: "";
  position: static;
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #F59E0B;
}

/* Destination dot — 10px, red, leading the TO row */
.bw-v2-routebox > .bw-v2-fieldrow:last-child::before {
  content: "";
  position: static;
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #EF4444;
}

/* Labels: strict 42px column so every input starts on the same axis */
.bw-v2-lbl {
  display: block;
  width: 42px;
  flex-shrink: 0;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #475569;
  white-space: nowrap;
}

/* FROM / TO inputs — 40px high, flexing to fill the row; right gutter
   stays clear of the "+" overlay button */
.bw-v2-routebox .bw-v2-inp {
  flex: 1 1 auto;
  min-width: 0;
  box-sizing: border-box !important;
  height: 40px !important;
  margin: 0 !important;
  padding: 0 46px 0 12px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 400;
  color: #212529;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}

.bw-v2-routebox .bw-v2-inp:hover {
  background-color: #FAFBFC;
  border-color: var(--bw-border-hover);
}

.bw-v2-routebox .bw-v2-inp:focus {
  background: #FFFFFF;
  border-color: var(--bw-amber);
  box-shadow: var(--bw-focus);
}

.bw-v2-routebox .bw-v2-inp::placeholder {
  color: #ADB5BD;
  font-weight: 400;
  font-size: 13px;
}

/* ── Via stops (rows injected by JS keep legacy class names) ── */
.bw-v2-via-wrap {
  display: none;
  flex-direction: column;
  gap: 8px;
}

.bw-v2-via-wrap.show {
  display: flex;
}

/* Injected VIA rows — same 40px rhythm as FROM / TO */
.bw-v2-wrapper .w-via-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0;
  border-radius: 8px;
  cursor: text;
  transition: background .15s;
}

.bw-v2-wrapper .w-via-row:hover {
  background: #F8F9FA;
}

/* Blue VIA marker — 10px flex target, leading the VIA row */
.bw-v2-routebox .w-via-row::before {
  content: "";
  position: static;
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #70B5F9;
}

.bw-v2-wrapper .w-via-row .w-lbl {
  display: block;
  width: 42px;
  flex-shrink: 0;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #475569 !important; /* neutralizes JS inline color */
  white-space: nowrap;
}

.bw-v2-wrapper .w-via-row .w-inp {
  flex: 1 1 auto;
  min-width: 0;
  box-sizing: border-box !important;
  height: 40px !important;
  margin: 0 !important;
  padding: 0 50px 0 12px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 400;
  color: #212529;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}

.bw-v2-wrapper .w-via-row .w-inp::placeholder {
  color: #ADB5BD;
  font-weight: 400;
  font-size: 13px;
}

.bw-v2-wrapper .w-via-row .w-inp:hover {
  background-color: #FAFBFC;
  border-color: var(--bw-border-hover);
}

.bw-v2-wrapper .w-via-row .w-inp:focus {
  background: #FFFFFF;
  border-color: var(--bw-amber);
  box-shadow: var(--bw-focus);
}

/* "×" remove button — absolutely positioned, vertically centred,
   flush to the right edge, stacked above everything in the row */
.bw-v2-wrapper .w-via-row .w-rm {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  min-width: 34px;
  width: 34px;
  min-height: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F1F3F5;
  border: none;
  border-radius: 50%;
  color: var(--bw-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  transition: background .15s, color .15s;
}

.bw-v2-wrapper .w-via-row .w-rm:hover {
  background: #FDE8E8;
  color: var(--bw-red);
}

/* ── "+ Add stop" layer: an absolute overlay that takes zero layout
   height (no more dead strip between FROM and TO). Clicks pass
   straight through to the inputs; only the button itself is active. ── */
.bw-v2-fieldrow#via-btn-row {
  position: absolute;
  inset: 0;
  margin: 0 !important;
  padding: 0 !important;
  border: none;
  border-radius: 0;
  pointer-events: none;
  z-index: 2;
}

.bw-v2-fieldrow#via-btn-row:hover {
  background: transparent;
}

.bw-v2-addstop {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1E2029;
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 0; /* hides legacy "+ Add stop" text */
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  transition: background .15s, transform .15s;
  pointer-events: auto;
  z-index: 3;
}

.bw-v2-addstop::before {
  content: "+";
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
}

.bw-v2-addstop:hover {
  background: #000;
  transform: translateY(-50%) scale(1.06);
}

/* ── Segmented controls (PICK-UP / SERVICES) ── */
.bw-v2-optsgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.bw-v2-optcell {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.bw-v2-sec {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--bw-muted);
  margin-bottom: 8px;
}

.bw-v2-segrow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: var(--bw-divider);
  border-radius: var(--bw-radius);
  padding: 4px;
}

.bw-v2-seg {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  cursor: pointer;
  border-radius: 6px;
  overflow: hidden;
}

.bw-v2-seg input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.bw-v2-seg-bg {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background: transparent;
  transition: background .15s, box-shadow .15s;
}

.bw-v2-seg-text {
  position: relative;
  z-index: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--bw-muted);
  padding: 0 8px;
  text-align: center;
  transition: color .15s;
}

.bw-v2-seg input:checked ~ .bw-v2-seg-bg {
  background: var(--bw-dark);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.bw-v2-seg input:checked ~ .bw-v2-seg-text {
  color: #fff;
  font-weight: 700;
}

.bw-v2-seg:hover .bw-v2-seg-text {
  color: var(--bw-dark);
}

.bw-v2-seg input:checked:hover ~ .bw-v2-seg-text {
  color: #fff;
}

/* ── Pickup status tag (class names managed by JS) ── */
.bw-v2-wrapper .pickup-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #1E2029;
  border: none;
  border-radius: 9999px;
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #FACC15;
  margin-top: 10px;
  width: fit-content;
}

.bw-v2-wrapper .ptag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #FACC15;
  flex-shrink: 0;
  animation: bw-v2-pulse 1.5s infinite;
}

.bw-v2-wrapper .pickup-tag.later-tag .ptag-dot {
  background: #FACC15;
}

@keyframes bw-v2-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ── Scheduled date/time pickers ── */
.bw-v2-timepickers {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.bw-v2-timepickers.show {
  display: grid;
}

.bw-v2-inp-sm {
  width: 100%;
  box-sizing: border-box !important;
  height: 48px !important;
  padding: 0 16px;
  background: #FFFFFF;
  border: 1px solid var(--bw-border);
  border-radius: var(--bw-radius);
  font-size: 15px;
  color: #212529;
  outline: none;
  color-scheme: light;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}

.bw-v2-inp-sm:hover {
  background-color: #FAFBFC;
  border-color: var(--bw-border-hover);
}

.bw-v2-inp-sm:focus {
  background: #FFFFFF;
  border-color: var(--bw-amber);
  box-shadow: var(--bw-focus);
}

/* ── Return trip toggle ── */
.bw-v2-check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 2px;
  cursor: pointer;
}

.bw-v2-check-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--bw-dark);
}

.bw-v2-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.bw-v2-switch {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: var(--bw-divider);
  flex-shrink: 0;
  transition: background .15s;
}

.bw-v2-switch-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform .15s;
}

.bw-v2-check input:checked ~ .bw-v2-switch {
  background: var(--bw-dark);
}

.bw-v2-check input:checked ~ .bw-v2-switch .bw-v2-switch-knob {
  transform: translateX(18px);
}

/* ── Tariff selector (autocalculated — kept hidden) ── */
.bw-v2-sel-full {
  display: none !important;
}

/* ── Passengers & Luggage + CTA ── */
.bw-v2-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.bw-v2-fg1 label,
.bw-v2-fg2 label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--bw-muted);
  margin-bottom: 8px;
}

.bw-v2-selectwrap {
  position: relative;
}

.bw-v2-sel1,
.bw-v2-sel2 {
  width: 100%;
  box-sizing: border-box !important;
  height: 48px !important;
  padding: 0 38px 0 16px;
  background: #FFFFFF;
  border: 1px solid var(--bw-border);
  border-radius: var(--bw-radius);
  font-size: 15px;
  font-weight: 600;
  color: #212529;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}

.bw-v2-sel1:hover,
.bw-v2-sel2:hover {
  background-color: #FAFBFC;
  border-color: var(--bw-border-hover);
}

.bw-v2-sel1:focus,
.bw-v2-sel2:focus {
  background: #FFFFFF;
  border-color: var(--bw-amber);
  box-shadow: var(--bw-focus);
}

.bw-v2-chev {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--bw-muted);
  pointer-events: none;
}

.bw-v2-quotebtn {
  grid-column: 1 / -1;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bw-amber);
  color: #000;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s, transform .1s;
  margin-top: 12px;
}

.bw-v2-quotebtn:hover {
  background: var(--bw-amber-dark);
}

.bw-v2-quotebtn:active {
  transform: scale(0.98);
}

.bw-v2-quotebtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.bw-v2-caricon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.bw-v2-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 0, 0, 0.25);
  border-top-color: #000;
  border-radius: 50%;
  animation: bw-v2-spin .65s linear infinite;
}

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

/* ── Inline error ── */
.bw-v2-error {
  display: none;
  align-items: flex-start;
  gap: 10px;
  background: #FDF2F2;
  border: 1px solid #F5C2C7;
  color: #A91E22;
  border-radius: var(--bw-radius);
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  margin-top: 14px;
  box-shadow: 0 2px 8px rgba(169, 30, 34, 0.08);
}

.bw-v2-error::before {
  content: "!";
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  border-radius: 50%;
  background: #A91E22;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.bw-v2-error.show {
  display: flex;
}

/* ════════════════════════════════════════════════════════════════
   STEP 2 — YOUR QUOTE (dark charcoal cards)
   ════════════════════════════════════════════════════════════════ */

/* ── Step 2 cards pack tighter: 8px rhythm between cards ── */
.bw-v2-resultshell {
  gap: 8px;
}

/* ── Top row: distance / time ── */
.bw-v2-stats {
  display: flex;
  gap: 12px;
}

.bw-v2-stat {
  flex: 1;
  min-width: 0;
  background: var(--bw-dark);
  border-radius: var(--bw-radius);
  padding: 12px 14px;
  box-shadow: var(--bw-shadow);
}

.bw-v2-stat-val {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bw-v2-stat-lbl {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #9BA3AF;
  margin-top: 2px;
}

/* ── Pickup timing info ── */
.bw-v2-pickupinfo {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--bw-dark);
  border-radius: var(--bw-radius);
  padding: 12px 14px;
  box-shadow: var(--bw-shadow);
}

.bw-v2-wpi-icon {
  position: relative;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  font-size: 0;
}

.bw-v2-wpi-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2370b5f9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='13' r='8'/%3E%3Cpath d='M12 9v4l2 2'/%3E%3Cpath d='M9 2h6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.bw-v2-wpi-body {
  flex: 1;
  min-width: 0;
}

.bw-v2-wpi-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--bw-blue);
  margin-bottom: 4px;
}

.bw-v2-wpi-detail {
  font-size: 13px;
  color: #D1D5DB;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.bw-v2-wpi-detail strong {
  color: #fff;
}

/* ── Route summary ── */
.bw-v2-route {
  background: var(--bw-dark);
  border-radius: var(--bw-radius);
  padding: 12px 14px;
  box-shadow: var(--bw-shadow);
}

.bw-v2-rt {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #9BA3AF;
  margin-bottom: 10px;
}

.bw-v2-rrow {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 4px 0;
}

.bw-v2-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

.bw-v2-dot-p {
  background: var(--bw-amber);
  box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.22);
}

.bw-v2-dot-d {
  background: var(--bw-red);
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.22);
}

/* Via legs injected by JS keep legacy class names */
.bw-v2-wrapper .dot.v {
  background: var(--bw-blue);
  border-radius: 2px;
  box-shadow: 0 0 0 3px rgba(112, 181, 249, 0.22);
}

.bw-v2-raddr,
.bw-v2-wrapper .w-raddr {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: #E5E7EB;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.bw-v2-rleg,
.bw-v2-wrapper .w-rleg {
  font-size: 12px;
  font-style: italic;
  color: #9BA3AF;
  margin-left: 20px;
  padding: 2px 0 4px;
}

/* ── Fare card (focal point) ── */
.bw-v2-fare {
  position: relative;
  background: var(--bw-dark);
  border-radius: var(--bw-radius);
  padding: 16px 14px 12px 14px;
  text-align: center;
  box-shadow: var(--bw-shadow);
  overflow: hidden;
}

.bw-v2-fare-lbl {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #9BA3AF;
  margin-bottom: 4px;
}

.bw-v2-fare-amt {
  font-size: clamp(2.4rem, 9vw, 3rem);
  font-weight: 800;
  color: var(--bw-blue);
  line-height: 1;
}

.bw-v2-fare-amt sup {
  font-size: 1.1rem;
  vertical-align: super;
  line-height: 0;
  color: var(--bw-blue);
}

.bw-v2-fare-note {
  font-size: 11px;
  color: #9BA3AF;
  margin-top: 4px;
}

/* ── Fare breakdown ── */
.bw-v2-bk {
  background: var(--bw-dark);
  border-radius: var(--bw-radius);
  padding: 14px 16px;
  box-shadow: var(--bw-shadow);
}

.bw-v2-bk-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #9BA3AF;
  margin-bottom: 8px;
}

.bw-v2-bk-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 13px;
  padding: 5px 0;
  color: #9BA3AF;
}

.bw-v2-bk-row span:last-child {
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  margin-left: 8px;
}

.bw-v2-bk-row.tot {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  margin-top: 8px;
  padding-top: 10px;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
}

.bw-v2-bk-sub {
  font-size: 11px;
  color: #6C757D;
  font-style: italic;
  margin-top: 2px;
}

/* ── Proceed CTA ── */
.bw-v2-proceedbtn {
  width: 100%;
  height: 44px;
  background: var(--bw-amber);
  color: #000;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  margin-top: 12px;
  transition: background .15s, transform .1s;
}

.bw-v2-proceedbtn:hover {
  background: var(--bw-amber-dark);
}

.bw-v2-proceedbtn:active {
  transform: scale(0.98);
}

/* ════════════════════════════════════════════════════════════════
   STEP 3 — BOOKING
   ════════════════════════════════════════════════════════════════ */

/* ── Ultra-compact locked-in quote banner (single row) ── */
.bw-v2-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: #1E2029;
  border-radius: 8px;
  padding: 8px 14px;
  height: 44px;
  box-sizing: border-box;
  margin-bottom: 16px;
}

.bw-v2-sum-route {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: #E5E7EB;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bw-v2-sum-route strong {
  color: #fff;
  font-size: 13px;
}

.bw-v2-sum-route > span {
  color: #E5E7EB;
}

/* Pickup/return scheduling details fold into the banner only on
   non-Summary views; hidden here to keep the row ultra-compact. */
.bw-v2-sum-when,
#bsum-return-wrap,
.bw-v2-sum-fare-lbl {
  display: none !important;
}

.bw-v2-sum-fare {
  text-align: right;
  flex-shrink: 0;
  margin-left: 8px;
}

.bw-v2-sum-fare-amt {
  font-size: 18px;
  font-weight: 800;
  color: #38BDF8;
  line-height: 1;
  white-space: nowrap;
}

.bw-v2-sum-fare-amt sup {
  font-size: 11px;
  vertical-align: super;
  line-height: 0;
  color: #38BDF8;
}

/* ── Form sections ── */
.bw-v2-formsec {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748B;
  margin: 16px 0 8px;
  border: none !important;
  border-inline-start: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding-inline-start: 0;
}

/* First section sits flush under the locked-in quote banner */
.bw-v2-summary + .bw-v2-formsec {
  margin-top: 0;
}

/* Keep structural containers free of any stray vertical accents */
.bw-v2-formsec::before,
.bw-v2-formsec::after,
.bw-v2-formsec > *::before,
.bw-v2-formsec > *::after,
.bw-v2-bookingshell > * {
  border-inline-start: none !important;
  content: none !important;
}

.bw-v2-bookingshell,
.bw-v2-formgrid,
.bw-v2-fgroup {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* 2x2 grid — Step 3 stays 2-column down to 360px, then stacks */
.bw-v2-formgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: start;
}

.bw-v2-formgrid.bw-v2-full {
  grid-template-columns: 1fr;
}

.bw-v2-fgroup {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.bw-v2-fgroup label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--bw-muted);
}

.bw-v2-finp {
  width: 100%;
  box-sizing: border-box !important;
  height: 38px !important;
  padding: 0 10px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  font-size: 14px;
  color: #212529;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}

.bw-v2-finp::placeholder {
  color: #ADB5BD;
  font-size: 14px;
}

.bw-v2-finp:hover {
  background-color: #FAFBFC;
  border-color: var(--bw-border-hover);
}

.bw-v2-finp:focus {
  background: #FFFFFF;
  border-color: #1E2029;
  box-shadow: 0 0 0 1px #1E2029;
}

.bw-v2-finp.invalid {
  border-color: var(--bw-red);
}

.bw-v2-finp.invalid:focus {
  border-color: var(--bw-red);
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.18);
}

.bw-v2-ftextarea {
  width: 100%;
  box-sizing: border-box !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 8px 10px !important;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  font-size: 14px;
  color: #212529;
  outline: none;
  resize: vertical !important;
  overflow-y: auto !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  line-height: 1.4;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}

/* Webkit paints a native grip in the bottom-right corner — erase it */
.bw-v2-ftextarea::-webkit-resizer {
  background-color: transparent !important;
  background-image: none !important;
}

.bw-v2-ftextarea::placeholder {
  color: #ADB5BD;
  font-size: 14px;
}

.bw-v2-ftextarea:hover {
  background-color: #FAFBFC;
  border-color: var(--bw-border-hover);
}

.bw-v2-ftextarea:focus {
  background: #FFFFFF;
  border-color: #1E2029;
  box-shadow: 0 0 0 1px #1E2029;
}

.bw-v2-formerror {
  display: none;
  align-items: flex-start;
  gap: 10px;
  background: #FDF2F2;
  border: 1px solid #F5C2C7;
  color: #A91E22;
  border-radius: var(--bw-radius);
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  margin-top: 14px;
  box-shadow: 0 2px 8px rgba(169, 30, 34, 0.08);
}

.bw-v2-formerror::before {
  content: "!";
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  border-radius: 50%;
  background: #A91E22;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.bw-v2-formerror.show {
  display: flex;
}

.bw-v2-submitbtn {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bw-amber);
  color: #000;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  margin-top: 24px;
  transition: background .15s, transform .1s;
}

.bw-v2-submitbtn:hover {
  background: var(--bw-amber-dark);
}

.bw-v2-submitbtn:active {
  transform: scale(0.98);
}

.bw-v2-submitbtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.bw-v2-submitspinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 0, 0, 0.25);
  border-top-color: #000;
  border-radius: 50%;
  animation: bw-v2-spin .65s linear infinite;
}

/* ── Confirmation ── */
.bw-v2-confirm {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 12px 24px;
  gap: 14px;
  width: 100%;
}

.bw-v2-confirm.show {
  display: flex;
}

.bw-v2-confirm-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bw-amber);
  color: #000;
  font-size: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  margin: 0 auto;
  box-shadow: 0 6px 20px rgba(255, 193, 7, 0.35);
}

.bw-v2-confirm-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 26px;
  font-weight: 900;
  color: var(--bw-dark);
  letter-spacing: 0.5px;
}

.bw-v2-confirm-msg {
  font-size: 14px;
  font-weight: 600;
  color: #495057;
  line-height: 1.6;
  max-width: 320px;
}

.bw-v2-confirm-msg span {
  color: var(--bw-dark) !important; /* overrides legacy inline amber */
  font-weight: 800;
}

.bw-v2-confirm-ref {
  font-size: 13px;
  color: var(--bw-muted);
}

.bw-v2-confirm-ref strong {
  color: var(--bw-dark);
}

.bw-v2-newbookingbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 18px auto 0;
  padding: 12px 24px;
  background: var(--bw-amber);
  color: #000;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s;
}

.bw-v2-newbookingbtn:hover {
  background: var(--bw-amber-dark);
}

/* ── Accessible focus for buttons ── */
.bw-v2-wrapper button:focus-visible,
.bw-v2-wrapper .bw-v2-seg:focus-within {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.45);
}

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .bw-v2-wrapper {
    padding: 16px;
    max-width: calc(100vw - 32px);
    margin-inline: auto;
    overflow-x: hidden;
  }

  .bw-v2-title {
    font-size: clamp(1.8rem, 5vw, 2.4rem);
  }

  .bw-v2-back {
    width: 36px;
    height: 36px;
    min-width: 0;
    padding: 0;
  }

  /* Snappy taps + no flash-grey highlight on iOS */
  .bw-v2-wrapper button,
  .bw-v2-wrapper .bw-v2-seg,
  .bw-v2-wrapper .bw-v2-check,
  .bw-v2-wrapper select {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .bw-v2-wrapper button,
  .bw-v2-wrapper select,
  .bw-v2-wrapper .bw-v2-seg,
  .bw-v2-wrapper .bw-v2-check,
  .bw-v2-wrapper .bw-v2-selectwrap {
    min-height: 44px;
  }

  /* Compact add-stop circle on mobile so it never crowds the inputs */
  .bw-v2-addstop {
    width: 30px;
    min-width: 30px;
    height: 30px;
    min-height: 30px;
  }

  .bw-v2-addstop::before {
    font-size: 15px;
  }

  .bw-v2-wrapper .w-via-row .w-rm::after,
  .bw-v2-addstop::after {
    content: "";
    position: absolute;
    inset: 50% auto auto 50%;
    width: 44px;
    height: 44px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
  }

  .bw-v2-switch {
    min-width: 44px;
  }
}

/* Tablet phone-hold: centered card with soft elevation */
@media (min-width: 481px) and (max-width: 768px) {
  .bw-v2-wrapper {
    padding: 24px;
    max-width: 480px;
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  }

  .bw-v2-wrapper input,
  .bw-v2-wrapper select,
  .bw-v2-wrapper textarea {
    font-size: 14px;
  }

  .bw-v2-formgrid {
    gap: 12px;
  }
}

/* iOS/Safari zooms into fields smaller than 16px — keep inputs at
   16px through 640px so focusing a field never blows up the page. */
@media (max-width: 640px) {
  .bw-v2-wrapper input,
  .bw-v2-wrapper select,
  .bw-v2-wrapper textarea {
    font-size: 16px;
  }

  /* ── Compact bars (Steps 2 & 3): single active tab + back, no collisions ── */
  .bw-v2-resultbar,
  .bw-v2-bookingbar {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    overflow: hidden !important;
    gap: 6px !important;
    padding: 6px 10px !important;
    margin-bottom: 12px !important;
    height: auto;
    min-height: 0;
  }

  .bw-v2-resultbar .bw-v2-back,
  .bw-v2-bookingbar .bw-v2-back {
    position: static !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0;
  }

  .bw-v2-resultbar .bw-v2-back::before,
  .bw-v2-bookingbar .bw-v2-back::before {
    font-size: 14px;
  }

  /* Only the active tab stays visible — nothing can overlap the back arrow */
  .bw-v2-resultbar .bw-v2-step:not(.current),
  .bw-v2-bookingbar .bw-v2-step:not(.current) {
    display: none !important;
  }

  .bw-v2-resultbar .bw-v2-step.current,
  .bw-v2-bookingbar .bw-v2-step.current {
    display: inline-flex !important;
    font-size: 11px !important;
    padding: 4px 10px !important;
    white-space: nowrap !important;
  }

  /* Drop the arrows between hidden tabs so no orphan "→" remains */
  .bw-v2-resultbar .bw-v2-arrow,
  .bw-v2-bookingbar .bw-v2-arrow {
    display: none !important;
  }

  .bw-v2-bookingbar::after {
    font-size: 10px;
  }

  /* ── Topbar (Step 1): always fits on any device — pills shrink, never wrap ── */
  .bw-v2-topbar {
    gap: 3px !important;
    padding: 0 4px !important;
    height: auto;
    min-height: 46px;
  }

  .bw-v2-topbar .bw-v2-step {
    font-size: 10px !important;
    padding: 4px 7px !important;
    letter-spacing: 0.03em !important;
  }

  .bw-v2-topbar .bw-v2-arrow {
    font-size: 8px;
    flex-shrink: 0;
  }

  /* ── Centered headline ── */
  .bw-v2-title {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 12px auto;
    font-size: 20px;
    line-height: 1.2;
  }

  /* ── Compact add / remove via-stop buttons ── */
  .bw-v2-addstop {
    right: 8px !important;
    z-index: 5 !important;
    width: 24px !important;
    min-width: 24px !important;
    height: 24px !important;
    min-height: 24px !important;
    flex-shrink: 0 !important;
  }

  .bw-v2-addstop::before {
    font-size: 12px !important;
    font-weight: 700;
  }

  .bw-v2-wrapper .w-via-row .w-rm {
    width: 24px !important;
    min-width: 24px !important;
    height: 24px !important;
    min-height: 24px !important;
    right: 8px !important;
    flex-shrink: 0 !important;
    font-size: 12px !important;
    font-weight: 700;
  }

  /* Clearance so placeholder text never collides with the stop icons */
  .bw-v2-routebox .bw-v2-inp,
  .bw-v2-wrapper .w-via-row .w-inp {
    padding-right: 34px !important;
  }

  /* ── Centered action CTAs ── */
  .bw-v2-quotebtn,
  .bw-v2-proceedbtn,
  .bw-v2-submitbtn {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 44px;
    margin: 16px auto 0 auto;
    width: 100%;
  }

  /* ── Step 3: rows spaced 12px so the page fits without long scrolling ── */
  .bw-v2-bookingshell {
    gap: 0 !important;
  }

  .bw-v2-formgrid:has(+ .bw-v2-formgrid) {
    margin-bottom: 12px;
  }

  /* ── Step 2: ultra-compact summary cards ── */
  .bw-v2-resultshell {
    gap: 6px !important;
  }

  .bw-v2-stat,
  .bw-v2-pickupinfo,
  .bw-v2-route,
  .bw-v2-fare,
  .bw-v2-bk {
    padding: 8px 10px !important;
  }

  .bw-v2-stat-val {
    font-size: 18px !important;
  }

  .bw-v2-stat-lbl {
    font-size: 9px !important;
  }

  .bw-v2-rrow {
    padding: 2px 0;
  }

  .bw-v2-fare-amt {
    font-size: 24px !important;
  }

  .bw-v2-fare-lbl {
    font-size: 9px !important;
  }

  .bw-v2-fare-note {
    font-size: 10px;
  }
}

/* Step 3 personal details: clean 2-column side-by-side rows 350–640px */
@media (min-width: 350px) and (max-width: 640px) {
  .bw-v2-formgrid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  .bw-v2-finp,
  .bw-v2-ftextarea {
    height: 38px !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 480px) {
  .bw-v2-wrapper {
    padding: 16px;
    width: 100%;
    border-radius: 0;
  }

  .bw-v2-optsgrid {
    grid-template-columns: 1fr;
  }

  .bw-v2-wrapper input,
  .bw-v2-wrapper select,
  .bw-v2-wrapper textarea {
    font-size: 16px;
  }

  .bw-v2-formgrid {
    gap: 8px;
  }

  .bw-v2-fare-amt {
    font-size: 24px;
  }
}

/* -- Ultra-narrow (320px-class) stepper safety -- */
@media (max-width: 360px) {
  .bw-v2-topbar,
  .bw-v2-resultbar,
  .bw-v2-bookingbar {
    padding: 0 4px;
  }

  .bw-v2-step {
    font-size: 11px;
    padding: 5px 8px;
    letter-spacing: 0.4px;
  }

  /* Always show all three chips — shrink further so "BOOKING" never clips */
  .bw-v2-topbar {
    gap: 2px !important;
    padding: 0 3px !important;
  }

  .bw-v2-topbar .bw-v2-step {
    font-size: 9px !important;
    padding: 4px 5px !important;
    letter-spacing: 0 !important;
  }

  /* Decorative arrows drop out so all three step chips always fit
     side by side and the last chip ("Booking") is never clipped. */
  .bw-v2-arrow {
    display: none;
  }
}

/* 320px floor: absolute last-resort squeeze */
@media (max-width: 330px) {
  .bw-v2-topbar .bw-v2-step {
    font-size: 8px !important;
    padding: 3px 4px !important;
  }

  .bw-v2-topbar {
    gap: 1px !important;
  }
}

/* Below 350px (ultra-narrow legacy devices) Step 3 grids stack */
@media (max-width: 349px) {
  .bw-v2-formgrid {
    grid-template-columns: 1fr !important;
  }
}
