.s4-booking {
  --booking-bg: #0b0b0b;
  --booking-panel: #ffffff;
  --booking-soft: #f7f1e5;
  --booking-text: #171717;
  --booking-muted: #6c665c;
  --booking-line: rgba(0, 0, 0, 0.1);
  --booking-gold: #d7a900;
  --booking-orange: #ff6a2b;
  color: var(--booking-text);
}

.s4-booking * {
  box-sizing: border-box;
}

/* iOS Safari "first tap activates :hover, second tap registers click" fix.
   Client report (Kwork May 17 msg 395): "Клик на кнопки с первого раза не
   переводит, нужно два и более раз нажимать". On touch devices we strip the
   hover transform/translate so the first tap fires click immediately. */
@media (hover: none) and (pointer: coarse) {
  .s4-booking button:hover,
  .s4-booking .s4-primary:hover,
  .s4-booking .s4-secondary:hover,
  .s4-booking .s4-payment-option:hover,
  .s4-booking .s4-vehicle:hover,
  .s4-booking .s4-step-dot:hover,
  .s4-booking .s4-tip-chip:hover,
  .s4-booking .s4-quick-zone:hover,
  .s4-booking .s4-large-group__btn:hover,
  .s4-booking .s4-large-group__btn--call:hover,
  .s4-booking .s4-large-group__btn--whatsapp:hover,
  .s4-booking .s4-ac-loc:hover,
  .s4-booking .s4-ac-item:hover,
  .s4-booking .s4-route-meta__item:hover,
  .s4-booking .s4-mp-btn:hover,
  .s4-booking .s4-mp-pickup:hover,
  .s4-booking .s4-mp-dropoff:hover,
  .s4-booking .s4-consent:hover {
    transform: none;
    /* Keep visual feedback on real :active state so user still sees press */
  }
}

.s4-booking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 24px;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
}

.s4-booking-main,
.s4-order {
  min-width: 0;
  border: 1px solid var(--booking-line);
  border-radius: 8px;
  background: var(--booking-panel);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

.s4-booking-main {
  padding: clamp(18px, 3vw, 34px);
}

.s4-order {
  position: sticky;
  top: 110px;
  padding: 28px;
}

.s4-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 30px;
}

.s4-step-dot {
  display: grid;
  gap: 8px;
  justify-items: center;
  min-width: 0;
  padding: 0;
  border: 0;
  color: var(--booking-muted);
  background: transparent;
  cursor: pointer;
}

.s4-step-dot span {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid #e1dfd8;
  border-radius: 999px;
  background: #fff;
  font-weight: 800;
}

.s4-step-dot strong {
  width: 100%;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.s4-step-dot.is-active span,
.s4-step-dot.is-complete span {
  color: #111;
  border-color: #f7df79;
  background: var(--booking-gold);
}

.s4-step {
  display: none;
}

.s4-step.is-active {
  display: block;
  animation: s4Fade 180ms ease both;
}

@keyframes s4Fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.s4-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.route-grid {
  grid-template-columns: 1fr;
}

.s4-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.s4-field.full {
  grid-column: 1 / -1;
}

.s4-field label,
.s4-field > span {
  color: #27231c;
  font-weight: 800;
}

.s4-field input,
.s4-field select,
.s4-field textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 50px;
  padding: 0 15px;
  color: var(--booking-text);
  border: 1px solid #d9d5cc;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  box-sizing: border-box;
}

/* iOS Safari: native date/time pickers can push the picker icon outside
   the input on narrow screens. Force the native indicator inside the box. */
.s4-field input[type="date"],
.s4-field input[type="time"],
.s4-field input[type="datetime-local"] {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 12px;
  min-height: 50px;
}
.s4-field input[type="date"]::-webkit-date-and-time-value,
.s4-field input[type="time"]::-webkit-date-and-time-value {
  text-align: left;
  min-height: 1lh;
}
.s4-field input[type="date"]::-webkit-calendar-picker-indicator,
.s4-field input[type="time"]::-webkit-calendar-picker-indicator {
  margin-right: 0;
  margin-inline-start: 8px;
  flex-shrink: 0;
}

