/* ===== VELOCITY — Booking wizard & calendar ===== */

.booking-page {
  background: var(--v-surface);
  min-height: 100vh;
}

.booking-shell {
  padding-block: var(--sp-12) var(--sp-24);
}

.booking-head {
  max-width: 640px;
  margin-bottom: var(--sp-8);
}

.booking-head p {
  margin-top: var(--sp-3);
}

/* ---------- Progress ---------- */
.progress {
  position: sticky;
  top: var(--header-h);
  z-index: var(--z-sticky);
  margin-bottom: var(--sp-8);
  padding-block: var(--sp-4);
  background: var(--v-surface);
}

.progress__bar {
  height: 4px;
  background: var(--v-border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress__fill {
  height: 100%;
  width: 0;
  background: var(--v-accent);
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
}

.progress__steps {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
  list-style: none;
}

.progress__step {
  flex: 1;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--v-text-muted);
  text-align: center;
  padding-top: var(--sp-1);
}

.progress__step[aria-current='step'] {
  color: var(--v-primary);
}

.progress__step.is-done {
  color: var(--v-success);
}

@media (max-width: 700px) {
  .progress__steps {
    display: none;
  }

  .progress__label-mobile {
    display: block;
    margin-top: var(--sp-3);
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--v-primary);
  }
}

.progress__label-mobile {
  display: none;
}

/* ---------- Wizard panel ---------- */
.wizard {
  background: var(--v-bg);
  border: 1px solid var(--v-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.wstep {
  display: none;
  padding: var(--sp-10);
}

.wstep.is-active {
  display: block;
  animation: step-in var(--transition-slow);
}

@keyframes step-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.wstep__head {
  margin-bottom: var(--sp-8);
}

.wstep__head h2 {
  font-size: var(--fs-2xl);
}

.wstep__head p {
  margin-top: var(--sp-2);
  font-size: var(--fs-sm);
}

.wstep__body {
  display: grid;
  gap: var(--sp-6);
}

.wizard__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-6) var(--sp-10);
  border-top: 1px solid var(--v-border);
  background: var(--v-surface);
}

.wizard__nav .btn--ghost {
  visibility: visible;
}

.wizard__nav.is-first .btn--ghost {
  visibility: hidden;
}

@media (max-width: 700px) {
  .wstep {
    padding: var(--sp-6);
  }

  .wizard__nav {
    padding: var(--sp-4) var(--sp-6);
  }

  .wizard__nav .btn {
    flex: 1;
  }
}

/* ---------- Step 1: service picker ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
}

.service-opt {
  position: relative;
  display: block;
  cursor: pointer;
}

.service-opt input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.service-opt__box {
  display: grid;
  gap: var(--sp-2);
  height: 100%;
  padding: var(--sp-5);
  border: 1px solid var(--v-border-strong);
  border-radius: var(--radius);
  background: var(--v-bg);
  transition: all var(--transition);
}

.service-opt:hover .service-opt__box {
  border-color: var(--opt-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.service-opt input:checked + .service-opt__box {
  border-color: var(--opt-accent);
  box-shadow: 0 0 0 2px var(--opt-accent);
  background: color-mix(in srgb, var(--opt-accent) 5%, #fff);
}

.service-opt input:focus-visible + .service-opt__box {
  outline: 3px solid var(--v-accent);
  outline-offset: 2px;
}

.service-opt__icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--opt-accent) 12%, transparent);
  color: var(--opt-accent);
}

.service-opt__icon svg {
  width: 22px;
  height: 22px;
}

.service-opt__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-base);
  color: var(--v-primary);
}

.service-opt__desc {
  font-size: var(--fs-xs);
  color: var(--v-text-muted);
  line-height: 1.45;
}

@media (max-width: 900px) {
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .service-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Step 2: dynamic questions ---------- */
.questions {
  display: grid;
  gap: var(--sp-6);
}

.question {
  display: grid;
  gap: var(--sp-3);
  padding-bottom: var(--sp-6);
  border-bottom: 1px solid var(--v-border);
}

.question:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.question__label {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--v-primary);
}

.question__hint {
  font-size: var(--fs-xs);
  color: var(--v-text-muted);
  margin-top: calc(var(--sp-2) * -1);
}

