/* ============================================================
   BOOKING WIZARD — multi-step enhancement of #booking-form
   Progressive enhancement: without JS every fieldset, the
   submit button and all fields stay visible; the progress
   header + Next/Back nav are hidden until .is-enhanced is set.

   Checkmarks MUST stay 16–24px. The global `img, svg { max-width: 100% }`
   reset will otherwise stretch unsized SVGs to the full card width.
   ============================================================ */
.booking-wizard { position: relative; }
.booking-wizard__steps { display: grid; gap: 14px; }

/* Fieldset reset so steps behave like the original form-grid groups */
.booking-wizard__step {
  display: grid;
  gap: 14px;
  border: 0;
  margin: 0;
  padding: 0;
  min-inline-size: 0; /* allow grid children to shrink inside fieldset */
}
.booking-wizard__step-title {
  font-family: var(--f-display);
  font-size: 17px;
  color: var(--c-ink);
  letter-spacing: 0;
  padding: 0;
  margin: 0 0 2px;
}
.booking-wizard__step-title:focus { outline: none; }
.booking-wizard__step-title:focus-visible {
  outline: 2px solid var(--c-green-600);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Progress header + nav are JS-only affordances: hidden by default */
.booking-wizard__progress,
.booking-wizard__nav { display: none; }

/* ---- Enhanced (JS active) ---- */
.booking-wizard.is-enhanced .booking-wizard__progress {
  display: flex;
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  position: relative;
}
/* connector track + animated fill behind the dots */
.booking-wizard.is-enhanced .booking-wizard__progress::before,
.booking-wizard.is-enhanced .booking-wizard__progress::after {
  content: "";
  position: absolute;
  top: 15px;
  left: 16%;
  right: 16%;
  height: 2px;
  border-radius: 2px;
}
.booking-wizard.is-enhanced .booking-wizard__progress::before { background: var(--c-line); }
.booking-wizard.is-enhanced .booking-wizard__progress::after {
  background: linear-gradient(90deg, var(--c-green-600), var(--c-lime-400));
  width: calc((100% - 32%) * (var(--bw-progress, 0) / 100));
  left: 16%;
  right: auto;
  transition: width .5s cubic-bezier(.45, 0, .15, 1);
}

.booking-wizard__progress-step {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 9px;
  list-style: none;
}
.booking-wizard__progress-step::before,
.booking-wizard__progress-step::after {
  content: none;
}
.booking-wizard__progress-dot {
  width: 32px;
  height: 32px;
  max-width: 32px;
  max-height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  border: 2px solid var(--c-line);
  color: var(--c-muted);
  font-weight: 800;
  font-size: 13.5px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  transition: background .4s ease, border-color .4s ease, color .3s ease, box-shadow .4s ease, transform .4s cubic-bezier(.34, 1.56, .64, 1);
}
.booking-wizard__progress-num { line-height: 1; transition: opacity .2s ease; }
.booking-wizard__progress-check,
.booking-wizard__progress svg.booking-wizard__progress-check {
  width: 18px;
  height: 18px;
  max-width: 18px;
  max-height: 18px;
  position: absolute;
  inset: 0;
  margin: auto;
  opacity: 0;
  transform: scale(.3) rotate(-12deg);
  pointer-events: none;
  transition: opacity .25s ease, transform .35s cubic-bezier(.34, 1.56, .64, 1);
}
.booking-wizard__progress-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--c-muted);
  line-height: 1.2;
  display: flex;
  flex-direction: column;
  transition: color .35s ease;
}
.booking-wizard__progress-idx {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-muted-2);
  margin-bottom: 2px;
  transition: color .35s ease;
}

/* active step */
.booking-wizard__progress-step.is-active .booking-wizard__progress-dot {
  background: var(--c-purple-600);
  border-color: var(--c-purple-600);
  color: #fff;
  transform: scale(1.12);
  box-shadow: 0 0 0 5px rgba(124, 58, 237, .14), 0 6px 16px rgba(64, 40, 136, .22);
}
.booking-wizard__progress-step.is-active .booking-wizard__progress-label { color: var(--c-ink); }
.booking-wizard__progress-step.is-active .booking-wizard__progress-idx { color: var(--c-purple-600); }

/* completed step */
.booking-wizard__progress-step.is-done .booking-wizard__progress-dot {
  background: var(--c-green-600);
  border-color: var(--c-green-600);
  color: #fff;
  box-shadow: 0 4px 12px rgba(16, 137, 70, .22);
}
.booking-wizard__progress-step.is-done .booking-wizard__progress-num { opacity: 0; }
.booking-wizard__progress-step.is-done .booking-wizard__progress-check { opacity: 1; transform: scale(1) rotate(0); }
.booking-wizard__progress-step.is-done .booking-wizard__progress-label { color: var(--c-ink-2); }

