/* ==========================================================================
   Black Car Detroit Reservations: booking form
   Black and white, Archivo, booking-app sizes: 16px text, 48px inputs,
   44px tap targets. Everything is scoped under .bres.
   ========================================================================== */

.bres {
  --bres-ink: #0b0b0c;
  --bres-ink2: #141416;
  --bres-paper: #f4f4f2;
  --bres-white: #fff;
  --bres-rule: #dfdfda;
  --bres-grey: #56565a;
  --bres-err: #b42318;
  --bres-err-bg: #fdf3f2;
  --bres-r-card: 12px;
  --bres-r-in: 8px;

  font-family: "Archivo", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--bres-ink);
  background: var(--bres-white);
  border: 1px solid var(--bres-rule);
  border-radius: var(--bres-r-card);
  padding: 24px;
  max-width: 760px;
  margin: 0 auto;
  box-sizing: border-box;
  -webkit-text-size-adjust: 100%;
}
.bres *, .bres *::before, .bres *::after { box-sizing: border-box; }
.bres [hidden] { display: none !important; }
.bres .bres-i { width: 20px; height: 20px; flex: none; }
.bres button, .bres input, .bres select, .bres textarea { font-family: inherit; }

/* honeypot: off screen, never display:none (some bots skip hidden inputs) */
.bres .bres-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------------------------------------------------------------- progress */
.bres .bres-progress { margin: 0 0 24px; }
.bres .bres-progress__meta {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  margin: 0 0 8px; font-size: 14px; color: var(--bres-grey);
}
.bres .bres-progress__meta [data-progress-name] { color: var(--bres-ink); font-weight: 600; }
.bres .bres-progress__bar {
  height: 6px; border-radius: 6px; background: var(--bres-paper); overflow: hidden;
  border: 1px solid var(--bres-rule);
}
.bres .bres-progress__fill {
  display: block; height: 100%; width: 20%; background: var(--bres-ink);
  border-radius: 6px; transition: width .3s ease;
}
.bres .bres-rail {
  display: flex; justify-content: space-between; gap: 8px;
  list-style: none; margin: 10px 0 0; padding: 0;
}
.bres .bres-rail__item { font-size: 13px; color: var(--bres-grey); margin: 0; padding: 0; }
.bres .bres-rail__item.is-done { color: var(--bres-ink2); }
.bres .bres-rail__item.is-active { color: var(--bres-ink); font-weight: 700; }
@media (max-width: 479px) {
  .bres .bres-rail { display: none; }
}

/* -------------------------------------------------------------------- steps */
.bres .bres-step { display: none; }
.bres .bres-step.is-current { display: block; }
.bres .bres-step__title {
  margin: 0 0 20px; font-size: 22px; line-height: 1.25; font-weight: 700;
  letter-spacing: 0; text-transform: none; color: var(--bres-ink); outline: none;
}

.bres .bres-grid { display: flex; flex-wrap: wrap; gap: 20px 16px; }
.bres .bres-field { flex: 1 1 100%; min-width: 0; }
@media (min-width: 420px) {
  .bres .bres-field--half { flex: 1 1 calc(50% - 8px); }
}

/* -------------------------------------------------------------------- labels */
.bres .bres-label {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px;
  margin: 0 0 8px; font-size: 15px; line-height: 1.35; font-weight: 600;
  color: var(--bres-ink); text-transform: none; letter-spacing: 0;
}
.bres .bres-opt { font-size: 14px; font-weight: 400; color: var(--bres-grey); }

