.tabs { display: inline-flex; }
.tabs button { font: inherit; font-weight: 700; border: 0; padding: 13px 26px; cursor: pointer; background: #EFE6F1; color: var(--ink); display: flex; align-items: center; gap: 8px; border-radius: 12px 12px 0 0; }
.tabs button + button { margin-left: 4px; }
.tabs button[aria-selected="true"] { background: var(--brand); color: #fff; }
.trust { display: flex; flex-wrap: wrap; gap: 10px 28px; list-style: none; padding: 16px 4px 0; margin: 0; font-size: .9rem; font-weight: 600; color: var(--ink); }
.trust li { display: flex; align-items: center; gap: 8px; }
.trust svg { width: 18px; height: 18px; color: var(--brand); }

.field { position: relative; }
.ctl { position: relative; }
.ctl .fi { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--brand); pointer-events: none; }
.ferr { margin: 6px 0 0; font-size: .85rem; font-weight: 600; line-height: 1.35; color: var(--error); }
.hint { margin: 6px 0 0; font-size: .85rem; line-height: 1.4; color: var(--muted); }
.swap {
  position: absolute;
  z-index: 3;
  right: -25px;
  top: 50%;
  margin-top: -18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--brand);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(30,20,36,.1);
  transition: scale .15s ease-out, background-color .2s;
}
.swap::after { content: ""; position: absolute; inset: -6px; } /* 48px tap area */
.swap svg { width: 16px; height: 16px; transform: rotate(90deg); }
.swap:hover { background: var(--soft); }
.swap:active { scale: .92; }

.sug {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 30;
  margin: 6px 0 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  box-shadow: var(--shadow-pop);
  max-height: 320px;
  overflow-y: auto;
  min-width: 300px;
}
.sug li { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 8px; cursor: pointer; }
.sug li[aria-selected="true"], .sug li:hover { background: var(--soft); }
.sug li svg { width: 18px; height: 18px; color: var(--brand); margin-top: 2px; }
.sug li b { display: block; color: var(--ink); font-weight: 600; font-size: .93rem; line-height: 1.3; }
.sug li span { display: block; font-size: .8rem; color: var(--muted); line-height: 1.3; }
.sug li.note { cursor: default; color: var(--muted); font-size: .88rem; }
.sug li.note:hover { background: none; }
.chips { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; font-size: .85rem; color: var(--muted); }
.chips button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 13px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; transition: border-color .2s, background-color .2s; }
.chips button:hover { border-color: var(--brand); background: var(--soft); }
.chips svg { width: 15px; height: 15px; color: var(--brand); }

