/* ==========================================================================
   Booking wizard — dark/brass, restrained motion, mobile-first.
   Structure lives in index.html (#booking-modal); behavior in js/booking.js.
   ========================================================================== */

.booking-modal {
  font-family: "Assistant", sans-serif;
}

.booking-modal.is-open {
  display: block;
}

.booking-modal-backdrop {
  animation: booking-fade-in 0.3s ease both;
}

.booking-modal-panel {
  animation: booking-panel-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes booking-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes booking-panel-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .booking-modal-backdrop,
  .booking-modal-panel {
    animation: none;
  }
}

/* Step indicator */
.booking-steps-indicator {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 1rem 0 0;
  list-style: none;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: #9C9690;
}
.booking-steps-indicator li {
  flex: none;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.booking-steps-indicator li.is-current {
  color: #A9843F;
  border-bottom-color: #A9843F;
}
.booking-steps-indicator li.is-done {
  color: #F2EEE6;
}

.booking-error {
  margin-top: 1rem;
  border: 1px solid rgba(185, 90, 70, 0.5);
  background: rgba(185, 90, 70, 0.08);
  color: #e8b3a6;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  border-radius: 2px;
}

.booking-step-title {
  font-family: "Frank Ruhl Libre", serif;
  font-size: 1.5rem;
  color: #F2EEE6;
}

.booking-step-hint {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: #9C9690;
}

/* Option grids: service / barber selection */
.booking-option-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
@media (min-width: 480px) {
  .booking-option-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .booking-option-grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.booking-option {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: #F2EEE6;
  text-align: right;
  padding: 1.1rem 1.25rem;
  cursor: pointer;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}
.booking-option.is-selected {
  border-color: #A9843F;
  background: rgba(169, 132, 63, 0.08);
}
.booking-option-title {
  font-family: "Frank Ruhl Libre", serif;
  font-size: 1.05rem;
}
.booking-option-meta {
  font-size: 0.8rem;
  color: #9C9690;
}

/* Date list */
.booking-date-list {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding: 1.5rem 0 0.5rem;
  scroll-snap-type: x proximity;
}
.booking-date-chip {
  flex: none;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  min-width: 4.25rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: #F2EEE6;
  padding: 0.75rem 0.5rem;
  cursor: pointer;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}
.booking-date-chip:hover {
  border-color: rgba(169, 132, 63, 0.6);
}
.booking-date-chip.is-selected {
  border-color: #A9843F;
  background: rgba(169, 132, 63, 0.08);
}
.booking-date-chip .weekday {
  font-size: 0.7rem;
  color: #9C9690;
}
.booking-date-chip .daynum {
  font-family: "Frank Ruhl Libre", serif;
  font-size: 1.1rem;
}

/* Time grid */
.booking-time-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin-top: 1.5rem;
}
@media (min-width: 480px) {
  .booking-time-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.booking-time-slot {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: #F2EEE6;
  padding: 0.65rem 0.4rem;
  font-size: 0.85rem;
  direction: ltr;
  cursor: pointer;
  transition: border-color 0.3s ease, background-color 0.3s ease, opacity 0.3s ease;
}
.booking-time-slot:hover:not(:disabled) {
  border-color: rgba(169, 132, 63, 0.6);
}
.booking-time-slot.is-selected {
  border-color: #A9843F;
  background: rgba(169, 132, 63, 0.08);
}
.booking-time-slot:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Forms */
.booking-form {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 1.5rem;
}
.booking-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9C9690;
  margin-top: 0.75rem;
}
.booking-label:first-child {
  margin-top: 0;
}
.booking-input {
  background: #1A1A19;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #F2EEE6;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border-radius: 2px;
  transition: border-color 0.3s ease;
}
.booking-input:focus {
  border-color: #A9843F;
  outline: none;
}
/* Same specificity as .booking-input:focus above, declared after it, so
   keyboard focus regains the site-wide brass ring (see style.css's
   input:focus-visible rule, which this would otherwise always shadow). */
.booking-input:focus-visible {
  outline: 2px solid #A9843F;
  outline-offset: 3px;
}
.booking-otp-input {
  letter-spacing: 0.5em;
  text-align: center;
  font-size: 1.4rem;
}

.booking-turnstile {
  margin-top: 1rem;
  min-height: 0;
}

.booking-hold-countdown {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: #9C9690;
}
.booking-hold-countdown.is-low {
  color: #c98a5c;
}

/* Phase 1 mock-mode only — disappears automatically once Phase 2 wires up
   the real backend, since demoOtp is never populated for real. */
.booking-demo-hint {
  margin-top: 0.5rem;
  border: 1px dashed rgba(169, 132, 63, 0.5);
  background: rgba(169, 132, 63, 0.06);
  color: #c9a75c;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  border-radius: 2px;
}

.booking-link-btn {
  margin-top: 1rem;
  background: none;
  border: none;
  color: #A9843F;
  font-size: 0.85rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}
.booking-link-btn:disabled {
  color: #9C9690;
  cursor: not-allowed;
  text-decoration: none;
}

/* Confirmation */
.booking-confirm-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  border: 1px solid #A9843F;
  color: #A9843F;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}
.booking-confirm-summary {
  margin-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
  font-size: 0.95rem;
}
.booking-confirm-summary div {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  color: #9C9690;
}
.booking-confirm-summary div span:last-child {
  color: #F2EEE6;
}

/* Nav buttons */
.booking-nav-btn {
  padding: 0.75rem 1.75rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  border-radius: 2px;
  transition: opacity 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}
.booking-nav-btn-ghost {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #F2EEE6;
}
.booking-nav-btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.4);
}
.booking-nav-btn-primary {
  background: #A9843F;
  border: 1px solid #A9843F;
  color: #111110;
}
.booking-nav-btn-primary:hover {
  background: #C9A75C;
  border-color: #C9A75C;
}
.booking-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.booking-nav-btn.is-hidden {
  visibility: hidden;
}
