/**
 * reservas.css - Estilos del wizard de reservas
 * Colores sincronizados con variables CSS del tema (--accent-color: #e07844)
 */

/* ===== RESET: Neutralizar estilos legacy de .book-a-table en main.css ===== */
.book-a-table .reservation-wizard .form-control,
.book-a-table .reservation-wizard .form-select {
  padding: 0.6rem 0.9rem;
  font-size: 0.95rem;
  border: 1px solid #ced4da;
  border-radius: 6px;
  background: #fff;
  color: var(--default-color, #352a26);
}

.book-a-table .reservation-wizard .form-control:focus,
.book-a-table .reservation-wizard .form-select:focus {
  border-color: var(--accent-color, #e07844);
  box-shadow: 0 0 0 0.2rem rgba(224, 120, 68, 0.18);
  background: #fff;
}

/* ===== WIZARD CONTAINER ===== */
.reservation-wizard {
  max-width: 920px;
  margin: 0 auto;
}

/* ===== STEPPER ===== */
.wizard-stepper {
  overflow-x: auto;
  padding: 10px 0;
  -webkit-overflow-scrolling: touch;
}

.stepper-track {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-width: 480px;
}

.stepper-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.step-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #e9ecef;
  color: #6c757d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.3s ease;
  border: 2px solid #dee2e6;
}

.stepper-step.active .step-circle {
  background: var(--accent-color, #e07844);
  color: #fff;
  border-color: var(--accent-color, #e07844);
  transform: scale(1.1);
  box-shadow: 0 4px 14px rgba(224, 120, 68, 0.35);
}

.stepper-step.completed .step-circle {
  background: #198754;
  color: #fff;
  border-color: #198754;
}

.stepper-step.completed .step-circle::after {
  content: '\2713';
  font-size: 1.1rem;
}

.step-label {
  font-size: 0.75rem;
  color: #6c757d;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
}

.stepper-step.active .step-label {
  color: var(--accent-color, #e07844);
  font-weight: 700;
}

.stepper-step.completed .step-label {
  color: #198754;
}

.stepper-line {
  height: 3px;
  flex: 1;
  background: #dee2e6;
  margin: 0 8px;
  margin-bottom: 22px;
  min-width: 30px;
  border-radius: 2px;
  transition: background 0.3s;
}

.stepper-step.completed + .stepper-line,
.stepper-step.completed ~ .stepper-line {
  background: #198754;
}

/* ===== WIZARD STEPS ===== */
.wizard-step {
  display: none;
  animation: wizardFadeIn 0.35s ease;
}

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

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

.wizard-card {
  background: var(--surface-color, #ffffff);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
  border: 1px solid color-mix(in srgb, var(--default-color, #352a26), transparent 90%);
}

.wizard-title {
  font-size: 1.3rem;
  margin-bottom: 20px;
  color: var(--heading-color, #291812);
  font-family: var(--heading-font, 'Roboto Slab', serif);
}

.wizard-title i {
  color: var(--accent-color, #e07844);
  margin-right: 6px;
}

.wizard-title .badge {
  font-size: 0.7rem;
  vertical-align: middle;
}

/* ===== WIZARD NAV ===== */
.wizard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wizard-nav .btn-primary {
  background: var(--accent-color, #e07844);
  border-color: var(--accent-color, #e07844);
  padding: 10px 32px;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s;
}

.wizard-nav .btn-primary:hover {
  background: color-mix(in srgb, var(--accent-color, #e07844), black 15%);
  border-color: color-mix(in srgb, var(--accent-color, #e07844), black 15%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(224, 120, 68, 0.3);
}

.wizard-nav .btn-outline-secondary {
  border-radius: 8px;
  padding: 10px 24px;
  font-weight: 500;
}

.wizard-nav .btn-success {
  padding: 12px 40px;
  font-weight: 700;
  border-radius: 8px;
  font-size: 1.1rem;
  transition: all 0.3s;
}

.wizard-nav .btn-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(25, 135, 84, 0.35);
}

/* ===== CALENDARIO ===== */
.calendar-widget {
  background: color-mix(in srgb, var(--surface-color, #fff), var(--background-color, #f8efeb) 30%);
  border-radius: 14px;
  padding: 20px;
  border: 1px solid color-mix(in srgb, var(--default-color, #352a26), transparent 90%);
}

.cal-header h5 {
  font-family: var(--heading-font, 'Roboto Slab', serif);
  color: var(--heading-color, #291812);
  font-size: 1.1rem;
}

.cal-header .btn {
  border-color: color-mix(in srgb, var(--default-color, #352a26), transparent 75%);
  color: var(--default-color, #352a26);
}

.cal-header .btn:hover {
  background: var(--accent-color, #e07844);
  border-color: var(--accent-color, #e07844);
  color: #fff;
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--accent-color, #e07844);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: default;
  transition: all 0.2s;
  position: relative;
  color: var(--default-color, #352a26);
}

.cal-day.empty {
  visibility: hidden;
}

.cal-day.disponible {
  background: #d4edda;
  color: #155724;
  cursor: pointer;
  font-weight: 600;
}

.cal-day.disponible:hover {
  background: #198754;
  color: #fff;
  transform: scale(1.08);
  box-shadow: 0 2px 8px rgba(25, 135, 84, 0.3);
}

.cal-day.parcial {
  background: #fff3cd;
  color: #856404;
  cursor: pointer;
  font-weight: 600;
}

.cal-day.parcial:hover {
  background: #ffc107;
  color: #000;
  transform: scale(1.08);
}

.cal-day.lleno {
  background: #f8d7da;
  color: #842029;
}

.cal-day.cerrado,
.cal-day.pasado {
  background: color-mix(in srgb, var(--default-color, #352a26), transparent 92%);
  color: color-mix(in srgb, var(--default-color, #352a26), transparent 65%);
}

.cal-day.selected {
  background: var(--accent-color, #e07844) !important;
  color: #fff !important;
  transform: scale(1.12);
  box-shadow: 0 3px 12px rgba(224, 120, 68, 0.4);
  font-weight: 700;
}

/* Calendar legend */
.cal-legend {
  display: flex;
  gap: 16px;
  justify-content: center;
  font-size: 0.75rem;
  color: color-mix(in srgb, var(--default-color, #352a26), transparent 30%);
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}

.legend-dot.disponible { background: #d4edda; border: 1px solid #c3e6cb; }
.legend-dot.parcial    { background: #fff3cd; border: 1px solid #ffeeba; }
.legend-dot.cerrado    { background: #e9ecef; border: 1px solid #dee2e6; }

/* ===== TIME SLOTS ===== */
.time-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding: 2px;
}

.time-slot {
  padding: 8px 16px;
  border: 2px solid color-mix(in srgb, var(--default-color, #352a26), transparent 82%);
  border-radius: 8px;
  background: var(--surface-color, #fff);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--default-color, #352a26);
}

.time-slot.available:hover {
  border-color: var(--accent-color, #e07844);
  color: var(--accent-color, #e07844);
  transform: translateY(-1px);
}

.time-slot.selected {
  background: var(--accent-color, #e07844);
  color: #fff;
  border-color: var(--accent-color, #e07844);
  box-shadow: 0 2px 8px rgba(224, 120, 68, 0.3);
}

.time-slot.disabled {
  background: color-mix(in srgb, var(--default-color, #352a26), transparent 95%);
  color: color-mix(in srgb, var(--default-color, #352a26), transparent 65%);
  cursor: not-allowed;
  border-color: transparent;
}

/* ===== PEOPLE SELECTOR ===== */
.people-selector {
  display: flex;
  align-items: center;
  gap: 16px;
  background: color-mix(in srgb, var(--surface-color, #fff), var(--background-color, #f8efeb) 30%);
  border-radius: 12px;
  padding: 10px 24px;
  width: fit-content;
  border: 1px solid color-mix(in srgb, var(--default-color, #352a26), transparent 88%);
}

.people-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--default-color, #352a26), transparent 78%);
  background: var(--surface-color, #fff);
  color: var(--default-color, #352a26);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.2s;
}

.people-btn:hover {
  background: var(--accent-color, #e07844);
  color: #fff;
  border-color: var(--accent-color, #e07844);
}

.people-count {
  font-size: 1.6rem;
  font-weight: 700;
  min-width: 30px;
  text-align: center;
  color: var(--heading-color, #291812);
}

/* ===== ZONAS ===== */
.zonas-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.zona-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 2px solid color-mix(in srgb, var(--default-color, #352a26), transparent 85%);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
  background: var(--surface-color, #fff);
  color: var(--default-color, #352a26);
}

.zona-option:hover {
  border-color: var(--accent-color, #e07844);
  background: rgba(224, 120, 68, 0.04);
}

.zona-option.selected {
  border-color: var(--accent-color, #e07844);
  background: rgba(224, 120, 68, 0.08);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(224, 120, 68, 0.12);
}

.zona-option.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.zona-cap {
  font-size: 0.75rem;
  color: color-mix(in srgb, var(--default-color, #352a26), transparent 40%);
  margin-left: auto;
}

.zona-price {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-color, #e07844);
  margin-left: 6px;
}

/* ===== MOTIVO SELECT ===== */
.book-a-table .reservation-wizard .form-select#resMotivo {
  border-radius: 8px;
  padding: 10px 14px;
}

/* ===== MENU SELECTION (Paso 2) ===== */
.menu-cat-section {
  margin-bottom: 28px;
}

.menu-cat-title {
  font-family: var(--heading-font, 'Roboto Slab', serif);
  font-size: 1.1rem;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-color, #e07844);
  margin-bottom: 14px;
  color: var(--heading-color, #291812);
}

.menu-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.menu-pick-card {
  display: flex;
  flex-direction: column;
  border: 2px solid color-mix(in srgb, var(--default-color, #352a26), transparent 88%);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-color, #fff);
  transition: all 0.25s;
}

.menu-pick-card:hover {
  border-color: color-mix(in srgb, var(--default-color, #352a26), transparent 70%);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
  transform: translateY(-2px);
}

.menu-pick-card.selected {
  border-color: var(--accent-color, #e07844);
  box-shadow: 0 4px 14px rgba(224, 120, 68, 0.2);
}

.mpc-img {
  height: 110px;
  overflow: hidden;
}

.mpc-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.menu-pick-card:hover .mpc-img img {
  transform: scale(1.05);
}

.mpc-info {
  padding: 10px 12px 4px;
  flex: 1;
}

.mpc-info h6 {
  font-size: 0.85rem;
  margin-bottom: 2px;
  color: var(--heading-color, #291812);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mpc-price {
  font-weight: 700;
  color: var(--accent-color, #e07844);
  font-size: 0.9rem;
}

.mpc-desc {
  font-size: 0.72rem;
  color: color-mix(in srgb, var(--default-color, #352a26), transparent 35%);
  margin-top: 2px;
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mpc-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px;
  background: color-mix(in srgb, var(--background-color, #f8efeb), white 60%);
  border-top: 1px solid color-mix(in srgb, var(--default-color, #352a26), transparent 90%);
}

.mpc-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--default-color, #352a26), transparent 70%);
  background: var(--surface-color, #fff);
  color: var(--default-color, #352a26);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.mpc-btn:hover {
  background: var(--accent-color, #e07844);
  color: #fff;
  border-color: var(--accent-color, #e07844);
}

.mpc-qty {
  font-weight: 700;
  font-size: 1rem;
  min-width: 24px;
  text-align: center;
  color: var(--heading-color, #291812);
}

/* Platos resumen flotante */
.platos-resumen .alert {
  border-radius: 12px;
  font-size: 0.95rem;
}

/* ===== PASO 3: DATOS PERSONALES ===== */
.book-a-table .reservation-wizard .form-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--heading-color, #291812);
  margin-bottom: 4px;
}

/* ===== RESUMEN (Paso 4) ===== */
.resumen-section {
  background: color-mix(in srgb, var(--background-color, #f8efeb), white 50%);
  border-radius: 14px;
  padding: 24px;
  border: 1px solid color-mix(in srgb, var(--default-color, #352a26), transparent 90%);
}

.resumen-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.resumen-item i {
  font-size: 1.3rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.resumen-platos {
  list-style: none;
  padding: 0;
  margin: 0;
}

.resumen-platos li {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--default-color, #352a26), transparent 90%);
  font-size: 0.9rem;
}

.resumen-platos li:last-child {
  border-bottom: none;
}

/* ===== RESULTADO ===== */
.result-success,
.result-error {
  padding: 30px 20px;
}

.result-code {
  background: color-mix(in srgb, var(--accent-color, #e07844), transparent 90%);
  border: 2px solid color-mix(in srgb, var(--accent-color, #e07844), transparent 70%);
  border-radius: 14px;
  padding: 24px;
  margin: 24px auto;
  max-width: 360px;
}

.result-code span {
  font-size: 0.85rem;
  color: color-mix(in srgb, var(--default-color, #352a26), transparent 30%);
}

.result-code h2 {
  color: var(--accent-color, #e07844);
}

/* ===== CONSULTAR RESERVA ===== */
#consultarReserva .form-control {
  border-radius: 8px 0 0 8px;
}

#consultarReserva .btn {
  border-radius: 0 8px 8px 0;
}

#consultaResultado .card {
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--default-color, #352a26), transparent 85%);
}

/* ===== WIZARD ALERT ===== */
.wizard-alert {
  position: relative;
  z-index: 10;
  border-radius: 10px;
  font-size: 0.9rem;
  animation: wizardFadeIn 0.3s ease;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .wizard-card {
    padding: 20px 16px;
  }

  .stepper-track {
    min-width: auto;
    justify-content: space-between;
    gap: 0;
  }

  .step-label {
    font-size: 0.62rem;
    max-width: 60px;
  }

  .step-circle {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }

  .stepper-line {
    min-width: 16px;
  }

  .cal-day {
    font-size: 0.78rem;
  }

  .calendar-widget {
    padding: 14px;
  }

  .menu-items-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .mpc-img {
    height: 85px;
  }

  .mpc-info {
    padding: 8px 10px 2px;
  }

  .mpc-info h6 {
    font-size: 0.78rem;
  }

  .time-slots {
    max-height: 150px;
  }

  .time-slot {
    padding: 6px 12px;
    font-size: 0.82rem;
  }

  .wizard-nav .btn {
    padding: 8px 20px;
    font-size: 0.9rem;
  }

  .wizard-nav .btn-success {
    padding: 10px 28px;
    font-size: 1rem;
  }

  .resumen-section {
    padding: 16px;
  }

  .wizard-title {
    font-size: 1.15rem;
  }
}

@media (max-width: 480px) {
  .reservation-wizard {
    margin: 0 -8px;
  }

  .menu-items-grid {
    grid-template-columns: 1fr;
  }

  .menu-pick-card {
    flex-direction: row;
    align-items: stretch;
  }

  .mpc-img {
    width: 90px;
    height: auto;
    min-height: 90px;
    flex-shrink: 0;
  }

  .mpc-info {
    flex: 1;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .mpc-actions {
    flex-direction: column;
    gap: 4px;
    padding: 6px;
    border-top: none;
    border-left: 1px solid color-mix(in srgb, var(--default-color, #352a26), transparent 90%);
    background: color-mix(in srgb, var(--background-color, #f8efeb), white 60%);
    justify-content: center;
  }

  .mpc-btn {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }

  .mpc-qty {
    font-size: 0.9rem;
  }

  .people-selector {
    width: 100%;
    justify-content: center;
  }

  .zonas-list .zona-option {
    padding: 8px 12px;
    font-size: 0.85rem;
  }
}