.question--hidden {
  display: none;
}

.input-group {
  display: flex;
  align-items: stretch;
}

.input-group .input {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.input-group__suffix {
  display: grid;
  place-items: center;
  padding-inline: var(--sp-4);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--v-text-muted);
  background: var(--v-surface);
  border: 1px solid var(--v-border-strong);
  border-left: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ---------- Step 3: calendar ---------- */
.booking-cal {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--sp-8);
  align-items: start;
}

@media (max-width: 900px) {
  .booking-cal {
    grid-template-columns: 1fr;
  }
}

.cal {
  border: 1px solid var(--v-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.cal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--v-border);
  background: var(--v-surface);
}

.cal__month {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 800;
  color: var(--v-primary);
  text-transform: capitalize;
}

.cal__navbtn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--v-border-strong);
  color: var(--v-primary);
  background: var(--v-bg);
  transition: all var(--transition);
}

.cal__navbtn:hover:not(:disabled) {
  background: var(--v-primary);
  border-color: var(--v-primary);
  color: #fff;
}

.cal__navbtn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.cal__navbtn svg {
  width: 16px;
  height: 16px;
}

.cal__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: var(--sp-3) var(--sp-3) 0;
}

.cal__weekday {
  text-align: center;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--v-text-muted);
  padding-bottom: var(--sp-2);
}

.cal__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  padding: 0 var(--sp-3) var(--sp-3);
}

.cal__blank {
  aspect-ratio: 1;
}

.cal__day {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  gap: 2px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--v-text);
  background: var(--v-bg);
  transition: all var(--transition-fast);
}

.cal__day--free {
  background: var(--v-success-soft);
  color: #1c6b3b;
  cursor: pointer;
}

.cal__day--free:hover {
  background: var(--v-success);
  color: #fff;
  transform: scale(1.04);
}

.cal__day--few {
  background: var(--v-warning-soft);
  color: #8a5f05;
  cursor: pointer;
}

.cal__day--few:hover {
  background: var(--v-warning);
  color: #fff;
  transform: scale(1.04);
}

.cal__day--full,
.cal__day--closed {
  color: var(--v-border-strong);
  cursor: not-allowed;
  background: transparent;
}

/* Closed and fully-booked days stay focusable for keyboard traversal
   (aria-disabled, not the disabled attribute), so block pointer selection
   here instead. Focus outlines must still show. */
.cal__day[aria-disabled='true'] {
  pointer-events: none;
}

.cal__day[aria-disabled='true']:focus-visible {
  pointer-events: auto;
}

.cal__day--closed {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.cal__day--today {
  border-color: var(--v-primary);
}

.cal__day[aria-selected='true'] {
  background: var(--v-primary);
  color: #fff;
  box-shadow: 0 0 0 2px var(--v-primary);
}

.cal__day[aria-selected='true']:hover {
  background: var(--v-primary-light);
  color: #fff;
}

.cal__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
}

.cal__day[aria-selected='true'] .cal__dot {
  opacity: 1;
}

.cal__legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--v-border);
  background: var(--v-surface);
  font-size: var(--fs-xs);
  color: var(--v-text-muted);
}

.cal__legend span {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}

.cal__swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

.cal__swatch--free { background: var(--v-success-soft); border: 1px solid var(--v-success); }
.cal__swatch--few { background: var(--v-warning-soft); border: 1px solid var(--v-warning); }
.cal__swatch--full { background: var(--v-surface-2); border: 1px solid var(--v-border-strong); }
.cal__swatch--closed { background: transparent; border: 1px dashed var(--v-border-strong); }

.cal__loading {
  padding: var(--sp-12);
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--v-text-muted);
}

/* ---------- Slot picker ---------- */
.slots {
  border: 1px solid var(--v-border);
  border-radius: var(--radius);
  padding: var(--sp-5);
  background: var(--v-bg);
  position: sticky;
  top: calc(var(--header-h) + 92px);
}

.slots__title {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 800;
  color: var(--v-primary);
  margin-bottom: var(--sp-1);
}

.slots__date {
  font-size: var(--fs-sm);
  color: var(--v-text-muted);
  margin-bottom: var(--sp-4);
  text-transform: capitalize;
}

.slots__list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-2);
}