/* only the active step is shown once enhanced */
.booking-wizard.is-enhanced .booking-wizard__step { display: none; }
.booking-wizard.is-enhanced .booking-wizard__step.is-active { display: grid; }

/* step entrance animation (direction-aware) */
.booking-wizard.is-enhanced .booking-wizard__step.is-active {
  animation: bwStepIn .42s cubic-bezier(.22, 1, .36, 1) both;
}
.booking-wizard.is-enhanced[data-dir="back"] .booking-wizard__step.is-active {
  animation-name: bwStepInBack;
}
@keyframes bwStepIn {
  from { opacity: 0; transform: translate3d(26px, 0, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes bwStepInBack {
  from { opacity: 0; transform: translate3d(-26px, 0, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* field focus polish */
.booking-wizard input,
.booking-wizard select,
.booking-wizard textarea {
  border-radius: 12px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.booking-wizard input:hover:not(:focus),
.booking-wizard select:hover:not(:focus),
.booking-wizard textarea:hover:not(:focus) { border-color: var(--c-muted-2); }

/* inline validation messaging */
.booking-wizard input[aria-invalid="true"],
.booking-wizard select[aria-invalid="true"],
.booking-wizard textarea[aria-invalid="true"] {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .12);
}
.booking-wizard__error {
  display: block;
  min-height: 0;
  margin-top: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: #dc2626;
}
.booking-wizard__error:empty { display: none; }

/* review / summary card on the final step */
.booking-wizard__review {
  background: var(--c-bg-soft);
  border: 1px solid var(--c-line);
  border-radius: 12px;
  padding: 16px 18px;
  animation: bwFade .4s ease both;
}
.booking-wizard__review-title {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-green-700);
  margin: 0 0 10px;
}
.booking-wizard__review-list { display: grid; gap: 8px; margin: 0; }
.booking-wizard__review-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  font-size: 13.5px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--c-line);
}
.booking-wizard__review-row:last-child { border-bottom: 0; padding-bottom: 0; }
.booking-wizard__review-row dt { color: var(--c-muted); font-weight: 700; }
.booking-wizard__review-row dd { margin: 0; color: var(--c-ink); font-weight: 700; }
@keyframes bwFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* navigation row */
.booking-wizard.is-enhanced .booking-wizard__nav {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  align-items: center;
}
.booking-wizard__nav .booking-wizard__back { flex: 0 0 auto; }
.booking-wizard__nav .booking-wizard__next { flex: 1 1 auto; }
.booking-wizard__nav .btn { transition: transform .18s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease; }
.booking-wizard__nav .btn:hover { transform: translateY(-1px); }
.booking-wizard__nav .btn:active { transform: translateY(0); }
.booking-wizard__back[hidden],
.booking-wizard__next[hidden] { display: none !important; }

@media (max-width: 480px) {
  .booking-wizard__progress-label { font-size: 0; }
  .booking-wizard__progress-idx { font-size: 10px; margin: 0; }
}

/* respect reduced-motion: disable all wizard transitions/animations */
@media (prefers-reduced-motion: reduce) {
  .booking-wizard.is-enhanced .booking-wizard__step.is-active,
  .booking-wizard__review { animation: none; }
  .booking-wizard__progress::after,
  .booking-wizard__progress-dot,
  .booking-wizard__progress-check,
  .booking-wizard__progress-num,
  .booking-wizard__progress-label,
  .booking-wizard input,
  .booking-wizard select,
  .booking-wizard textarea,
  .booking-wizard__nav .btn { transition: none !important; }
  .booking-picker__trade,
  .booking-picker__service,
  .booking-picker__trades,
  .booking-picker__trades-wrap,
  .booking-picker__service-grid .booking-picker__service,
  .booking-picker__services { transition: none !important; animation: none !important; }
}

/* ── Book Online — trade → service icon picker ── */
.booking-picker { display: grid; gap: 14px; }

/* Collapsible pick area — smoothly folds away once a service is chosen */
.booking-picker__collapse {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows .45s cubic-bezier(.4, 0, .1, 1), opacity .3s ease;
}
.booking-picker__collapse-inner {
  display: grid;
  gap: 14px;
  overflow: hidden;
  min-height: 0;
}
.booking-picker.is-selected .booking-picker__collapse {
  grid-template-rows: 0fr;
  opacity: 0;
}

/* Compact selected-service summary chip */
.booking-picker__summary[hidden] { display: none; }
.booking-picker__summary { animation: bwSummaryIn .4s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes bwSummaryIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.booking-picker__summary-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1.5px solid var(--c-green-600);
  border-radius: 16px;
  background: linear-gradient(180deg, #f3fdf7 0%, #ffffff 100%);
  box-shadow: 0 0 0 3px rgba(16, 137, 70, .08), 0 8px 20px rgba(15, 23, 42, .05);
}
.booking-picker__summary-icon {
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .08), inset 0 0 0 1px rgba(15, 23, 42, .06);
}
.booking-picker__summary-icon .ico-brand,
.booking-picker__summary-icon img {
  width: 68%;
  height: 68%;
  object-fit: contain;
}
.booking-picker__summary-icon img.booking-picker__icon-img:not(.booking-picker__icon-img--line) {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.booking-picker__summary-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.booking-picker__summary-trade {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-green-700);
}
.booking-picker__summary-label {
  font-size: 15px;
  font-weight: 800;
  color: var(--c-ink);
  line-height: 1.25;
}
.booking-picker__summary-change {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1.5px solid var(--c-line);
  border-radius: 999px;
  background: #fff;
  color: var(--c-purple-600);
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, background .2s ease, transform .18s ease, box-shadow .2s ease;
}
.booking-picker__summary-change svg { width: 15px; height: 15px; max-width: 15px; max-height: 15px; }
.booking-picker__summary-change:hover {
  border-color: var(--c-purple-600);
  background: rgba(124, 58, 237, .06);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(64, 40, 136, .12);
}
.booking-picker__summary-change:focus-visible {
  outline: 2px solid var(--c-purple-600);
  outline-offset: 2px;
}
@media (max-width: 420px) {
  .booking-picker__summary-change span { display: none; }
  .booking-picker__summary-change { padding: 9px; }
}

.booking-picker__hint {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--c-muted);
  letter-spacing: .04em;
  text-transform: uppercase;
}
/* Trades collapse away entirely once a trade is picked — keeps the
   step short enough to fit a mobile viewport without scrolling. */
.booking-picker__trades-wrap {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows .42s cubic-bezier(.4, 0, .1, 1), opacity .26s ease;
}
.booking-picker__trades-wrap > .booking-picker__trades {
  min-height: 0;
  overflow: hidden;
}
.booking-picker.is-services-open .booking-picker__trades-wrap {
  grid-template-rows: 0fr;
  opacity: 0;
  pointer-events: none;
}
.booking-picker__trades {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.booking-picker__trade {
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
  padding: 18px 10px 14px;
  border: 2px solid var(--c-line);
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  transition: transform .22s ease, border-color .2s ease, box-shadow .22s ease, background .2s ease;
}
.booking-picker__trade:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}
.booking-picker__trade[aria-pressed="true"] {
  border-color: var(--c-purple-600);
  box-shadow: 0 0 0 3px rgba(64, 40, 136, .12);
}
.booking-picker__trade-icon {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .1), inset 0 0 0 1px rgba(15, 23, 42, .05);
  overflow: hidden;
  transition: transform .32s cubic-bezier(.2, .9, .3, 1.2);
}
.booking-picker__trade:hover .booking-picker__trade-icon,
.booking-picker__trade[aria-pressed="true"] .booking-picker__trade-icon {
  transform: scale(1.06);
}
/* Limelight _gen trade icons — same visual weight as service tiles. */
.booking-picker__trade-icon .ico-brand,
.booking-picker__trade-icon .booking-picker__icon-img,
.booking-picker__trade-icon .booking-picker__trade-img {
  width: 72%;
  height: 72%;
  object-fit: contain;
}
.booking-picker__trade-icon .booking-picker__icon-img--line svg {
  width: 100%;
  height: 100%;
  display: block;
  color: #6b7524;
}
.booking-picker__trade-label {
  font-size: 14px;
  font-weight: 800;
  color: var(--c-ink);
  line-height: 1.2;
}
.booking-picker__trade-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--c-muted);
  line-height: 1.3;
}
.booking-picker__services[hidden] { display: none !important; }
.booking-picker__services {
  display: grid;
  gap: 12px;
  animation: bookingPickerIn .34s ease both;
}
@keyframes bookingPickerIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.booking-picker__services-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.booking-picker__back-trade {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: var(--c-purple-600);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0;
}
.booking-picker__back-trade .ico,
.booking-picker__back-trade .ico svg {
  width: 16px;
  height: 16px;
  max-width: 16px;
  max-height: 16px;
}
.booking-picker__services-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--c-ink-2);
}
/* 4 curated options per trade — 2x2 grid, no inner scrolling */
.booking-picker__service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.booking-picker__service-grid .booking-picker__service {
  animation: bookingTileIn .38s cubic-bezier(.22, 1, .36, 1) both;
}
.booking-picker__service-grid .booking-picker__service:nth-child(1) { animation-delay: .02s; }
.booking-picker__service-grid .booking-picker__service:nth-child(2) { animation-delay: .07s; }
.booking-picker__service-grid .booking-picker__service:nth-child(3) { animation-delay: .12s; }
.booking-picker__service-grid .booking-picker__service:nth-child(4) { animation-delay: .17s; }
@keyframes bookingTileIn {
  from { opacity: 0; transform: translateY(12px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.booking-picker__service {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: center;
  text-align: left;
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--c-line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease, transform .18s ease;
}
.booking-picker__service:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
}
.booking-picker__service[aria-pressed="true"] {
  border-color: var(--c-purple-600);
  box-shadow: 0 0 0 3px rgba(64, 40, 136, .1);
  animation: bookingTilePop .32s cubic-bezier(.34, 1.56, .64, 1) both;
}
@keyframes bookingTilePop {
  0%   { transform: scale(1); }
  45%  { transform: scale(.97); }
  100% { transform: scale(1); }
}
/* catch-all "Something else" tile */
.booking-picker__service--other {
  border-style: dashed;
  background: var(--c-bg-soft, #f8fafc);
}
.booking-picker__service--other .booking-picker__service-icon {
  background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--c-line);
}
.booking-picker__service-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .08), inset 0 0 0 1px rgba(15, 23, 42, .06);
  overflow: hidden;
}
.booking-picker__service-icon .ico-brand,
.booking-picker__service-icon .booking-picker__icon-img {
  width: 72%;
  height: 72%;
  object-fit: contain;
}
.booking-picker__service-icon .booking-picker__icon-img--line svg {
  width: 100%;
  height: 100%;
  display: block;
  color: #6b7524;
}
.booking-picker__service-label {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: var(--c-ink);
  line-height: 1.25;
}
.booking-picker__service-desc {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--c-muted);
  line-height: 1.4;
}
.booking-picker__fallback { display: none; }
.booking-wizard:not(.is-enhanced) .booking-picker__trades,
.booking-wizard:not(.is-enhanced) .booking-picker__services { display: none; }
.booking-wizard:not(.is-enhanced) .booking-picker__fallback { display: grid; gap: 6px; }
.booking-wizard.is-enhanced .booking-picker__fallback { display: none; }
.booking-wizard.is-enhanced [data-booking-service-input] { display: none; }