/* scroll-margin keeps the tabs visible under the sticky header; steps.js reads it */
.qcard { background: #fff; border-radius: 0 16px 16px 16px; box-shadow: var(--shadow-card); padding: 20px; scroll-margin-top: 140px; }
.progress { display: flex; gap: 8px; list-style: none; margin: 0 0 18px; padding: 0; counter-reset: p; }
.progress li { flex: 1; display: flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 600; color: var(--muted); }
.progress li::before { counter-increment: p; content: counter(p); display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); font-size: .8rem; font-weight: 800; }
.progress li::after { content: ""; flex: 1; height: 2px; background: var(--line-soft); }
.progress li:last-child::after { display: none; }
.progress li.done { color: var(--brand); }
.progress li.done::before { content: "\2713"; background: var(--brand); border-color: var(--brand); color: #fff; }
.progress li.on { color: var(--ink); }
.progress li.on::before { border-color: var(--brand); color: var(--brand); }
.pane { border: 0; padding: 0; margin: 0; min-width: 0; }
.pane h3 { font-size: 1.1rem; margin: 0 0 4px; outline: none; }
.pane > p.sub { margin: 0 0 14px; font-size: .9rem; }
.pane .row + .row { margin-top: 16px; }
.row { display: grid; gap: 14px; align-items: start; } /* start: an error under one field must not shift its neighbours */
.row-journey > .btn { margin-top: calc(.9rem * 1.6 + 6px); min-height: 48px; height: 48px; padding-block: 0; } /* level with the inputs, below the labels */
.row > * { min-width: 0; } /* native date/time inputs are wide: let grid cells shrink */
.row-journey { grid-template-columns: 1.3fr 1.3fr 1fr .8fr auto; }
.row-2 { grid-template-columns: 1fr 1fr; }
.row-3 { grid-template-columns: repeat(3, 1fr); }
.row-4 { grid-template-columns: repeat(4, 1fr); }

.qcard label { display: block; font-weight: 700; color: var(--ink); font-size: .9rem; margin-bottom: 6px; }
.qcard label small { font-weight: 500; color: var(--muted); }
.qcard label .req { color: var(--error); }
/* 16px text: iOS does not zoom in on focus */
.qcard input, .qcard select { width: 100%; font: inherit; font-size: 1rem; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--field); color: var(--ink); height: 48px; }
.qcard select {
  appearance: none;
  background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%235B2A6E' stroke-width='2'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E") right 12px center no-repeat;
  padding-right: 36px;
}
.qcard textarea { width: 100%; font: inherit; font-size: 1rem; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--field); color: var(--ink); min-height: 120px; resize: vertical; }
.qcard input:focus, .qcard select:focus, .qcard textarea:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: transparent; }
.qcard .ctl input, .qcard .ctl select { padding-left: 42px; }
.qcard #q-pickup { padding-right: 30px; } /* room for the swap button (desktop) */
.qcard input[aria-invalid="true"], .qcard select[aria-invalid="true"], .qcard textarea[aria-invalid="true"] { border-color: var(--error); background: var(--error-bg); }
.qcard #q-flight { text-transform: uppercase; }
.qcard #q-flight::placeholder { text-transform: none; }
.qcard .btn { min-height: 48px; justify-content: center; }
.nav-btns { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }
.btn-back { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-back:hover { border-color: var(--brand); }
.trip { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 10px 12px; border-radius: 10px; background: var(--soft); color: var(--ink); font-size: .9rem; font-weight: 600; line-height: 1.4; }
.trip svg { width: 18px; height: 18px; color: var(--brand); }

.seg { display: inline-flex; background: #eef3ef; border-radius: 10px; padding: 4px; margin-bottom: 14px; }
.qcard .seg label { margin: 0; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 8px; cursor: pointer; font-weight: 700; font-size: .9rem; }
.seg input:checked + span { background: #fff; color: var(--brand); box-shadow: 0 2px 6px rgba(30,20,36,.1); }
.seg input:focus-visible + span { outline: 3px solid var(--brand); }
.ret { max-width: 460px; margin-bottom: 16px; }
.ret .hint { grid-column: 1 / -1; margin: 0; }

.vehicles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.qcard .veh { position: relative; display: block; margin: 0; font-weight: 400; }
.veh input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.veh .box { display: flex; flex-direction: column; height: 100%; border: 2px solid var(--line-soft); border-radius: 14px; padding: 12px; cursor: pointer; transition: border-color .2s, box-shadow .2s; background: #fff; }
.veh .box:hover { border-color: var(--line-strong); }
.veh input:checked + .box { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(91,42,110,.15); }
.veh input:focus-visible + .box { outline: 3px solid var(--brand); outline-offset: 2px; }
.veh img { height: 64px; width: 100%; object-fit: contain; margin-bottom: 8px; }
.veh b { color: var(--ink); font-size: .95rem; }
.veh .cap { display: flex; gap: 12px; font-size: .8rem; color: var(--muted); margin: 4px 0 8px; }
.veh .cap span { display: inline-flex; align-items: center; gap: 4px; }
.veh .cap svg { width: 14px; height: 14px; }
.veh .price { margin-top: auto; font-weight: 800; font-size: 1.15rem; color: var(--brand); font-variant-numeric: tabular-nums; min-height: 1.6em; }
.veh .price small { font-weight: 600; font-size: .75rem; color: var(--muted); }
.veh .tick { position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; display: none; place-items: center; }
.veh .tick svg { width: 14px; height: 14px; stroke-width: 3; }
.veh input:checked ~ .tick { display: grid; }
.msg { margin: 12px 0 0; font-size: .9rem; font-weight: 600; color: var(--error); }
.loading-note { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; padding: 18px 4px; grid-column: 1 / -1; }
.loading-note .spin { display: inline-block; border-color: rgba(91,42,110,.25); border-top-color: var(--brand); }
.payinfo { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--field); font-size: .9rem; }
.payinfo svg { color: var(--brand); }
.payinfo b { color: var(--ink); }

@media (max-width: 960px) {
  .row-journey, .row-4 { grid-template-columns: 1fr 1fr; }
  .row-journey .f-wide, .row-journey .btn { grid-column: 1 / -1; }
  .row-journey > .btn { margin-top: 0; }
  .vehicles { grid-template-columns: repeat(2, 1fr); }
  .progress li { font-size: 0; gap: 4px; }
  .progress li.on { font-size: .8rem; }
  .swap { right: 12px; top: auto; bottom: -42px; } /* on the drop-off label row */
  #err-pickup { padding-right: 52px; } /* clear of the swap button */
  .swap svg { transform: none; }
  .sug { min-width: 0; }
}

@media (max-width: 560px) {
  .tabs button { padding: 12px 16px; font-size: .92rem; }
  .qcard { padding: 16px 14px; }
  .row-2, .row-3, .row-details { grid-template-columns: 1fr; }
}

/* Hourly hire: same form, no drop-off or return (data-mode set by main.js) */
#wiz[data-mode="hourly"] .t-only, #wiz:not([data-mode="hourly"]) .h-only { display: none; }
#wiz[data-mode="hourly"] #q-pickup { padding-right: 14px; }
@media (min-width: 961px) {
  #wiz[data-mode="hourly"] .row-journey { grid-template-columns: 2fr 1fr .8fr .8fr auto; }
}

/* Small phones: full-width date and time, so the whole value shows */
@media (max-width: 420px) {
  .row-journey { grid-template-columns: 1fr; }
}