/* -------------------------------------------------------------------- inputs */
.bres input[type="text"], .bres input[type="email"], .bres input[type="tel"],
.bres input[type="date"], .bres input[type="time"], .bres input[type="number"],
.bres select, .bres textarea {
  display: block; width: 100%; min-width: 0; max-width: 100%;
  min-height: 48px; margin: 0; padding: 12px 14px;
  font-size: 16px; line-height: 1.4; color: var(--bres-ink);
  background: var(--bres-white); border: 1px solid #b9b9b4; border-radius: var(--bres-r-in);
  box-shadow: none; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.bres textarea { min-height: 96px; resize: vertical; }
.bres input::placeholder, .bres textarea::placeholder { color: #75757a; opacity: 1; }
.bres input:hover, .bres select:hover, .bres textarea:hover { border-color: var(--bres-grey); }
.bres input:focus, .bres select:focus, .bres textarea:focus {
  border-color: var(--bres-ink); box-shadow: 0 0 0 3px rgba(11, 11, 12, .14);
}

/* iOS draws date/time inputs at their own width; this keeps them in the box */
.bres input[type="date"], .bres input[type="time"] {
  -webkit-appearance: none; appearance: none; text-align: left; height: 48px;
}
.bres input[type="date"]::-webkit-date-and-time-value,
.bres input[type="time"]::-webkit-date-and-time-value { text-align: left; }

/* select with a clear chevron */
.bres .bres-select { position: relative; }
.bres .bres-select select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  padding-right: 44px; cursor: pointer; background-image: none;
}
.bres .bres-select__chev {
  position: absolute; right: 14px; top: 50%; width: 20px; height: 20px;
  transform: translateY(-50%); pointer-events: none; color: var(--bres-ink);
}

/* number stepper */
.bres .bres-stepper { display: flex; align-items: stretch; max-width: 220px; }
.bres .bres-stepper input[type="number"] {
  text-align: center; border-radius: 0; border-left: 0; border-right: 0;
  -moz-appearance: textfield; padding-left: 4px; padding-right: 4px;
}
.bres .bres-stepper input::-webkit-outer-spin-button,
.bres .bres-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bres .bres-stepper__btn {
  flex: none; width: 48px; min-height: 48px; padding: 0; margin: 0;
  font-size: 22px; line-height: 1; color: var(--bres-ink); cursor: pointer;
  background: var(--bres-paper); border: 1px solid #b9b9b4;
}
.bres .bres-stepper__btn:first-child { border-radius: var(--bres-r-in) 0 0 var(--bres-r-in); }
.bres .bres-stepper__btn:last-child { border-radius: 0 var(--bres-r-in) var(--bres-r-in) 0; }
.bres .bres-stepper__btn:hover { background: #e9e9e5; }
.bres .bres-stepper__btn:focus-visible { outline: 2px solid var(--bres-ink); outline-offset: 2px; position: relative; }

/* radio / checkbox choices: pill buttons */
.bres .bres-choices { display: flex; flex-wrap: wrap; gap: 10px; }
.bres .bres-choice {
  position: relative; display: inline-flex; flex: 1 1 auto; align-items: center; gap: 10px;
  min-height: 48px; padding: 10px 16px; margin: 0;
  font-size: 16px; font-weight: 500; color: var(--bres-ink); cursor: pointer;
  background: var(--bres-white); border: 1px solid #b9b9b4; border-radius: var(--bres-r-in);
}
.bres .bres-choices--check .bres-choice { flex: 1 1 100%; }
@media (min-width: 520px) { .bres .bres-choices--check .bres-choice { flex: 0 1 auto; } }
.bres .bres-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.bres .bres-choice__box {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; flex: none; border: 1.5px solid var(--bres-grey); border-radius: 50%;
  color: var(--bres-white);
}
.bres .bres-choices--check .bres-choice__box { border-radius: 5px; }
.bres .bres-choice__box .bres-i { width: 14px; height: 14px; opacity: 0; }
.bres .bres-choice:hover { border-color: var(--bres-ink); }
.bres .bres-choice:has(input:checked) { border-color: var(--bres-ink); box-shadow: inset 0 0 0 1px var(--bres-ink); background: var(--bres-paper); }
.bres .bres-choice input:checked + .bres-choice__box { background: var(--bres-ink); border-color: var(--bres-ink); }
.bres .bres-choice input:checked + .bres-choice__box .bres-i { opacity: 1; }
.bres .bres-choice input:focus-visible + .bres-choice__box { outline: 2px solid var(--bres-ink); outline-offset: 3px; }

/* vehicle list */
.bres .bres-vehicles { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 620px) { .bres .bres-vehicles { grid-template-columns: 1fr 1fr; } }
.bres .bres-veh {
  position: relative; display: flex; align-items: center; gap: 14px;
  min-height: 72px; padding: 12px 14px; margin: 0; cursor: pointer;
  background: var(--bres-white); border: 1px solid #b9b9b4; border-radius: var(--bres-r-card);
}
.bres .bres-veh input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.bres .bres-veh__ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex: none; border-radius: 10px;
  background: var(--bres-paper); color: var(--bres-ink);
}
.bres .bres-veh__ico .bres-i { width: 24px; height: 24px; }
.bres .bres-veh__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.bres .bres-veh__name { font-size: 16px; font-weight: 700; color: var(--bres-ink); }
.bres .bres-veh__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; color: var(--bres-grey); }
.bres .bres-veh__meta span { display: inline-flex; align-items: center; gap: 5px; }
.bres .bres-veh__meta .bres-i { width: 16px; height: 16px; }
.bres .bres-veh__tick {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; flex: none; border-radius: 50%;
  border: 1.5px solid var(--bres-grey); color: var(--bres-white);
}
.bres .bres-veh__tick .bres-i { width: 14px; height: 14px; opacity: 0; }
.bres .bres-veh:hover { border-color: var(--bres-ink); }
.bres .bres-veh:has(input:checked) { border-color: var(--bres-ink); box-shadow: inset 0 0 0 1px var(--bres-ink); }
.bres .bres-veh input:checked ~ .bres-veh__ico { background: var(--bres-ink); color: var(--bres-white); }
.bres .bres-veh input:checked ~ .bres-veh__tick { background: var(--bres-ink); border-color: var(--bres-ink); }
.bres .bres-veh input:checked ~ .bres-veh__tick .bres-i { opacity: 1; }
.bres .bres-veh input:focus-visible ~ .bres-veh__ico { outline: 2px solid var(--bres-ink); outline-offset: 3px; }