@media (max-width: 640px) {
  /* Compact wizard: trades stay 3-across; tiles shrink instead of stack. */
  .book-hero-booking .contact-card--form { padding: 20px 16px 18px; }
  .booking-card__head { margin-bottom: 12px; }
  .booking-card__head h2 { font-size: 19px; }
  .booking-card__subtitle { font-size: 12.5px; }
  .booking-wizard.is-enhanced .booking-wizard__progress { margin-bottom: 14px; }
  .booking-wizard__steps { gap: 10px; }
  .booking-wizard__step { gap: 10px; }
  .booking-wizard.is-enhanced .booking-wizard__nav { margin-top: 12px; }
  .booking-picker { gap: 10px; }
  .booking-picker__trades { gap: 8px; }
  .booking-picker__trade { padding: 12px 6px 10px; gap: 6px; border-radius: 14px; }
  /* Match service-tile icon presence — avoid cramped grey-circle chips. */
  .booking-picker__trade-icon { width: 64px; height: 64px; }
  .booking-picker__trade-icon .ico-brand,
  .booking-picker__trade-icon .booking-picker__icon-img,
  .booking-picker__trade-icon .booking-picker__trade-img {
    width: 78%;
    height: 78%;
  }
  .booking-picker__trade-label { font-size: 12.5px; }
  .booking-picker__trade-tag { font-size: 10px; }
  .booking-picker__service-grid { gap: 8px; }
  .booking-picker__service {
    grid-template-columns: 40px 1fr;
    gap: 9px;
    padding: 10px;
    border-radius: 12px;
  }
  .booking-picker__service-icon { width: 40px; height: 40px; }
  .booking-picker__service-label { font-size: 12.5px; }
  .booking-picker__service-desc {
    font-size: 10.5px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .booking-picker__summary-icon { width: 42px; height: 42px; }
  .booking-picker__summary-label { font-size: 13.5px; }
}
