/* ============================================================
   BOOKING PAGE - Dedicated styles for booking.html
   ============================================================ */

.booking-page {
  padding-top: 100px;
  min-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
}

.booking-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.booking-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.booking-header p {
  color: var(--color-muted);
  font-size: 1.1rem;
}

/* --- Progress Steps --- */
.booking-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.booking-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.booking-step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  background: #e5e7eb;
  color: var(--color-muted);
  transition: all 0.3s ease;
}

.booking-step.active .booking-step-number {
  background: var(--color-primary);
  color: var(--color-text-light);
}

.booking-step.completed .booking-step-number {
  background: var(--color-primary);
  color: var(--color-text-light);
}

.booking-step span {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-muted);
  transition: color 0.3s ease;
}

.booking-step.active span {
  color: var(--color-primary);
}

.booking-step.completed span {
  color: var(--color-primary);
}

.booking-step-line {
  flex: 1;
  height: 2px;
  background: #e5e7eb;
  margin: 0 0.75rem;
  margin-bottom: 1.5rem;
  transition: background 0.3s ease;
}

.booking-step-line.active {
  background: var(--color-primary);
}

/* --- Booking Panels --- */
.booking-panel {
  max-width: 800px;
  margin: 0 auto 3rem;
  background: var(--color-bg);
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
}

.booking-panel.hidden {
  display: none;
}

.booking-panel h2 {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.booking-subsection-title {
  font-size: 1rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--color-secondary);
}

/* --- Booking Form Fields --- */
.booking-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.booking-panel .form-group {
  display: flex;
  flex-direction: column;
}

.booking-panel .form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.booking-panel .form-group input,
.booking-panel .form-group select,
.booking-panel .form-group textarea {
  padding: 0.875rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.booking-panel .form-group input:focus,
.booking-panel .form-group select:focus,
.booking-panel .form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.15);
}

/* --- Booking Navigation --- */
.booking-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

/* --- Service Selection Cards --- */
.booking-services-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.booking-service-card {
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.booking-service-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.booking-service-card.selected {
  border-color: var(--color-primary);
  background: rgba(201, 169, 110, 0.05);
}

.booking-service-card.selected::after {
  content: '';
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 14px;
  background-position: center;
  background-repeat: no-repeat;
}

.booking-service-card h4 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.booking-service-card p {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.booking-service-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.booking-service-card-meta .price {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-primary);
}

.booking-service-card-meta .duration {
  font-size: 0.8rem;
  color: var(--color-muted);
}

/* --- Stylist Selection --- */
.booking-stylists-list {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.booking-stylist-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
  min-width: 200px;
}

.booking-stylist-card:hover {
  border-color: var(--color-primary);
}

.booking-stylist-card.selected {
  border-color: var(--color-primary);
  background: rgba(201, 169, 110, 0.05);
}

.booking-stylist-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--color-primary);
  font-size: 1.1rem;
  flex-shrink: 0;
  overflow: hidden;
}

.booking-stylist-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.booking-stylist-info h4 {
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

.booking-stylist-info p {
  font-size: 0.8rem;
  color: var(--color-muted);
}

/* --- Date Picker --- */
.booking-date-row {
  max-width: 250px;
}

.booking-date-row input[type="date"] {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
  transition: border-color 0.3s ease;
}

.booking-date-row input[type="date"]:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.15);
}

/* --- Time Slots --- */
.booking-time-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.booking-time-slot {
  padding: 0.6rem 1.2rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  text-align: center;
  min-width: 90px;
}

.booking-time-slot:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.booking-time-slot.selected {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-text-light);
}

.booking-time-slot.unavailable {
  opacity: 0.35;
  cursor: not-allowed;
  text-decoration: line-through;
}

/* --- Booking Summary --- */
.booking-summary {
  display: grid;
  gap: 1rem;
}

.booking-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f3f4f6;
}

.booking-summary-row:last-child {
  border-bottom: none;
  padding-top: 1rem;
  font-weight: 700;
  font-size: 1.1rem;
}

.booking-summary-label {
  color: var(--color-muted);
  font-size: 0.9rem;
}

.booking-summary-value {
  font-weight: 600;
  color: var(--color-secondary);
}

/* --- Success State --- */
.booking-success {
  text-align: center;
  padding: 2rem 0;
}

.booking-success-icon {
  color: #22c55e;
  margin-bottom: 1.5rem;
}

.booking-success h2 {
  border: none;
  padding-bottom: 0;
  margin-bottom: 0.75rem;
}

.booking-success p {
  color: var(--color-muted);
  font-size: 1.05rem;
}

.booking-success-details {
  text-align: left;
  max-width: 400px;
  margin: 2rem auto 0;
  background: #f9fafb;
  border-radius: 12px;
  padding: 1.5rem;
}

/* --- Booking page footer push to bottom --- */
.booking-page-footer {
  margin-top: auto;
}

/* --- Focus States (keyboard accessibility) --- */
.booking-service-card:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.booking-stylist-card:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.booking-time-slot:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* --- Disabled button state --- */
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* --- Error state --- */
.booking-error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .booking-page {
    padding-top: 80px;
  }

  .booking-header h1 {
    font-size: 2rem;
  }

  .booking-panel {
    padding: 1.5rem;
  }

  .booking-form-row {
    grid-template-columns: 1fr;
  }

  .booking-services-list {
    grid-template-columns: 1fr;
  }

  .booking-stylists-list {
    flex-direction: column;
  }

  .booking-steps {
    gap: 0;
  }

  .booking-step span {
    font-size: 0.65rem;
  }

  .booking-step-number {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }

  .booking-nav {
    flex-direction: column-reverse;
    gap: 0.75rem;
  }

  .booking-nav .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .booking-header h1 {
    font-size: 1.6rem;
  }

  .booking-step span {
    display: none;
  }

  .booking-step-line {
    margin-bottom: 0;
  }

  .booking-time-slots {
    gap: 0.5rem;
  }

  .booking-time-slot {
    min-width: 70px;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }
}
