/* ===================================================
   BRA TAXI — booking widget
   Black-bordered card, multi-step flow restyled to
   the design tokens. DOM contract preserved for
   scripts/booking.js (ids, classes, data-attrs, names).
   =================================================== */

.boka {
  border: 1px solid var(--ink);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.boka__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--hairline);
}
.boka__title {
  font-family: var(--font-head);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -.022em;
  margin: 0;
}
.boka__meter { font-size: 14px; color: var(--muted); }

/* step dots */
.boka__step-ind {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 14px 24px 0;
}
.boka__step-ind .dot {
  width: 22px;
  height: 4px;
  border-radius: 999px;
  background: var(--hairline);
  transition: background .2s ease;
}
.boka__step-ind .dot.active { background: var(--ink); }

.boka__form { display: block; }

.boka__step { display: none; border: 0; margin: 0; padding: 20px 24px 22px; }
.boka__step.is-active { display: block; }

.boka__legend {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  padding: 0;
  margin: 0 0 14px;
}
.boka__legend b { color: var(--ink); margin-right: 8px; }

/* ---------- Fields ---------- */
.boka__field { display: flex; flex-direction: column; gap: 8px; position: relative; }
.boka__field + .boka__field { margin-top: 14px; }
.boka__field label { font-size: 14px; color: var(--label); }
.boka__field label small { color: var(--muted); font-size: 12.5px; }

.boka__input,
.boka__step input[type="text"],
.boka__step input[type="tel"],
.boka__step input[type="email"],
.boka__step input[type="date"],
.boka__step input[type="time"],
.boka__step select,
.boka__step textarea {
  width: 100%;
  background: #fff;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  padding: 14px 15px;
  font-size: 16.5px;
}
.boka__step textarea { resize: vertical; min-height: 62px; }
.boka__step input:focus,
.boka__step select:focus,
.boka__step textarea:focus { outline: none; border-color: var(--ink); }

.boka__row { display: flex; gap: 8px; align-items: stretch; position: relative; }
.boka__row .boka__input { flex: 1 1 auto; min-width: 0; }
/* Swap sits in a row with only the input; keep space so text never runs under it */
.boka__row:has(.boka__aux--icon) .boka__input { padding-right: 62px; }

/* Min plats / swap buttons */
.boka__aux {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  background: var(--sand);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--ink-soft);
  cursor: pointer;
  white-space: nowrap;
}
.boka__aux:hover { border-color: var(--ink); }
.boka__aux svg { width: 16px; height: 16px; margin-right: 7px; color: var(--muted); }
.boka__aux--icon {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 48px;
  padding: 0;
}
.boka__aux--icon svg { width: 17px; height: 17px; }
.boka__aux.is-busy { opacity: .55; cursor: default; }

/* Autocomplete list */
.boka__ac {
  list-style: none;
  margin: 4px 0 0;
  padding: 5px;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
  background: #fff;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  box-shadow: 0 12px 28px -12px rgba(18,18,16,.25);
  max-height: 260px;
  overflow-y: auto;
}
.boka__ac[hidden] { display: none; }
.boka__ac li {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 10px 11px;
  border-radius: 6px;
  cursor: pointer;
}
.boka__ac li b { font-size: 15px; font-weight: 500; }
.boka__ac li small { font-size: 13px; color: var(--muted); }
.boka__ac li.is-active, .boka__ac li:hover { background: var(--sand); }

/* ---------- Nu / Senare segments (radios) ---------- */
.boka__when { display: flex; gap: 8px; margin-top: 14px; }
.boka__seg { flex: 1 1 0; position: relative; }
.boka__seg input { position: absolute; opacity: 0; pointer-events: none; }
.boka__seg span {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 13px 12px;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: -.01em;
  cursor: pointer;
}
.boka__seg input:checked + span {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
  font-weight: 600;
}
.boka__seg input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }

/* schedule */
.boka__schedule { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.boka__schedule[hidden] { display: none; }

/* ---------- Välj bil ---------- */
.boka__cars-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.boka__cars-head b { font-size: 15px; font-weight: 600; }
.boka__cars-head small { font-size: 13.5px; color: var(--muted); }

.boka__cars { display: flex; flex-direction: column; gap: 6px; }
.car { display: block; cursor: pointer; }
.car input { position: absolute; opacity: 0; pointer-events: none; }
.car__row {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--hairline);
  border-radius: 9px;
  background: #fff;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.car:hover .car__row { border-color: var(--border-soft); }
.car input:checked + .car__row {
  border: 1.5px solid var(--ink);
  box-shadow: inset 3px 0 0 var(--yellow);
}
.car input:focus-visible + .car__row { outline: 2px solid var(--ink); outline-offset: 2px; }
.car__img { width: 60px; height: 40px; object-fit: contain; flex: 0 0 auto; }
.car__info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.car__name { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.car__meta { font-size: 14px; color: var(--label); margin-top: 1px; }
.car__price {
  flex: 0 0 auto;
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.015em;
  font-variant-numeric: tabular-nums;
}
.car__price.is-loading { opacity: .5; }

/* ---------- Steppers ---------- */
.boka__steppers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}
.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--hairline);
  border-radius: 9px;
  padding: 10px 12px;
}
.stepper__lbl { display: flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--ink-soft); }
.stepper__lbl svg { width: 17px; height: 17px; color: var(--muted); }
.stepper__ctrl { display: flex; align-items: center; gap: 2px; }
.stepper__ctrl button {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--input-border);
  border-radius: 7px;
  background: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
}
.stepper__ctrl button:hover:not(:disabled) { border-color: var(--ink); }
.stepper__ctrl button:disabled { opacity: .35; cursor: default; }
.stepper__ctrl input {
  width: 34px;
  text-align: center;
  border: 0;
  background: transparent;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}
.stepper__ctrl input::-webkit-outer-spin-button,
.stepper__ctrl input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- Contact grid (step 3) ---------- */
.boka__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.boka__grid .boka__field { margin-top: 0; }
.boka__field--full { grid-column: 1 / -1; }

.boka__consent {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-2);
}
.boka__consent input { margin-top: 2px; accent-color: var(--ink); width: auto; flex: 0 0 auto; }
.boka__consent a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }

.boka__error {
  margin: 12px 0 0;
  font-size: 14px;
  color: #B3261E;
  line-height: 1.5;
}
.boka__error a { color: #B3261E; text-decoration: underline; }

/* ---------- Step nav / price ---------- */
.boka__nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}
.boka__nav .btn--cta,
.boka__nav .btn--ink { flex: 1 1 auto; }
.boka__price { display: flex; flex-direction: column; line-height: 1.15; }
.boka__price small { font-size: 12.5px; color: var(--muted); }
.boka__price strong {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.boka__price--ghost { margin-bottom: 2px; }

.boka__back {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 13px 16px;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  background: #fff;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}
.boka__back:hover { border-color: var(--ink); }
.boka__back svg { width: 16px; height: 16px; }

.boka__foot {
  padding: 0 24px 20px;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
}

/* ---------- Success ---------- */
.boka__success { padding: 40px 24px 44px; text-align: center; }
.boka__success[hidden] { display: none; }
.boka__success-mark {
  width: 52px; height: 52px;
  margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--yellow);
}
.boka__success-mark svg { width: 24px; height: 24px; }
.boka__success h3 {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -.022em;
  margin: 0 0 8px;
}
.boka__success p { font-size: 15.5px; color: var(--text-2); margin: 0 0 22px; line-height: 1.55; }
.boka__success p a { color: var(--ink); text-decoration: underline; }

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
  .boka__head { padding: 18px 18px 14px; }
  .boka__step-ind { padding: 12px 18px 0; }
  .boka__step { padding: 18px 18px 20px; }
  .boka__grid { grid-template-columns: 1fr; }
  .boka__steppers { grid-template-columns: 1fr; }
  .boka__foot { padding: 0 18px 18px; }
}

@media (max-width: 400px) {
  .boka__nav { flex-wrap: wrap; }
  .boka__nav .boka__price { order: -1; width: 100%; }
}

/* prix fantôme masqué tant que vide (classe posée par le script inline d'index) */
.boka__price--ghost.is-empty { visibility: hidden; }

/* ===== Restyle moderne du widget (champs pleins, CTA pleine largeur) ===== */
.boka__input,
.boka__step input[type="text"],
.boka__step input[type="tel"],
.boka__step input[type="email"],
.boka__step input[type="date"],
.boka__step input[type="time"],
.boka__step select,
.boka__step textarea,
.boka__aux {
  background: var(--sand);
  border: 1px solid transparent;
  border-radius: 10px;
}
.boka__input:focus,
.boka__step input[type="text"]:focus,
.boka__step input[type="tel"]:focus,
.boka__step input[type="email"]:focus,
.boka__step input[type="date"]:focus,
.boka__step input[type="time"]:focus,
.boka__step select:focus,
.boka__step textarea:focus {
  background: #fff;
  border-color: var(--ink);
  outline: none;
}
.boka__aux:hover { background: #ECE9E1; }
.boka__nav {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.boka__nav .btn--cta { width: 100%; }
.boka__price--ghost { display: flex; align-items: baseline; gap: 10px; }
.boka__price--ghost.is-empty { display: none; visibility: visible; }
