/* --- RESET BÁSICO --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

/* ==========================================================================
   MARIAN ESTILISTA - RESERVAS.CSS
   Estilos específicos para el Wizard de Reserva de Turnos Online (6 Pasos)
   ========================================================================== */

.booking-body {
  background-color: var(--light-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.booking-page-main {
  padding-top: calc(var(--header-height) + 40px);
  padding-bottom: 80px;
  flex-grow: 1;
}

/* --- TARJETA PRINCIPAL DEL WIZARD --- */
.booking-wizard-card {
  background-color: rgba(223, 221, 221, 0.74);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  padding: 48px;
  max-width: 960px;
  margin: 0 auto;
  position: relative;
}

/* --- STEPPER (INDICADOR DE PROGRESO DE 6 PASOS) --- */
.stepper-header {
  position: relative;
  margin-bottom: 48px;
}

.stepper-progress-track {
  position: absolute;
  top: 20px;
  left: 30px;
  right: 30px;
  height: 4px;
  background-color: var(--cream);
  z-index: 1;
  border-radius: var(--radius-full);
}

.stepper-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-full);
  transition: width var(--transition-normal);
}

.stepper-steps-list {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.step-circle {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background-color: var(--white);
  border: 2px solid var(--border-color);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.step-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color var(--transition-normal);
}

.step-item.active .step-circle {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--dark);
  box-shadow: var(--shadow-gold);
  transform: scale(1.1);
}

.step-item.active .step-label {
  color: var(--primary-dark);
  font-weight: 700;
}

.step-item.completed .step-circle {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--white);
}

.step-item.completed .step-label {
  color: var(--text-main);
}

/* --- CONTENIDO DE CADA PASO --- */
.wizard-step-content {
  display: none;
  animation: fadeInStep 0.4s ease;
}

.wizard-step-content.active {
  display: block;
}

.step-instruction {
  text-align: center;
  margin-bottom: 36px;
}

.step-instruction h2 {
  font-size: 2rem;
  margin-top: 6px;
  margin-bottom: 8px;
}

.step-instruction p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* --- PASO 1: SERVICIOS GRID EN RESERVAS --- */
.booking-services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.booking-service-card {
  background-color: var(--light-bg);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.booking-service-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.booking-service-card.selected {
  color: green;
  border-color: var(--primary-dark);
  background-color: rgb(155, 190, 155);
  box-shadow: var(--shadow-gold);
}

.book-srv-img-wrap {
  height: 140px;
  position: relative;
  overflow: hidden;
}

.book-srv-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-srv-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: rgba(250, 249, 252, 0.692);
  color: var(--white);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
}

.book-srv-body {
  background-color: rgba(250, 249, 252, 0.692);
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.book-srv-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.book-srv-header h4 {
  font-size: 1.15rem;
}

.book-srv-price {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.book-srv-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  flex-grow: 1;
}

.book-srv-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.book-srv-duration {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.book-srv-select-btn {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-dark);
}

/* --- PASO 2: CALENDARIO WIDGET --- */
.calendar-widget {
  max-width: 420px;
  /* Ligeramente más compacto para mejor proporción */
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  font-family: system-ui, -apple-system, sans-serif;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  /* Se eliminó el background rojo translúcido */
}

.calendar-month-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
  text-transform: capitalize;
}

.cal-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cal-nav-btn:hover:not(:disabled) {
  background-color: #e2e8f0;
  color: #0f172a;
}

.cal-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 12px;
}

.calendar-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.calendar-day-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
  user-select: none;
}

.calendar-day-cell.empty {
  visibility: hidden;
}

/* Días pasados o cerrados (No disponibles) */
.calendar-day-cell.past,
.calendar-day-cell.closed {
  color: #94a3b8;
  background-color: #f1f5f9;
  cursor: not-allowed;
}

/* Días disponibles */
.calendar-day-cell.available {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  color: #1e293b;
  cursor: pointer;
}

.calendar-day-cell.available:hover {
  background-color: #eff6ff;
  /* Azul muy claro */
  border-color: #bfdbfe;
  color: #1d4ed8;
}