.slot {
  padding: var(--sp-3);
  font-size: var(--fs-sm);
  font-weight: 700;
  text-align: center;
  border: 1px solid var(--v-border-strong);
  border-radius: var(--radius-sm);
  color: var(--v-primary);
  background: var(--v-bg);
  transition: all var(--transition-fast);
}

.slot:hover {
  border-color: var(--v-primary);
  background: var(--v-surface);
}

.slot[aria-pressed='true'] {
  background: var(--v-primary);
  border-color: var(--v-primary);
  color: #fff;
}

.slots__empty {
  font-size: var(--fs-sm);
  color: var(--v-text-muted);
}

@media (max-width: 900px) {
  .slots {
    position: static;
  }

  .slots__list {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Hold countdown ---------- */
.hold {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
  padding: var(--sp-4);
  border-radius: var(--radius-sm);
  background: var(--v-info-soft);
  border: 1px solid rgba(46, 139, 200, 0.25);
  font-size: var(--fs-sm);
  color: #1c5c85;
}

.hold.is-warning {
  background: var(--v-warning-soft);
  border-color: rgba(232, 163, 23, 0.35);
  color: #8a5f05;
}

.hold.is-expired {
  background: var(--v-danger-soft);
  border-color: rgba(214, 69, 69, 0.3);
  color: #8f2020;
}

.hold__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.hold__timer {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

/* ---------- Step 4: customer form ---------- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-5);
}

.form-grid > .field--full {
  grid-column: 1 / -1;
}

@media (max-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Step 5: review ---------- */
.review {
  display: grid;
  gap: var(--sp-5);
}

.review__block {
  border: 1px solid var(--v-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.review__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-3) var(--sp-5);
  background: var(--v-surface);
  border-bottom: 1px solid var(--v-border);
}

.review__head h3 {
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--v-text-muted);
}

.review__edit {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--v-primary);
}

.review__edit:hover {
  color: var(--v-accent-dark);
}

.review__body {
  padding: var(--sp-5);
}

.review__list {
  display: grid;
  gap: var(--sp-3);
  list-style: none;
}

.review__row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--sp-4);
  font-size: var(--fs-sm);
}

.review__key {
  color: var(--v-text-muted);
}

.review__val {
  color: var(--v-text);
  font-weight: 600;
}

@media (max-width: 560px) {
  .review__row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

.review__slot {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.review__slot-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--v-accent-soft);
  color: var(--v-accent-dark);
}

.review__slot-when {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 800;
  color: var(--v-primary);
  text-transform: capitalize;
}

.review__service {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.review__service-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--opt-accent, var(--v-primary)) 12%, transparent);
  color: var(--opt-accent, var(--v-primary));
}

/* ---------- Success ---------- */
.success {
  text-align: center;
  padding: var(--sp-16) var(--sp-8);
}

.success__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto var(--sp-6);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--v-success-soft);
  color: var(--v-success);
}

.success__icon svg {
  width: 40px;
  height: 40px;
}

.success h2 {
  font-size: var(--fs-3xl);
}

.success > p {
  margin: var(--sp-4) auto 0;
}

.success__ref {
  display: inline-grid;
  gap: var(--sp-1);
  margin-top: var(--sp-8);
  padding: var(--sp-4) var(--sp-8);
  border: 1px dashed var(--v-border-strong);
  border-radius: var(--radius);
  background: var(--v-surface);
}

.success__ref-label {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--v-text-muted);
}

.success__ref-code {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 800;
  color: var(--v-primary);
  letter-spacing: var(--ls-wide);
}

.success__details {
  display: grid;
  gap: var(--sp-2);
  max-width: 420px;
  margin: var(--sp-8) auto 0;
  text-align: left;
  font-size: var(--fs-sm);
}

.success__details div {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-block: var(--sp-2);
  border-bottom: 1px solid var(--v-border);
}

.success__details dt {
  color: var(--v-text-muted);
}

.success__details dd {
  font-weight: 600;
  text-align: right;
  text-transform: capitalize;
}

.success__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  justify-content: center;
  margin-top: var(--sp-8);
}

.success__note {
  margin: var(--sp-8) auto 0;
  font-size: var(--fs-xs);
  max-width: 46ch;
}