.s4-field textarea {
  min-height: 112px;
  padding-top: 14px;
  resize: vertical;
}

.s4-field input.is-invalid,
.s4-field select.is-invalid,
.s4-field textarea.is-invalid {
  border-color: #c92c2c;
  box-shadow: 0 0 0 3px rgba(201, 44, 44, 0.12);
}

.s4-segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.s4-segmented label {
  min-width: 0;
}

.s4-segmented input,
.s4-vehicle input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.s4-segmented span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid #d9d5cc;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.s4-segmented input:checked + span {
  color: #16120a;
  border-color: var(--booking-gold);
  background: #fff7d0;
}

/* Large group (25+ passengers) notice */
.s4-large-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px;
  border: 1px solid rgba(201, 162, 39, 0.45);
  border-radius: 10px;
  background: linear-gradient(135deg, #fff8e1, #fffbef);
}
.s4-large-group strong {
  color: #16120a;
  font-size: 15px;
  font-weight: 800;
}
.s4-large-group span {
  color: #3d352a;
  font-size: 14px;
  line-height: 1.45;
}
.s4-large-group__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}
.s4-large-group__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}
.s4-large-group__btn--call {
  background: #c9a227;
  color: #16120a;
}
.s4-large-group__btn--call:hover {
  background: #d4ae33;
}
.s4-large-group__btn--whatsapp {
  background: #25d366;
  color: #fff;
}
.s4-large-group__btn--whatsapp:hover {
  background: #21c25c;
}
@media (max-width: 480px) {
  .s4-large-group__btn { flex: 1 1 100%; }
}

.s4-date-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-content: start;
  min-width: 0;
  padding: 18px;
  border-radius: 8px;
  background: var(--booking-soft);
}
@media (max-width: 640px) {
  .s4-date-card {
    grid-template-columns: 1fr;
  }
}

.hourly-field {
  display: none;
}

.s4-booking.is-hourly .hourly-field {
  display: grid;
}

.s4-map-shell {
  grid-column: 1 / -1;
  min-height: 90px;
  padding: 18px 22px;
  border: 1px dashed rgba(215, 169, 0, 0.6);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(215, 169, 0, 0.12), rgba(255, 106, 43, 0.08));
}

.s4-estimate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.s4-estimate-row > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.s4-estimate-row strong {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.s4-estimate-row span {
  color: var(--booking-muted);
  font-size: 13px;
}

.s4-estimate-amount {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  color: #6b5400;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .s4-estimate-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .s4-estimate-amount {
    font-size: 32px;
  }
}

.vehicle-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.s4-vehicle {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--booking-line);
  border-radius: 8px;
  cursor: pointer;
  /* TASK-card-align (May 28 2026): every card in the row must share the
     same height so the "from $XXX" badge lines up on the same baseline
     across the grid regardless of how many lines the vehicle name wraps
     to. Flex column + height:100% + .s4-vehicle__price { margin-top:auto }
     is the canonical fix; grid auto-rows would work too but flex column
     gives us margin-top:auto on the badge for free. */
  height: 100%;
}

.s4-vehicle:has(input:checked) {
  border-color: var(--booking-gold);
  box-shadow: 0 0 0 3px rgba(215, 169, 0, 0.13);
}

.s4-vehicle.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.4);
  position: relative;
}

.s4-vehicle.is-disabled .vehicle-visual {
  filter: grayscale(1);
}

.s4-vehicle__hint {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #a02a2a;
  letter-spacing: 0.01em;
}

