/* =========================================================================
   HOSPEDAJE APPLE HOUSE — Estilos del Wizard de Reservación
   ========================================================================= */

/* ── Overlay / modal ──────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(20, 17, 14, 0.65);
  display: none;
  align-items: center; justify-content: center;
  z-index: 100;
  padding: 16px;
  overflow-y: auto;
}
.modal-overlay.open { display: flex; }

.wizard-box {
  background: var(--cream-soft);
  border-radius: 10px;
  max-width: 600px;
  width: 100%;
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
  max-height: 96vh;
  overflow-y: auto;
}

/* ── Botón cerrar ──────────────────────────────────────────────────────────── */
.modal-close-x {
  position: absolute;
  top: 14px; right: 16px;
  background: none; border: none;
  font-size: 1.2rem;
  color: var(--stone);
  cursor: pointer;
  z-index: 10;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.15s;
}
.modal-close-x:hover { background: var(--stone-light); }

/* ── Barra de progreso ────────────────────────────────────────────────────── */
.wizard-progress {
  display: flex;
  align-items: center;
  padding: 20px 32px 0;
  gap: 0;
}
.wp-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: none;
}
.wp-step span {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 2px solid var(--stone-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--stone);
  background: var(--cream-soft);
  transition: all 0.25s;
}
.wp-step small {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--stone);
  transition: color 0.25s;
}
.wp-step.active span {
  background: var(--apple-red);
  border-color: var(--apple-red);
  color: #fff;
}
.wp-step.active small { color: var(--apple-red); }
.wp-step.done span {
  background: var(--orchard-green);
  border-color: var(--orchard-green);
  color: #fff;
}
.wp-step.done small { color: var(--orchard-green); }

.wp-divider {
  flex: 1;
  height: 2px;
  background: var(--stone-light);
  margin-bottom: 16px;
}

/* ── Pasos del wizard ─────────────────────────────────────────────────────── */
.wizard-step { display: none; padding: 24px 32px 28px; }
.wizard-step.active { display: block; }

.wizard-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.wizard-head h3 {
  margin: 0;
  font-size: 1.25rem;
}
.wiz-subtitle {
  font-size: 0.88rem;
  color: var(--stone);
  margin: -12px 0 18px;
}

/* ── Formularios ──────────────────────────────────────────────────────────── */
.wiz-form { display: flex; flex-direction: column; gap: 14px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 500px) { .form-row { grid-template-columns: 1fr; } }

.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--charcoal);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-group .req { color: var(--apple-red); }

.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 13px;
  border: 1.5px solid var(--stone-light);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.93rem;
  color: var(--charcoal);
  background: #fff;
  transition: border-color 0.18s;
  width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--apple-red);
}
.form-group textarea { resize: vertical; }

/* ── Errores ──────────────────────────────────────────────────────────────── */
.wiz-error {
  font-size: 0.84rem;
  color: #c0392b;
  background: #fdf0f0;
  border: 1px solid #f5c6c6;
  border-radius: var(--radius);
  padding: 10px 14px;
  display: none;
}
.wiz-error.show { display: block; }

/* ── Habitaciones en el wizard ────────────────────────────────────────────── */
.wiz-rooms {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 4px;
}
.wiz-loading {
  text-align: center;
  color: var(--stone);
  font-size: 0.9rem;
  padding: 32px 0;
}

.wiz-room-card {
  border: 1.5px solid var(--stone-light);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
  display: flex;
  gap: 14px;
  align-items: center;
  background: #fff;
}
.wiz-room-card:hover { border-color: var(--apple-red); background: #fdf8f4; }
.wiz-room-card.selected { border-color: var(--apple-red); background: #fdf3f1; }
.wiz-room-card.no-disponible { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

.wiz-room-thumb {
  width: 76px; height: 62px;
  flex: none;
  border-radius: 4px;
  object-fit: cover;
  background: var(--stone-light);
}

.wiz-room-info { flex: 1; }
.wiz-room-info h4 { margin: 0 0 3px; font-size: 1rem; }
.wiz-room-info p  { margin: 0; font-size: 0.8rem; color: var(--stone); }
.wiz-room-precio  { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: var(--apple-red); text-align: right; flex: none; }
.wiz-room-precio small { display: block; font-size: 0.62rem; font-family: var(--font-body); color: var(--stone); font-weight: 400; }

/* ── Resumen mini ─────────────────────────────────────────────────────────── */
.wiz-resumen-mini {
  background: var(--charcoal);
  color: var(--cream-soft);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 0.83rem;
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}
.wiz-resumen-mini span { opacity: 0.75; }
.wiz-resumen-mini strong { color: var(--gold-glow); }

/* ── Opciones de pago ─────────────────────────────────────────────────────── */
.pago-opciones { display: flex; flex-direction: column; gap: 12px; }

.pago-opcion {
  border: 2px solid var(--stone-light);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
  display: block;
}
.pago-opcion:has(input:checked) {
  border-color: var(--apple-red);
  background: #fdf3f1;
}
.pago-opcion input[type="radio"] { display: none; }

.po-body {
  display: flex;
  align-items: center;
  gap: 16px;
}
.po-icon { font-size: 1.6rem; flex: none; }
.po-body strong { font-size: 0.95rem; display: block; margin-bottom: 2px; }
.po-body p { margin: 0; font-size: 0.8rem; color: var(--stone); }

/* ── Pie del wizard ──────────────────────────────────────────────────────── */
.wizard-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--stone-light);
  gap: 10px;
}
.wizard-footer .btn { min-width: 120px; }

/* ── Confirmación ─────────────────────────────────────────────────────────── */
.confirm-check {
  font-size: 3rem;
  margin-bottom: 12px;
}
.confirm-folio {
  display: inline-block;
  background: var(--charcoal);
  color: var(--gold-glow);
  font-family: var(--font-display);
  font-size: 1.3rem;
  padding: 10px 28px;
  border-radius: var(--radius);
  margin: 12px 0;
}

/* ── Skeleton loader de habitaciones ──────────────────────────────────────── */
.room-skeleton {
  background: linear-gradient(90deg, var(--stone-light) 25%, #e8e3d8 50%, var(--stone-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  min-height: 280px;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Spinner en botón ─────────────────────────────────────────────────────── */
.btn-spinner { margin-left: 6px; }

@media (max-width: 500px) {
  .wizard-progress { padding: 16px 16px 0; }
  .wizard-step { padding: 18px 16px 22px; }
  .wizard-head h3 { font-size: 1.1rem; }
}
