/**
 * Booking Components CSS
 * Extracted class-based styles for repeated inline patterns
 * + Guest stepper accessibility + Date picker accessibility
 * Version: 1.0.0
 */

/* ============================================
   EXTRACTED COMPONENT CLASSES
   ============================================ */

/* Step content wrapper — replaces inline max-width + padding */
.step-content-wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Section spacing — replaces inline text-align + margin-bottom */
.section-spacing {
  text-align: center;
  margin-bottom: 40px;
}

/* Loader dots — replaces inline dot animations */
.loader-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px 0;
}

.loader-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--template-primary, #007bff);
  animation: loaderPulse 1.4s ease-in-out infinite;
}

.loader-dot:nth-child(2) { animation-delay: 0.2s; }
.loader-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes loaderPulse {
  0%, 80%, 100% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  40% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Card padded — replaces inline white card styling */
.card-padded {
  background: white;
  padding: 40px;
  border-radius: 16px;
  box-shadow:
    0 1px 2px rgba(0, 40, 120, 0.04),
    0 2px 4px rgba(0, 40, 120, 0.04),
    0 4px 12px rgba(0, 40, 120, 0.06);
}

/* Availability badges */
.availability-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.availability-available {
  background: #ecfdf5;
  color: #059669;
}

.availability-conflict {
  background: #fff7ed;
  color: #d97706;
}

.availability-booked {
  background: #fef2f2;
  color: #dc2626;
}

/* Form grid — 2-column layout */
.form-grid-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 600px) {
  .form-grid-2col {
    grid-template-columns: 1fr;
  }
}

/* Submit button — gradient CTA */
.submit-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--template-primary, #007bff) 0%, var(--template-accent, #17a2b8) 100%);
  color: white;
  border: none;
  border-radius: var(--template-radius-pill, 50px);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow:
    0 2px 4px rgba(0, 40, 120, 0.08),
    0 4px 12px rgba(0, 40, 120, 0.08);
}

.submit-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 4px 8px rgba(0, 40, 120, 0.1),
    0 8px 20px rgba(0, 40, 120, 0.1);
}

.submit-btn-primary:active {
  transform: scale(0.97);
}


/* ============================================
   GUEST STEPPER — Accessible touch targets
   ============================================ */

.guest-stepper button {
  min-width: 48px;
  min-height: 48px;
}

.guest-stepper .qty-display,
.guest-stepper .guest-stepper-num {
  font-size: 1.25rem;
  min-width: 56px;
}

/* Quick-pick chips — accessible sizing */
.guest-chip {
  min-height: 44px;
  padding: 10px 20px;
}

@media (max-width: 600px) {
  .guest-stepper {
    gap: 0;
  }

  .guest-stepper button {
    min-width: 52px;
    min-height: 52px;
  }

  .guest-chip {
    min-height: 44px;
    padding: 10px 16px;
  }
}


/* ============================================
   DATE PICKER — Accessibility enhancements
   ============================================ */

/* Ensure minimum touch targets on calendar days */
#date-picker-root td,
#date-picker-root .calendar-day,
.date-picker-day {
  min-width: 44px;
  min-height: 44px;
}

/* Focus-visible ring for keyboard navigation */
.date-picker-day:focus-visible {
  outline: 2px solid var(--template-primary, #007bff);
  outline-offset: 2px;
  border-radius: 10px;
}

/* Selected day — branded circle */
.date-picker-day.dp-selected {
  background: var(--template-primary, #007bff);
  color: white;
  border-radius: 50%;
  font-weight: 700;
}

/* Today indicator — inset ring */
.date-picker-day.dp-today:not(.dp-selected) {
  box-shadow: inset 0 0 0 2px var(--template-primary, #007bff);
}

/* Disabled days */
.date-picker-day.dp-disabled,
.date-picker-day.dp-blocked {
  opacity: 0.35;
  cursor: not-allowed;
}


/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .loader-dot {
    animation: none;
    opacity: 0.6;
  }

  .submit-btn-primary:hover,
  .submit-btn-primary:active {
    transform: none;
  }
}
