/* ============================================
   BOOKING PAGE LAYOUT
   Layers on top of form.css shared styles
   ============================================ */

.booking-page {
  background: var(--color-bg);
}

.booking-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  min-height: calc(100dvh - 64px);
}

/* ============================================
   INTRO SCREEN — overrides form intro
   ============================================ */

.booking-intro {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100dvh - 64px);
  padding: var(--space-8);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.booking-intro.active {
  opacity: 1;
  transform: translateY(0);
}

.booking-intro.exiting {
  opacity: 0;
  transform: translateY(-30px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* ============================================
   BOOKING WRAPPER & CONTAINER
   ============================================ */

.booking-wrapper {
  width: 100%;
}

.booking-wrapper.entering {
  animation: bookingFadeUp 0.5s ease forwards;
}

@keyframes bookingFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.booking-container {
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  padding: var(--space-8) var(--space-8) var(--space-16);
}

/* ============================================
   BOOKING STEPS
   ============================================ */

.booking-step {
  display: none;
}

.booking-step.active {
  display: block;
}

/* ============================================
   CALENDAR NAVIGATION
   ============================================ */

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  margin-top: var(--space-6);
}

.cal-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid rgba(91, 91, 91, 0.15);
  background: transparent;
  cursor: pointer;
  color: var(--color-text-secondary);
  transition: all 0.2s ease;
}

.cal-nav-btn:hover:not(:disabled) {
  border-color: var(--color-brick);
  color: var(--color-brick);
}

.cal-nav-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.cal-month-label {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text-primary);
  text-transform: capitalize;
}

/* ============================================
   CALENDAR GRID
   ============================================ */

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.calendar-weekdays span {
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-2) 0;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-2);
}

.cal-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-2);
  border-radius: 10px;
  border: 2px solid rgba(91, 91, 91, 0.12);
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 68px;
}

.cal-day:hover:not(.cal-day--disabled):not(.cal-day--past) {
  border-color: var(--color-brick);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(218, 119, 86, 0.1);
}

.cal-day.selected {
  border-color: var(--color-brick);
  background: rgba(218, 119, 86, 0.06);
  box-shadow: 0 0 0 1px var(--color-brick);
}

.cal-day--disabled,
.cal-day--past {
  opacity: 0.25;
  cursor: not-allowed;
  background: var(--color-bg);
  border-color: transparent;
}

.cal-day--past:hover {
  transform: none;
  box-shadow: none;
  border-color: transparent;
}

.cal-day-number {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text-primary);
  line-height: 1;
}

.cal-day-name {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.cal-day.selected .cal-day-number {
  color: var(--color-brick);
}

.cal-day.selected .cal-day-name {
  color: var(--color-brick);
}

.cal-day--today {
  position: relative;
}

.cal-day--today::after {
  content: '';
  position: absolute;
  bottom: 6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-brick);
}

/* ============================================
   TIME SLOTS
   ============================================ */

.time-section {
  margin-bottom: var(--space-6);
}

.time-period-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-3);
  font-weight: 500;
}

.time-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
}

.time-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-2);
  background: white;
  border: 2px solid rgba(91, 91, 91, 0.12);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-text-primary);
  white-space: nowrap;
}

.time-slot:hover {
  border-color: var(--color-brick);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(218, 119, 86, 0.1);
}

.time-slot.selected {
  border-color: var(--color-brick);
  background: rgba(218, 119, 86, 0.06);
  box-shadow: 0 0 0 1px var(--color-brick);
  color: var(--color-brick);
  font-weight: 500;
}

/* ============================================
   NOTES TEXTAREA — booking-specific overrides
   ============================================ */

.booking-step .field-group {
  margin-top: var(--space-8);
  margin-bottom: var(--space-2);
}

.booking-step .form-textarea {
  background: white;
  border: 2px solid rgba(91, 91, 91, 0.12);
  border-radius: 10px;
  padding: var(--space-4);
  resize: vertical;
  min-height: 90px;
  line-height: 1.6;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text-primary);
  width: 100%;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.booking-step .form-textarea::placeholder {
  color: var(--color-text-muted);
}

.booking-step .form-textarea:focus {
  border-color: var(--color-brick);
  box-shadow: 0 0 0 1px var(--color-brick);
}

/* ============================================
   NAVIGATION BUTTONS
   ============================================ */

.booking-nav-buttons {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: var(--space-8);
}

.booking-nav-buttons .btn-continue {
  margin-top: 0;
}

.booking-nav-buttons .btn-continue:disabled,
.booking-nav-buttons .btn-submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

.booking-nav-buttons .btn-continue:disabled:hover,
.booking-nav-buttons .btn-submit:disabled:hover {
  transform: none;
  filter: none;
}

/* ============================================
   CONFIRMATION CARD
   ============================================ */

.booking-confirmation-card {
  background: white;
  border: 2px solid rgba(218, 119, 86, 0.15);
  border-radius: 12px;
  padding: var(--space-6);
  margin: var(--space-8) auto;
  max-width: 360px;
}

.confirmation-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) 0;
}

.confirmation-row:not(:last-child) {
  border-bottom: 1px solid rgba(91, 91, 91, 0.08);
}

.confirmation-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.confirmation-value {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text-primary);
}

/* ============================================
   SUCCESS SCREEN — booking-specific
   ============================================ */

.booking-step[data-step="success"] .success-screen {
  text-align: center;
  padding: var(--space-12) 0;
}

.booking-step[data-step="success"] .success-message {
  margin-bottom: var(--space-8);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .booking-container {
    padding: var(--space-4) var(--space-4) var(--space-12);
  }

  .time-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .booking-intro .intro-content {
    padding: 0 var(--space-2);
  }
}

@media (max-width: 480px) {
  .calendar-grid {
    gap: var(--space-1);
  }

  .cal-day {
    padding: var(--space-2);
    min-height: 56px;
  }

  .cal-day-number {
    font-size: var(--text-base);
  }

  .time-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .time-slot {
    font-size: var(--text-xs);
    padding: var(--space-2) var(--space-1);
  }

  .booking-nav-buttons {
    flex-direction: column-reverse;
    gap: var(--space-3);
  }

  .booking-nav-buttons .btn-continue,
  .booking-nav-buttons .btn-submit {
    width: 100%;
  }

  .booking-nav-buttons .btn-back {
    width: 100%;
    text-align: center;
  }

  .booking-step .form-textarea {
    min-height: 80px;
  }

  .booking-confirmation-card {
    margin: var(--space-6) auto;
    padding: var(--space-4);
  }

  .booking-step[data-step="success"] .form-actions {
    flex-direction: column;
    align-items: center;
  }

  .booking-step[data-step="success"] .form-actions .btn-primary,
  .booking-step[data-step="success"] .form-actions .btn-ghost {
    width: 100%;
    text-align: center;
  }
}