/* Día Seleccionado */
.calendar-day-cell.selected {
  background-color: #2563eb;
  /* Azul primario */
  border-color: #2563eb;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

/* Leyenda */
.calendar-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
  font-size: 0.85rem;
  color: #64748b;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-dot.available {
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
}

.legend-dot.selected {
  background-color: #2563eb;
}

.legend-dot.unavailable {
  background-color: #f1f5f9;
  border: 1px solid #e2e8f0;
}

/* --- PASO 3: SLOTS HORARIOS --- */
.slots-container-card {
  max-width: 680px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.589);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px;
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 14px;
}

.time-slot-pill {
  padding: 14px 10px;
  border-radius: var(--radius-md);
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.time-slot-pill.available {
  background-color: var(--white);
  border-color: var(--border-color);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.time-slot-pill.available:hover {
  border-color: var(--primary);
  background-color: var(--primary-light);
  color: var(--primary-dark);
  transform: translateY(-2px);
}

.time-slot-pill.selected {
  background-color: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
  color: var(--white) !important;
  box-shadow: var(--shadow-gold);
}

.time-slot-pill.occupied {
  background-color: var(--cream);
  border-color: transparent;
  color: var(--text-light);
  cursor: not-allowed;
  opacity: 0.55;
  text-decoration: line-through;
}

/* --- PASO 4: FORMULARIO CLIENTE --- */
.client-form-card {
  max-width: 640px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.527);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px;
}

/* --- PASO 5: RESUMEN DEL TURNO (TICKET) --- */
.summary-ticket-card {
  max-width: 640px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.781);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.ticket-header {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-surface) 100%);
  color: var(--white);
  padding: 24px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ticket-brand-name {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  display: block;
}

.ticket-tag {
  font-size: 0.75rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ticket-badge {
  background-color: var(--primary);
  color: var(--dark);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.ticket-body {
  padding: 30px;
}

.ticket-row-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px dashed var(--border-color);
}

.ticket-srv-tag {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  background: var(--primary-soft);
  color: var(--primary-dark);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-bottom: 4px;
  font-weight: 700;
}

.ticket-service-badge h3 {
  font-size: 1.4rem;
  margin-bottom: 4px;
}

.ticket-service-badge p {
  color: var(--text-muted);
  font-size: 0.88rem;
  max-width: 340px;
}

.ticket-price-box {
  text-align: right;
}

.ticket-price-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  display: block;
}

.ticket-price-val {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.ticket-grid-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.ticket-meta-block {
  background: var(--light-bg);
  padding: 12px 16px;
  border-radius: var(--radius-md);
}

.ticket-meta-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.ticket-meta-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.ticket-notes-box {
  margin-top: 20px;
  background: var(--cream);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
}

.ticket-notice {
  background: var(--nude-rose);
  padding: 16px 30px;
  border-top: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* --- PASO 6: CONFIRMACIÓN --- */
.confirmation-box {
  text-align: center;
  max-width: 620px;
  margin: 0 auto;
}

.confirmation-icon-circle {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background-color: var(--success);
  color: var(--white);
  font-size: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px auto;
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.35);
}

.confirmation-title {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.confirmation-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 30px;
}

.confirmation-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 30px;
  text-align: left;
  box-shadow: var(--shadow-sm);
  margin-bottom: 36px;
}

.conf-id-row {
  display: flex;
  justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 1rem;
}

.conf-id-row strong {
  color: var(--primary-dark);
  font-size: 1.15rem;
}

.conf-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.conf-details-grid span {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.conf-details-grid strong {
  font-size: 0.95rem;
  color: var(--text-main);
}

.confirmation-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* --- FOOTER DEL WIZARD (BOTONES ATRÁS/SIGUIENTE) --- */
.wizard-footer-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

/* --- RESPONSIVE RESERVAS --- */
@media (max-width: 768px) {
  .booking-wizard-card {
    background-color: aliceblue;
    padding: 24px 18px;
  }

  .step-label {
    display: none;
  }

  .step-circle {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }

  .stepper-progress-track {
    top: 18px;
  }

  .ticket-grid-meta,
  .conf-details-grid {
    grid-template-columns: 1fr;
  }

  .ticket-row-main {
    flex-direction: column;
    gap: 12px;
  }

  .ticket-price-box {
    text-align: left;
  }
}