.vehicle-visual {
  height: 92px;
  border-radius: 8px;
  background-color: #1a1610;
  background-image: linear-gradient(135deg, #111, #343434);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.s4-vehicle strong,
.s4-vehicle small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.s4-vehicle small {
  color: var(--booking-muted);
}

.s4-form-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
}

.s4-primary,
.s4-secondary {
  min-height: 48px;
  padding: 0 22px;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.s4-primary {
  color: #111;
  border: 0;
  background: var(--booking-gold);
}

.s4-secondary {
  color: var(--booking-text);
  border: 1px solid #d9d5cc;
  background: #fff;
}

.s4-primary:disabled,
.s4-secondary:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.s4-form-message {
  min-height: 24px;
  margin-top: 18px;
  font-weight: 700;
}

.s4-form-message[data-type="error"] {
  color: #b21d1d;
}

.s4-form-message[data-type="success"] {
  color: #16713a;
}

.s4-form-message[data-type="loading"] {
  color: #8a6300;
}

.s4-order h2 {
  margin: 0 0 22px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 28px;
}

.s4-order dl {
  display: grid;
  gap: 14px;
  margin: 0;
}

.s4-order dl div {
  display: grid;
  grid-template-columns: minmax(90px, 0.42fr) minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--booking-line);
}

.s4-order dt,
.s4-order dd {
  min-width: 0;
}

.s4-order dt {
  color: var(--booking-muted);
  font-weight: 800;
}

.s4-order dd {
  margin: 0;
  overflow: hidden;
  font-weight: 700;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Address fields (pickup / dropoff / stops) can hold long values — and the
   stops cell holds several addresses at once. Clipping them to one ellipsised
   line hides everything past the first, so let these wrap fully. */
.s4-order dd[data-summary="pickup_location"],
.s4-order dd[data-summary="dropoff_location"],
.s4-order dd[data-summary="stops"] {
  overflow: visible;
  white-space: normal;
  text-overflow: clip;
  overflow-wrap: anywhere;
}

/* Each mid-route stop on its own line so all of them stay readable. */
.s4-order dd[data-summary="stops"] {
  white-space: pre-line;
}

/* Same for the Step 5 review card (last screen before the card is charged):
   the numbered stop list must wrap and stack, not truncate. */
.s4-review__value[data-review="stops"] {
  white-space: pre-line;
  overflow-wrap: anywhere;
  text-align: right;
}

.s4-total {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 24px;
  color: #8a6300;
  font-weight: 900;
}

.s4-total span,
.s4-total strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1080px) {
  .s4-booking-layout,
  .route-grid,
  .vehicle-grid {
    grid-template-columns: 1fr;
  }

  .route-grid .s4-field.full:first-child,
  .s4-date-card {
    grid-column: 1;
    grid-row: auto;
  }

  .s4-order {
    position: static;
  }
}

@media (max-width: 560px) {
  .s4-booking-main,
  .s4-order {
    padding: 16px;
  }

  .s4-date-card {
    padding: 14px;
  }

  .s4-progress {
    gap: 4px;
  }

  .s4-step-dot span {
    width: 34px;
    height: 34px;
  }

  .s4-step-dot strong {
    font-size: 11px;
  }

  .s4-form-grid {
    grid-template-columns: 1fr;
  }

  .s4-order dl div {
    grid-template-columns: minmax(76px, 0.42fr) minmax(0, 1fr);
  }
}

/* ============ Sticky Next/Back action bar (mobile + tablet) ============ */
@media (max-width: 1080px) {
  .s4-booking-main .s4-form-actions {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 10px;
    margin-top: 16px;
    /* Sticky to bottom of viewport so the buttons are always reachable
       without scrolling. */
    position: sticky;
    bottom: 0;
    z-index: 40;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    margin-left: -16px;
    margin-right: -16px;
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    backdrop-filter: saturate(180%) blur(10px);
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
  }
  .s4-booking-main .s4-form-actions .s4-secondary {
    flex: 0 1 40%;
    width: auto;
    min-height: 50px;
  }
  .s4-booking-main .s4-form-actions .s4-primary,
  .s4-booking-main .s4-form-actions .s4-primary.is-submit {
    flex: 1 1 60%;
    width: auto;
    min-height: 50px;
  }

  /* Lift floating call/whatsapp on booking pages so they don't sit on
     top of the sticky action bar */
  body:has(.s4-booking-layout) .floating-cta {
    transform: translateY(-82px);
    transition: transform 0.25s ease;
  }
  body.s4-cookie-visible:has(.s4-booking-layout) .floating-cta {
    transform: translateY(-262px);
  }
}


/* ============ Premium autocomplete + map (v0.6) ============ */
.s4-autocomplete-wrap { position: relative; }
.s4-autocomplete {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.s4-autocomplete input {
  flex: 1 1 auto;
  min-width: 0;
}
.s4-ac-loc {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  align-self: stretch;
  border: 1px solid var(--booking-line);
  border-radius: 10px;
  background: linear-gradient(135deg, #fff 0%, #f7f1e5 100%);
  color: var(--booking-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .18s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.s4-ac-loc:hover {
  background: linear-gradient(135deg, var(--booking-gold) 0%, #b58a00 100%);
  color: #fff;
  border-color: var(--booking-gold);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(201, 162, 39, 0.35);
}
.s4-ac-loc:focus-visible {
  outline: 2px solid var(--booking-gold);
  outline-offset: 2px;
}
.s4-ac-loc.is-loading svg { animation: s4-spin 0.9s linear infinite; }
@keyframes s4-spin { to { transform: rotate(360deg); } }

/* Address input — Google Place resolving state (geocoder fetching lat/lon).
   Subtle gold pulse hints to the user that selection is being processed. */
input.is-resolving {
  background-image: linear-gradient(90deg, transparent 0%, rgba(201, 162, 39, 0.14) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: s4-ac-resolve-shimmer 1.1s ease-in-out infinite;
  border-color: var(--booking-gold);
}
@keyframes s4-ac-resolve-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============ Payment method — radio cards (replaced <select>) ============
   Client feedback: "не переводит на оформление данные по карте" — default
   was request_quote which skips Stripe. Now Stripe is preselected and
   visually primary; request_quote is a secondary option clearly labelled
   as dispatcher-callback flow. */
.s4-payment-label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  color: var(--booking-ink-soft, #475569);
  margin-bottom: 8px;
}
.s4-payment-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 640px) {
  .s4-payment-options { grid-template-columns: 1fr; }
}
.s4-payment-option {
  display: block;
  position: relative;
  padding: 14px 14px 14px 44px;
  background: #fff;
  border: 1.5px solid var(--booking-line, rgba(15, 23, 42, 0.12));
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}
/* Hover effects only on real pointers — fixes iOS Safari "first tap shows
   hover, second tap registers click" problem reported by client
   (Kwork May 17 msg 395 "Клик на кнопки с первого раза не переводит"). */
@media (hover: hover) and (pointer: fine) {
  .s4-payment-option:hover {
    border-color: var(--booking-gold);
    box-shadow: 0 6px 18px rgba(201, 162, 39, 0.14);
    transform: translateY(-1px);
  }
}
.s4-payment-option input[type="radio"] {
  position: absolute;
  left: 14px;
  top: 18px;
  width: 18px;
  height: 18px;
  accent-color: var(--booking-gold);
  cursor: pointer;
}
.s4-payment-option:has(input[type="radio"]:checked) {
  border-color: var(--booking-gold);
  background: linear-gradient(135deg, #fff8e6 0%, #fff 60%);
  box-shadow: 0 8px 22px rgba(201, 162, 39, 0.2);
}
.s4-payment-option:focus-within {
  outline: 2px solid var(--booking-gold);
  outline-offset: 2px;
}
.s4-payment-option__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.s4-payment-option__title {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--booking-ink, #0f172a);
  line-height: 1.3;
}
.s4-payment-option__hint {
  font-size: 12px;
  color: var(--booking-ink-soft, #64748b);
  line-height: 1.4;
}
.s4-payment-option--primary .s4-payment-option__title {
  color: var(--booking-gold-strong, #a07f17);
}

/* Vehicle card — starting price badge.
   Client feedback May 15: "какие расчеты за какой вид транспорта" —
   show "from $X" so user sees the per-vehicle minimum upfront. */
.s4-vehicle__price {
  /* TASK-card-align (May 28 2026): the "from $XXX" pill used to sit
     right under the vehicle name, so cards with a 1-line title showed
     the badge in a totally different vertical position than 2-line
     titles. align-self: flex-start + margin-top: auto pushes the badge
     to the bottom of the flex column, locking every badge across the
     row onto the same baseline. */
  align-self: flex-start;
  margin-top: auto;
  padding: 4px 12px;
  background: linear-gradient(135deg, #fff7e0 0%, #fcecb4 100%);
  color: var(--booking-gold-strong, #a07f17);
  font-weight: 700;
  font-size: 12px;
  border-radius: 999px;
  border: 1px solid rgba(201, 162, 39, 0.4);
  line-height: 1.3;
  white-space: nowrap;
}
.s4-vehicle:has(input[type="radio"]:checked) .s4-vehicle__price {
  background: linear-gradient(135deg, #c9a227 0%, #a07f17 100%);
  color: #fff;
  border-color: var(--booking-gold-strong, #a07f17);
}

.s4-ac-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 52px;
  z-index: 60;
  list-style: none;
  margin: 0;
  padding: 6px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid var(--booking-line);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.08);
  max-height: 320px;
  overflow-y: auto;
  animation: s4-ac-pop .18s cubic-bezier(.4,0,.2,1);
}
@keyframes s4-ac-pop {
  from { opacity: 0; transform: translateY(-6px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.s4-ac-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background .12s ease;
}
.s4-ac-item:hover,
.s4-ac-item.is-active {
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.12) 0%, rgba(255, 106, 43, 0.08) 100%);
}
.s4-ac-pin {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--booking-gold) 0%, #b58a00 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  box-shadow: 0 4px 10px rgba(201, 162, 39, 0.3);
}
.s4-ac-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
}
.s4-ac-text strong {
  font-weight: 600;
  font-size: 14px;
  color: var(--booking-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.s4-ac-text small {
  font-size: 12px;
  color: var(--booking-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.s4-ac-loading,
.s4-ac-empty {
  padding: 14px 12px;
  color: var(--booking-muted);
  font-size: 13px;
  text-align: center;
}
.s4-ac-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.s4-ac-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0,0,0,.15);
  border-top-color: var(--booking-gold);
  border-radius: 50%;
  animation: s4-spin .8s linear infinite;
}

/* Quick zone chips */
.s4-quick-zones {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 4px 0 8px;
}
.s4-quick-zones__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--booking-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-right: 4px;
}
.s4-quick-zone {
  border: 1px solid var(--booking-line);
  background: #fff;
  color: var(--booking-text);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .18s cubic-bezier(.4,0,.2,1);
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.s4-quick-zone:hover {
  background: linear-gradient(135deg, var(--booking-gold) 0%, #b58a00 100%);
  color: #fff;
  border-color: var(--booking-gold);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(201, 162, 39, 0.3);
}
.s4-quick-zone:focus-visible {
  outline: 2px solid var(--booking-gold);
  outline-offset: 2px;
}
.s4-quick-zone.is-pulse {
  animation: s4-zone-pulse .32s cubic-bezier(.4,0,.2,1);
}
@keyframes s4-zone-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* Map canvas */
.s4-map-canvas {
  position: relative;
  width: 100%;
  height: 320px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--booking-line);
  background: #e8eef4;
  box-shadow:
    0 1px 2px rgba(0,0,0,.04),
    0 8px 20px rgba(0,0,0,.06),
    0 24px 48px rgba(0,0,0,.04);
  margin-bottom: 14px;
}
.s4-map-canvas .leaflet-container {
  border-radius: 16px;
}
.s4-map-canvas.is-ready .s4-map-skeleton { opacity: 0; pointer-events: none; }

/* Skeleton (pre-tile) */
.s4-map-skeleton {
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
  transition: opacity .4s ease;
  z-index: 5;
  background: linear-gradient(180deg, #dde7f0 0%, #e8eef4 100%);
  overflow: hidden;
}
.s4-map-skeleton__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: s4-map-shimmer 2.4s linear infinite;
}
@keyframes s4-map-shimmer {
  0% { transform: translate(0,0); }
  100% { transform: translate(40px,40px); }
}
.s4-map-skeleton__pin {
  position: absolute;
  width: 18px;
  height: 22px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: rgba(0,0,0,.18);
  box-shadow: 0 4px 8px rgba(0,0,0,.18);
}
.s4-map-skeleton__pin--a { top: 38%; left: 28%; background: rgba(22, 163, 74, .55); }
.s4-map-skeleton__pin--b { top: 60%; right: 30%; background: rgba(201, 162, 39, .55); }
.s4-map-skeleton__line {
  position: absolute;
  top: 50%;
  left: 30%;
  right: 32%;
  height: 2px;
  background: repeating-linear-gradient(90deg, rgba(0,0,0,.25) 0 6px, transparent 6px 14px);
  transform: rotate(8deg);
}

.s4-map-hint {
  position: absolute;
  bottom: 14px;
  left: 14px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--booking-text);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  pointer-events: none;
  animation: s4-hint-bob 2.4s ease-in-out infinite;
}
@keyframes s4-hint-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
.s4-map-hint svg { color: var(--booking-gold); }

/* Custom Leaflet pins */
.leaflet-marker-icon.s4-pin-wrap {
  background: transparent !important;
  border: 0 !important;
}
.s4-pin {
  width: 32px;
  height: 40px;
  position: relative;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,.25));
}
.s4-pin::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--pin-color, #c9a227);
  clip-path: path('M16 0C7.16 0 0 7.16 0 16c0 12 16 24 16 24s16-12 16-24C32 7.16 24.84 0 16 0z');
}
.s4-pin span {
  position: absolute;
  top: 6px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  z-index: 2;
  text-shadow: 0 1px 2px rgba(0,0,0,.4);
}

/* Route meta strip */
.s4-route-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--booking-line);
  border: 1px solid var(--booking-line);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,.04);
}
.s4-route-meta__item {
  background: #fff;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: background .2s ease;
}
.s4-route-meta__item:hover {
  background: linear-gradient(135deg, #fff 0%, #fffaf0 100%);
}
.s4-route-meta__label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--booking-muted);
}
.s4-route-meta__item strong {
  font-size: 16px;
  font-weight: 700;
  color: var(--booking-text);
}

/* Mobile tweaks */
@media (max-width: 640px) {
  .s4-map-canvas { height: 240px; border-radius: 12px; }
  .s4-route-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .s4-route-meta__item { padding: 10px 8px; }
  .s4-route-meta__item strong { font-size: 14px; }
  .s4-route-meta__label { font-size: 10px; }
  .s4-quick-zones { gap: 6px; }
  .s4-quick-zone { padding: 6px 10px; font-size: 12px; }
  .s4-ac-list { right: 8px; }
}

@media (max-width: 380px) {
  .s4-map-canvas { height: 200px; }
  .s4-route-meta__item { padding: 8px 6px; }
  .s4-route-meta__item strong { font-size: 13px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .s4-map-skeleton__grid,
  .s4-map-hint,
  .s4-ac-list,
  .s4-quick-zone.is-pulse {
    animation: none !important;
  }
}

/* ============ Map click popup (Google-Maps style address picker) ============ */
.s4-map-popup .leaflet-popup-content-wrapper {
  border-radius: 14px;
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.18), 0 2px 6px rgba(15, 23, 42, 0.08);
  padding: 0;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
}
.s4-map-popup .leaflet-popup-content {
  margin: 0;
  padding: 14px 16px 12px;
  font-family: inherit;
  line-height: 1.4;
  width: auto !important;
  min-width: 240px;
}
.s4-map-popup .leaflet-popup-tip {
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
}
.s4-map-popup .leaflet-popup-close-button {
  top: 6px;
  right: 8px;
  color: #64748b;
  font-size: 20px;
}
.s4-mp { display: flex; flex-direction: column; gap: 10px; }
.s4-mp-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #475569;
  font-size: 13px;
}
.s4-mp-addr strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
}
.s4-mp-full {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
  max-height: 48px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.s4-mp-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.s4-mp-btn {
  appearance: none;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #f8fafc;
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
  text-align: left;
  font-family: inherit;
}
.s4-mp-btn:hover {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.2);
}
.s4-mp-btn:active {
  transform: scale(0.98);
}
.s4-mp-pickup {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: #fff;
  border-color: #15803d;
}
.s4-mp-pickup:hover { background: linear-gradient(135deg, #15803d 0%, #166534 100%); border-color: #166534; }
.s4-mp-dropoff {
  background: linear-gradient(135deg, #c9a227 0%, #a07f17 100%);
  color: #fff;
  border-color: #a07f17;
}
.s4-mp-dropoff:hover { background: linear-gradient(135deg, #a07f17 0%, #806010 100%); border-color: #806010; }

/* ===== Tip chip selector ===== */
.s4-tip-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.s4-tip-chip {
  position: relative;
  cursor: pointer;
  user-select: none;
}
.s4-tip-chip input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.s4-tip-chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 9px 14px;
  border: 1.5px solid var(--booking-line, #e1dfd8);
  border-radius: 999px;
  background: #fff;
  color: #2a2113;
  font-size: 14px;
  font-weight: 600;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}
.s4-tip-chip:hover span {
  border-color: #c9a227;
  color: #8a6500;
}
.s4-tip-chip input:checked + span {
  background: linear-gradient(135deg, #c9a227, #a07f17);
  border-color: #a07f17;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(201, 162, 39, 0.32);
}
.s4-tip-chip input:focus-visible + span {
  outline: 2px solid #c9a227;
  outline-offset: 2px;
}
.s4-tip-custom {
  margin-top: 10px;
  width: 100%;
}

/* ===== Consent checkbox ===== */
.s4-consent-field {
  margin-top: 8px;
}
.s4-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--booking-line, #e1dfd8);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 211, 77, 0.06), rgba(201, 162, 39, 0.04));
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}
.s4-consent:hover {
  border-color: #c9a227;
}
.s4-consent input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  flex: 0 0 20px;
  cursor: pointer;
  accent-color: #c9a227;
}
.s4-consent__text {
  font-size: 13px;
  line-height: 1.55;
  color: #2a2113;
}
.s4-consent__text a {
  color: #8a6500;
  text-decoration: underline;
}
.s4-consent__text a:hover {
  color: #c9a227;
}
.s4-sms-consent-field {
  margin-top: 4px;
}
.s4-consent--optional {
  background: #faf9f6;
  border-style: dashed;
}
.s4-consent--optional .s4-consent__text {
  font-size: 12.5px;
  color: #4a4438;
}
.s4-sms-consent {
  margin: 8px 2px 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: #8c8472;
}
.s4-sms-consent a {
  color: #8a6500;
  text-decoration: underline;
}
.s4-sms-consent a:hover {
  color: #c9a227;
}

/* ===== Order panel breakdown ===== */
.s4-breakdown {
  margin-top: 14px;
  padding: 14px 0 0;
  border-top: 1px dashed var(--booking-line, #e1dfd8);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.s4-breakdown__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--booking-muted, #5a544a);
}
.s4-breakdown__row span:last-child {
  font-weight: 600;
  color: var(--booking-text, #2a2113);
  font-variant-numeric: tabular-nums;
}

/* iOS Safari zoom-on-focus prevention — every form control min 16px on mobile */
@media (max-width: 720px) {
  .s4-booking input,
  .s4-booking select,
  .s4-booking textarea {
    font-size: 16px;
  }
}

/* "+ Add stop" button had no styling at all — it rendered as a bare browser
   button (~22px tall, unbranded) and was below the 40px touch target. Give it
   a clear secondary (dashed gold) treatment matching the booking palette. */
.s4-add-stop {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px dashed var(--booking-gold, #d7a900);
  border-radius: 999px;
  background: rgba(215, 169, 0, 0.06);
  color: #8a6a00;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.s4-add-stop:hover {
  background: rgba(215, 169, 0, 0.14);
  border-color: #b58a00;
  transform: translateY(-1px);
}

.s4-add-stop:focus-visible {
  outline: 2px solid var(--booking-gold, #d7a900);
  outline-offset: 2px;
}

.s4-add-stop span[aria-hidden] {
  font-size: 18px;
  line-height: 1;
}

/* Touch target: quick-zone chips were 24-28px — bump the tap area to 40px
   without changing the chip's visual proportions (padding handles the look). */
.s4-quick-zone {
  min-height: 40px;
}
