/* Booking journey bar (booking-journey.js) and the three-panel new reservation form.
   Loads after stage-styles.css and before mobile-enhancements.css on admin.html and confirmation.html. */
.booking-journey { display: grid; gap: 12px; margin: 0 0 18px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.booking-journey [hidden], #newReservationForm [hidden] { display: none !important; }
.booking-journey-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.booking-journey-where { flex: 1 1 12rem; min-width: 0; margin: 0; color: var(--ink); font-weight: 700; overflow-wrap: anywhere; }
.booking-journey-percent { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.booking-journey-badge { padding: 2px 10px; border-radius: 999px; background: var(--amber-soft); color: var(--amber-ink); font-size: 13px; font-weight: 700; }
.booking-journey-bar { flex: 1 0 100%; height: 6px; border-radius: 6px; background: var(--cloud); overflow: hidden; }
.booking-journey-bar::after { content: ""; display: block; width: var(--journey-percent, 0%); height: 100%; border-radius: inherit; background: var(--accent); transition: width 300ms ease; }
.booking-journey-list { display: grid; grid-template-columns: repeat(var(--journey-steps, 10), minmax(0, 1fr)); gap: 4px; margin: 0; padding: 0; list-style: none; }
.booking-journey-list li { min-width: 0; }
.booking-journey .booking-journey-step { display: grid; justify-items: center; align-content: start; gap: 6px; width: 100%; min-height: 44px; margin: 0; padding: 6px 2px; border: 0; border-radius: 10px; background: none; box-shadow: none; color: var(--muted); font: inherit; font-size: 12px; font-weight: 700; line-height: 1.35; text-align: center; }
.booking-journey button.booking-journey-step { cursor: pointer; }
.booking-journey button.booking-journey-step:hover { background: var(--surface-raised); }
.booking-journey-step i { display: grid; place-items: center; width: 24px; height: 24px; border: 2px solid var(--line); border-radius: 50%; background: var(--white); font-size: 12px; font-style: normal; }
.booking-journey-step span { overflow-wrap: anywhere; }
.booking-journey li[data-state="done"] .booking-journey-step { color: var(--ink); }
.booking-journey li[data-state="done"] .booking-journey-step i { border-color: var(--accent); background: var(--accent); color: #fff; }
.booking-journey li[data-state="current"] .booking-journey-step { color: var(--accent); }
.booking-journey li[data-state="current"] .booking-journey-step i { border-color: var(--accent); background: var(--blue-soft); color: var(--accent); }
.booking-journey[data-state="cancelled"] .booking-journey-bar::after { background: var(--line); }
.booking-journey .booking-journey-toggle { display: none; }
.booking-journey-continue { justify-self: start; }
@media (max-width: 600px) {
  .booking-journey .booking-journey-toggle { display: inline-flex; }
  .booking-journey-list { grid-template-columns: 1fr; }
  .booking-journey-list:not([data-expanded="true"]) { display: none; }
  .booking-journey .booking-journey-step { grid-template-columns: auto 1fr; justify-items: start; align-items: center; text-align: start; font-size: 14px; }
  .booking-journey-continue { justify-self: stretch; }
}

/* New reservation form: three panels sharing one action row. */
.journey-panel { min-width: 0; margin: 0; padding: 0; border: 0; }
.journey-panel > h3 { margin: 0 0 12px; font-size: 18px; }
.journey-panel > h3:focus { outline: none; }
.field-problem { margin: 6px 0 0; color: var(--red); font-size: 14px; font-weight: 500; }
#newReservationForm [aria-invalid="true"] { border-color: var(--red); }
#driverDetailsForm [aria-invalid="true"] { border-color: var(--red); }
.document-upload .document-file-name { display: block; margin-top: 4px; color: var(--muted); overflow-wrap: anywhere; }
.document-upload .document-file-name:empty { display: none; }
.journey-availability[data-tone="ok"] { color: var(--ink); }
.journey-availability[data-tone="warn"] { color: var(--amber-ink); }
.new-reservation-summary { display: grid; gap: 10px; margin: 0 0 12px; }
.new-reservation-summary div { display: grid; gap: 2px; }
.new-reservation-summary dt { color: var(--muted); font-size: 13px; }
.new-reservation-summary dd { margin: 0; color: var(--ink); font-weight: 700; overflow-wrap: anywhere; }
.journey-price { margin: 0 0 12px; font-size: 18px; font-weight: 700; color: var(--ink); }
.journey-saving { align-self: center; color: var(--muted); }

.booking-sent { margin: 0 0 14px; padding: 12px 16px; border-radius: 14px; background: var(--blue-soft); color: var(--ink); font-weight: 700; }

/* Public checkout (index.html) */
.screen-back { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 6px; padding: 6px 8px 6px 0; min-height: 44px; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 700; cursor: pointer; }
.screen-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .screen-back { padding: 6px 0 6px 8px; }
[dir="rtl"] .screen-back svg { transform: scaleX(-1); }
.signin-dialog:not(.in-checkout) .checkout-only { display: none; }
/* The customer's five steps: in the car drawer and on the Review, Sign in and Your details screens. */
.selection-drawer .booking-journey { margin: 24px 0 14px; padding: 12px; }
.trip-dialog .booking-journey { margin: 4px 0 16px; }
@media (min-width: 601px) {
  [data-customer-journey] .booking-journey-list { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* The viewed section is independent of the next incomplete step. */
.booking-journey li[data-selected="true"] .booking-journey-step { background:var(--blue-soft);color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent); }
.booking-journey-step:focus-visible { outline:3px solid var(--accent);outline-offset:2px; }

/* Each staff step lists its parts, so two columns still say what is left. */
.booking-journey-parts { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.5; overflow-wrap: anywhere; text-align: center; }
@media (max-width: 600px) { .booking-journey-parts { text-align: start; } }

/* Compact staff navigation keeps both destinations and Continue on one row. */
:root .staff-journey .booking-journey--compact {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
}
.booking-journey--compact .booking-journey-where,
.booking-journey--compact .booking-journey-parts {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.booking-journey--compact[data-state="cancelled"] .booking-journey-where,
.booking-journey--compact[data-state="closed"] .booking-journey-where {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  clip-path: none;
  white-space: normal;
  font-size: 12px;
}
:root .booking-journey--compact .booking-journey-list {
  display: grid;
  flex: 1 1 auto;
  order: 0;
  grid-template-columns: repeat(var(--journey-steps), minmax(0, 1fr));
  gap: 8px;
}
:root .booking-journey--compact .booking-journey-step {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  min-height: 48px;
  font-size: 14px;
}
:root .booking-journey--compact .booking-journey-step i {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 9px;
}
.booking-journey--compact svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.booking-journey--compact .booking-journey-summary {
  order: 1;
  flex: 0 0 80px;
  justify-content: center;
  gap: 5px;
  text-align: center;
}
.booking-journey--compact .booking-journey-percent { font-size: 13px; }
.booking-journey--compact .booking-journey-bar { height: 4px; }
:root .booking-journey--compact .booking-journey-toggle { display: none; }
:root .booking-journey--compact .booking-journey-continue {
  order: 2;
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border-radius: 12px;
}
[dir="rtl"] .booking-journey--compact .booking-journey-continue svg { transform: scaleX(-1); }
@media (max-width: 600px) {
  :root .staff-journey .booking-journey--compact { gap: 8px; padding: 10px; }
  :root .booking-journey--compact .booking-journey-list { gap: 4px; }
  :root .booking-journey--compact .booking-journey-step { flex-direction: column; gap: 4px; padding: 6px 4px; font-size: 11px; text-align: center; }
  .booking-journey--compact .booking-journey-summary { flex-basis: 36px; }
  .booking-journey--compact .booking-journey-badge { padding: 2px; font-size: 10px; }
}
