/* ==========================================================================
   RESERVA DE MESA
   Info a la izquierda (horarios, grupos, política) y la tarjeta con los
   pasos a la derecha. En celular, una debajo de la otra.
   ========================================================================== */

.reservas { background-color: var(--papel-2); background-image: var(--grano); }
.reservas__grid { display: grid; gap: 32px; }
.reservas__grid > * { min-width: 0; } /* la tira de días no tiene que estirar la grilla */
.reservas__info .section-head { margin-bottom: 22px; }

.reservas__puntos { display: grid; gap: 12px; }
.reservas__puntos li { display: flex; gap: 12px; color: var(--muted); }
.reservas__puntos svg { margin-top: 4px; color: var(--accent); font-size: 1.1rem; }
.reservas__puntos strong { color: var(--text); }
.reservas__puntos a { color: var(--accent); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Tarjeta ---------- */
.reserva {
  position: relative;
  padding: 22px 18px 24px; border-radius: 22px;
  background: var(--crema); box-shadow: var(--shadow);
  border-top: 6px solid var(--ladrillo);
  scroll-margin-top: calc(var(--header-h) + 12px);
}

/* Progreso: 1 Día · 2 Turno · … */
.reserva__progreso {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px;
  margin-bottom: 18px; counter-reset: paso;
}
.reserva__progreso li {
  display: grid; justify-items: center; gap: 4px;
  font-size: 0.72rem; font-weight: 700; color: var(--muted); text-align: center;
  position: relative;
}
.reserva__progreso li::before {
  content: ""; position: absolute; top: 15px; left: calc(-50% + 18px); right: calc(50% + 18px);
  height: 2px; background: var(--line-strong);
}
.reserva__progreso li:first-child::before { display: none; }
.reserva__progreso li.hecho::before, .reserva__progreso li.actual::before { background: var(--ladrillo); }
.reserva__progreso span {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--line-strong); background: var(--crema); font-size: 0.85rem;
}
.reserva__progreso .actual { color: var(--text); }
.reserva__progreso .actual span { border-color: var(--ladrillo); color: var(--ladrillo); }
.reserva__progreso .hecho span { border-color: var(--ladrillo); background: var(--ladrillo); color: #fff; }

/* Resumen de lo elegido (cada chip vuelve a su paso) */
.reserva__resumen { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.resumen-chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 34px; padding: 0 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 0.88rem;
}
.resumen-chip:hover { background: var(--ladrillo); color: #fff; }

.reserva__titulo { font-family: var(--font-display); font-weight: 700; font-size: 1.55rem; line-height: 1.15; }
.reserva__titulo:focus { outline: none; }
.reserva__ayuda { margin-top: 4px; color: var(--muted); font-size: 0.95rem; }
.reserva__cuerpo > .dias, .reserva__cuerpo > .turnos, .reserva__cuerpo > .horas,
.reserva__cuerpo > .personas, .reserva__cuerpo > form { margin-top: 16px; }

.reserva__volver {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 18px;
  color: var(--muted); font-weight: 700; font-size: 0.95rem;
}
.reserva__volver:hover { color: var(--accent); }

/* Opciones elegibles (días, turnos, horas, personas): base común */
.dia, .turno, .hora, .persona {
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.15s;
}
.dia:hover, .turno:hover, .hora:hover, .persona:hover { border-color: var(--ladrillo); }
.dia:active, .turno:active, .hora:active, .persona:active { transform: scale(0.97); }
.dia.is-elegido, .turno.is-elegido, .hora.is-elegido, .persona.is-elegido { background: var(--ladrillo); border-color: var(--ladrillo); color: #fff; }
.dia[disabled], .turno[disabled], .hora[disabled], .persona[disabled] {
  opacity: 0.45; cursor: not-allowed; background: transparent; border-style: dashed;
}

/* Días: tira que se desliza de costado */
.dias {
  display: grid; grid-auto-flow: column; grid-auto-columns: 74px; gap: 8px;
  overflow-x: auto; padding: 2px 2px 10px; margin-inline: -2px;
  scroll-snap-type: x mandatory; scrollbar-width: thin;
}
.dia { display: grid; justify-items: center; gap: 2px; padding: 10px 4px; scroll-snap-align: start; }
.dia__semana { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.dia__num { font-family: var(--font-display); font-weight: 700; font-size: 1.7rem; line-height: 1; }
.dia__mes { font-size: 0.75rem; color: var(--muted); }
.dia.is-elegido .dia__mes { color: rgba(255, 255, 255, 0.8); }

/* Turnos: dos tarjetas grandes */
.turnos { display: grid; gap: 10px; }
.turno {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; gap: 0 14px;
  padding: 16px; text-align: left; align-items: center;
}
.turno__icono {
  grid-row: span 3; display: grid; place-items: center;
  width: 50px; height: 50px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 1.5rem;
}
.turno.is-elegido .turno__icono { background: rgba(255, 255, 255, 0.18); color: #fff; }
.turno__nombre { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; line-height: 1.1; }
.turno__horas { color: var(--muted); font-size: 0.95rem; }
.turno__estado { font-size: 0.85rem; font-weight: 700; color: var(--ok); }
.turno__estado.pocos { color: var(--warn); }
.turno[disabled] .turno__estado { color: var(--muted); }
.turno.is-elegido .turno__horas, .turno.is-elegido .turno__estado { color: rgba(255, 255, 255, 0.85); }

/* Horas y personas: grilla de botones */
.horas { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.hora { min-height: 50px; font-weight: 700; font-size: 1.05rem; }
.hora[disabled] { text-decoration: line-through; }
.personas { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.persona { aspect-ratio: 1; max-height: 64px; font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; }
.reserva__grupo { margin-top: 16px; color: var(--muted); font-size: 0.95rem; }
.reserva__grupo a { display: inline-flex; align-items: center; gap: 6px; color: var(--whatsapp); font-weight: 700; }

.reserva__ocasion { border: 0; padding: 0; margin: 0; }
.reserva__ocasion legend { margin-bottom: 8px; }
.reserva__ocasion legend span { color: var(--muted); font-weight: 400; }
.reserva__error {
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: rgba(179, 55, 43, 0.1); color: var(--danger); font-weight: 700;
}
.reserva__politica { color: var(--muted); font-size: 0.86rem; text-align: center; }

/* ---------- Reserva hecha ---------- */
.reserva__listo { display: grid; justify-items: center; gap: 12px; text-align: center; }
.reserva__listo > p { color: var(--muted); max-width: 34ch; }
.reserva__listo > p strong { white-space: nowrap; color: var(--text); }
.reserva__listo-icono {
  display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%;
  background: var(--ok); color: #fff; font-size: 2rem;
}
/* Ticket con bordes picados, como una comanda */
.ticket {
  width: 100%; margin: 6px 0; padding: 16px 18px; text-align: left;
  background: var(--papel); border: 1.5px dashed var(--line-strong); border-radius: var(--radius-sm);
}
.ticket div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; }
.ticket div + div { border-top: 1px dotted var(--line-strong); }
.ticket dt { color: var(--muted); }
.ticket dd { font-weight: 700; text-align: right; }
.ticket__codigo dd { font-family: var(--font-display); font-size: 1.2rem; letter-spacing: 0.08em; color: var(--accent); }
.reserva__listo-acciones { display: grid; gap: 10px; width: 100%; }

@media (min-width: 900px) {
  .reservas__grid { grid-template-columns: 0.85fr 1.15fr; gap: 64px; align-items: start; }
  .reservas__info { position: sticky; top: calc(var(--header-h) + 40px); }
  .reserva { padding: 30px 32px 32px; }
  .reserva__progreso { font-size: 0.8rem; }
  /* Con mouse se ven las 3 semanas juntas en vez de deslizar */
  .dias { grid-auto-flow: row; grid-template-columns: repeat(7, 1fr); overflow: visible; padding-bottom: 0; }
  .turnos { grid-template-columns: 1fr 1fr; }
}