/* "add another address" toggles */
.bres .bres-toggle {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  margin: 0; padding: 4px 0; cursor: pointer;
  font-size: 15px; font-weight: 600; color: var(--bres-ink);
  text-decoration: underline; text-underline-offset: 3px;
}
.bres .bres-toggle__box { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bres .bres-toggle__mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--bres-ink);
}
.bres .bres-toggle__mark .bres-i { width: 16px; height: 16px; transition: transform .2s ease; }
.bres .bres-field.is-open .bres-toggle__mark .bres-i { transform: rotate(45deg); }
.bres .bres-toggle__box:focus-visible + .bres-toggle__mark { outline: 2px solid var(--bres-ink); outline-offset: 2px; }
.bres .bres-toggle__panel { margin-top: 8px; }

/* notes, errors */
.bres .bres-note {
  margin: 10px 0 0; font-size: 14px; line-height: 1.5; color: var(--bres-grey);
}
.bres .bres-error {
  margin: 8px 0 0; font-size: 14px; line-height: 1.4; font-weight: 500; color: var(--bres-err);
}
.bres .bres-field.has-error input:not([type="radio"]):not([type="checkbox"]),
.bres .bres-field.has-error select,
.bres .bres-field.has-error textarea,
.bres .bres-field.has-error .bres-choice,
.bres .bres-field.has-error .bres-veh { border-color: var(--bres-err); }
.bres .bres-formerror {
  margin: 20px 0 0; padding: 12px 14px; font-size: 15px; color: var(--bres-err);
  background: var(--bres-err-bg); border: 1px solid #f1c8c3; border-radius: var(--bres-r-in);
}

.bres .bres-paynote {
  margin: 24px 0 0; padding: 14px 16px; font-size: 15px; line-height: 1.5; color: var(--bres-ink2);
  background: var(--bres-paper); border: 1px solid var(--bres-rule); border-radius: 10px;
}
.bres .bres-paynote { display: flex; align-items: flex-start; gap: 10px; }
.bres .bres-paynote svg { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 2px; }
.bres .bres-field input[autocomplete="cc-number"],
.bres .bres-field input[autocomplete="cc-exp"],
.bres .bres-field input[autocomplete="cc-csc"] { font-variant-numeric: tabular-nums; letter-spacing: .04em; }

/* ------------------------------------------------------------------ buttons */
.bres .bres-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--bres-rule);
}
.bres .bres-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; margin: 0 0 0 auto;
  font-size: 16px; font-weight: 700; line-height: 1.2; text-decoration: none; text-transform: none; letter-spacing: 0;
  color: var(--bres-white); background: var(--bres-ink);
  border: 1px solid var(--bres-ink); border-radius: var(--bres-r-in);
  cursor: pointer; transition: background .15s ease;
}
.bres .bres-btn:hover { background: var(--bres-ink2); color: var(--bres-white); }
.bres .bres-btn:focus-visible { outline: 2px solid var(--bres-ink); outline-offset: 3px; }
.bres .bres-btn--ghost { margin: 0; color: var(--bres-ink); background: var(--bres-white); }
.bres .bres-btn--ghost:hover { background: var(--bres-paper); color: var(--bres-ink); }
.bres .bres-btn .bres-i { width: 18px; height: 18px; }
.bres .bres-btn__spin { display: none; }
.bres .bres-btn.is-busy { opacity: .8; cursor: progress; }
.bres .bres-btn.is-busy .bres-btn__arrow { display: none; }
.bres .bres-btn.is-busy .bres-btn__spin { display: inline-block; animation: bres-spin .8s linear infinite; }
@keyframes bres-spin { to { transform: rotate(360deg); } }

@media (max-width: 479px) {
  .bres { padding: 18px 16px; }
  .bres .bres-actions { flex-wrap: wrap; }
  .bres .bres-btn { flex: 1 1 auto; padding-left: 16px; padding-right: 16px; }
  .bres .bres-btn--submit { flex: 1 1 100%; }
  .bres .bres-btn--submit { order: -1; }
}

/* --------------------------------------------------------------------- done */
.bres .bres-done { text-align: center; padding: 16px 4px; outline: none; }
.bres .bres-done__mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%; background: var(--bres-ink); color: var(--bres-white);
}
.bres .bres-done__mark .bres-i { width: 28px; height: 28px; }
.bres .bres-done__title { margin: 16px 0 8px; font-size: 22px; font-weight: 700; color: var(--bres-ink); }
.bres .bres-done__msg { margin: 0 auto; max-width: 520px; font-size: 16px; color: var(--bres-ink2); }
.bres .bres-done__ref { margin: 16px 0 0; font-size: 15px; color: var(--bres-grey); }
.bres .bres-done__ref strong { color: var(--bres-ink); font-size: 18px; }

@media (prefers-reduced-motion: reduce) {
  .bres * { transition: none !important; animation: none !important; }
}
