/* Reservas. Sirve para las dos versiones: los colores van con
   los tokens de styles.css y los turnos los arma reservas.js desde
   CR.negocio.franjas (3 en la cafetería, 2 en el restaurante). */
.res-hero { padding: 56px 0 64px; }
.res-hero h1 { margin-top: 14px; font-size: clamp(38px, 5vw, 64px); }
.res-hero .lede { margin-top: 16px; }

.res-main { padding-top: 48px; }
.res-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; align-items: start; }
.res-form { background: var(--surface); border-radius: var(--r-lg); padding: 32px; box-shadow: var(--shadow-sm); display: grid; gap: 28px; }
.res-paso { border: 0; margin: 0; padding: 0; display: grid; gap: 18px; min-width: 0; }
.res-paso + .res-paso { padding-top: 26px; border-top: 1px solid var(--line); }
.res-paso legend { font-family: var(--font-display); font-weight: var(--h-weight); font-size: 22px; display: flex; align-items: center; gap: 12px; padding: 0; margin-bottom: 18px; }
.paso-n { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--oscuro); color: var(--acento); font-size: 15px; }
.res-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.opt { font-weight: 400; color: var(--muted); }
.hint-lg { color: var(--ink-2); margin-top: -8px; }

.stepper { display: grid; grid-template-columns: 48px 1fr 48px; gap: 6px; }
.stepper .input { text-align: center; font-weight: 700; font-size: 18px; -moz-appearance: textfield; }
.stepper .input::-webkit-outer-spin-button, .stepper .input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.step { border: 1.5px solid var(--line); background: var(--fondo); border-radius: 12px; font-size: 22px; font-weight: 700; }
.step:hover { background: var(--fondo-2); }

/* Día cerrado o sin horarios por hoy: se dice y se ofrece el próximo día. */
.res-aviso {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px;
  padding: 10px 12px; border-radius: 12px; background: var(--fondo); border-left: 4px solid var(--rojo);
  font-size: 14.5px; font-weight: 600; line-height: 1.35;
}
.res-aviso-btn {
  min-height: 36px; padding: 6px 14px; border: 0; border-radius: var(--pill);
  background: var(--oscuro); color: var(--surface); font-weight: 700; font-size: 14px;
}
.res-aviso-btn:hover { background: var(--oscuro-3); }
/* Con el aviso a la vista, el error de abajo repetiría lo mismo. */
.field.invalid .res-aviso:not([hidden]) ~ .error { display: none; }

/* Turnos: tantas columnas como franjas tenga la versión. */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; background: var(--fondo); padding: 5px; border-radius: 14px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span { display: grid; place-items: center; align-content: center; gap: 1px; min-height: 52px; border-radius: 10px; font-weight: 700; font-size: 15px; line-height: 1.15; text-align: center; padding: 6px 4px; cursor: pointer; transition: background var(--t), color var(--t); }
.seg small { font-size: 12px; font-weight: 500; color: var(--muted); }
.seg input:checked + span { background: var(--oscuro); color: var(--surface); }
.seg input:checked + span small { color: var(--muted-dark); }
.seg input:focus-visible + span { outline: 3px solid var(--acento); outline-offset: 2px; }
.seg input:disabled + span { opacity: .4; cursor: not-allowed; }

.horas { display: flex; flex-wrap: wrap; gap: 8px; }
.horas label { position: relative; }
.horas input { position: absolute; opacity: 0; inset: 0; }
.horas span { display: inline-grid; place-items: center; min-width: 76px; min-height: 42px; padding: 0 12px; border-radius: var(--pill); border: 1.5px solid var(--line); font-weight: 600; cursor: pointer; transition: all var(--t); }
.horas span:hover { border-color: var(--oscuro); }
.horas input:checked + span { background: var(--acento); border-color: var(--acento); color: var(--acento-ink); }
.horas input:focus-visible + span { outline: 3px solid var(--oscuro); outline-offset: 2px; }
/* Los de hoy que ya pasaron: se ven, pero no se eligen. */
.horas input:disabled + span { opacity: .45; border-style: dashed; text-decoration: line-through; cursor: not-allowed; }
.horas input:disabled + span:hover { border-color: var(--line); }

.eventos-dia { display: grid; gap: 10px; }
.ev-opt { position: relative; }
.ev-opt input { position: absolute; opacity: 0; inset: 0; }
.ev-opt > span { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; transition: all var(--t); }
.ev-opt input:checked + span { border-color: var(--oscuro); box-shadow: inset 0 0 0 1px var(--oscuro); background: var(--acento-50); }
.ev-opt input:focus-visible + span { outline: 3px solid var(--acento); outline-offset: 2px; }
.ev-opt strong { font-size: 16px; line-height: 1.3; }
.ev-opt small { color: var(--muted); font-weight: 600; white-space: nowrap; }

.btn-lg { min-height: 56px; font-size: 17px; }
.res-legal { font-size: 13px; color: var(--muted); text-align: center; margin-top: -12px; }

.res-side { display: grid; gap: 18px; position: sticky; top: calc(var(--header-h) + 20px); }
.res-resumen { background: var(--oscuro); color: var(--muted-dark); border-radius: var(--r-lg); padding: 26px; }
.res-resumen h2 { color: var(--surface); font-size: 22px; margin-bottom: 14px; }
.res-resumen dl { margin: 0; display: grid; gap: 10px; }
.res-resumen dl div { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line-dark); }
.res-resumen dt { color: var(--muted-dark); }
.res-resumen dd { margin: 0; font-weight: 700; text-align: right; color: var(--surface); }
.res-resumen dd::first-letter { text-transform: uppercase; }
.res-info { background: var(--surface); border-radius: var(--r-lg); padding: 24px 26px; box-shadow: var(--shadow-sm); }
.res-info h3 { font-size: 18px; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.res-info li { font-size: 15px; padding-left: 18px; position: relative; }
.res-info li + li { margin-top: 8px; }
.res-info li::before { content: ""; position: absolute; left: 0; top: .6em; width: 8px; height: 8px; border-radius: 2px; background: var(--acento); }

.res-ok { padding-top: 56px; }
.res-ok:focus { outline: none; }
.ok-card { max-width: 680px; margin: 0 auto; background: var(--surface); border-radius: var(--r-lg); padding: 44px 36px; text-align: center; box-shadow: var(--shadow); display: grid; justify-items: center; gap: 14px; }
.ok-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--acento); color: var(--acento-ink); display: grid; place-items: center; }
.ok-icon svg { width: 34px; height: 34px; }
.ok-codigo { font-size: 18px; }
.ok-codigo strong { font-family: var(--font-display); font-weight: var(--h-weight); font-size: 26px; background: var(--oscuro); color: var(--acento); padding: 2px 12px; border-radius: 8px; margin-left: 6px; }
.ok-next { color: var(--muted); max-width: 52ch; }
.ok-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 12px; }

@media (max-width: 900px) {
  .res-grid { grid-template-columns: 1fr; }
  .res-side { position: static; order: -1; }
  .res-info { display: none; }
}
@media (max-width: 560px) {
  .res-form { padding: 22px 16px; }
  .res-row { grid-template-columns: 1fr; }
  .ok-card { padding: 32px 18px; }
  .ok-ctas .btn { width: 100%; }
}

/* ---------- Celular primero ----------
   El resumen de la derecha repetía lo que se ve en el formulario: en el
   celular se va (la confirmación final lo muestra igual) y el encabezado
   queda en dos renglones. */
@media (max-width: 900px) {
  .res-side { display: none; }
  .res-hero { padding: 22px 0 20px; }
  .res-hero h1 { font-size: 34px; margin-top: 8px; }
  .res-hero .lede { font-size: 15.5px; margin-top: 8px; }
  .res-main { padding-top: 16px; padding-bottom: 24px; }
  .res-form { gap: 20px; }
  .res-paso { gap: 14px; }
  .res-paso + .res-paso { padding-top: 18px; }
  .res-paso legend { font-size: 19px; margin-bottom: 12px; }
  .res-ok { padding-top: 20px; }
}

/* ---------- Mesa o encargue ---------- */
.modo { display: inline-flex; gap: 4px; margin-top: 22px; padding: 4px; border-radius: var(--pill); background: var(--oscuro-2); border: 1px solid var(--line-dark); }
.modo button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 18px; border: 0; border-radius: var(--pill); background: transparent; color: var(--on-dark-2); font-weight: 700; font-size: 15px; transition: background var(--t), color var(--t); }
.modo button:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.modo button[aria-selected="true"] { background: var(--acento); color: var(--acento-ink); }
.modo svg { width: 18px; height: 18px; flex: none; }
@media (max-width: 900px) {
  .modo { margin-top: 14px; display: flex; }
  .modo button { flex: 1 1 0; justify-content: center; padding: 8px 10px; font-size: 14.5px; }
}

/* Productos para encargar: foto, nombre, precio y un contador. */
.enc-prods { display: grid; gap: 10px; }
.enc-prod { display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; align-items: center; padding: 10px; border: 1.5px solid var(--line); border-radius: var(--r); transition: border-color var(--t), background var(--t), box-shadow var(--t); }
.enc-prod.on { border-color: var(--oscuro); background: var(--acento-50); box-shadow: inset 0 0 0 1px var(--oscuro); }
.enc-prod img, .ep-sinfoto { width: 76px; height: 76px; border-radius: 12px; object-fit: cover; background: var(--fondo-2); }
.ep-info { display: grid; gap: 2px; min-width: 0; }
.ep-info b { font-size: 16px; line-height: 1.25; }
.ep-info small { font-size: 13.5px; color: var(--muted); line-height: 1.35; }
.ep-precio { font-weight: 800; font-size: 15px; margin-top: 2px; }
.ep-step { display: flex; align-items: center; gap: 4px; background: var(--fondo); border-radius: var(--pill); padding: 3px; }
.ep-step button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--surface); font-size: 20px; font-weight: 700; line-height: 1; box-shadow: var(--shadow-sm); transition: transform var(--t), background var(--t); }
.ep-step button:hover { background: var(--acento-2); }
.ep-step button:active { transform: scale(.92); }
.ep-step button:disabled { opacity: .35; box-shadow: none; cursor: default; }
.ep-step output { min-width: 22px; text-align: center; font-weight: 800; font-size: 16px; }
.enc-err { color: var(--rojo); font-weight: 700; font-size: 14px; }
@media (max-width: 560px) {
  .enc-prod { grid-template-columns: 64px 1fr; gap: 6px 12px; }
  .enc-prod img, .ep-sinfoto { width: 64px; height: 64px; grid-row: span 2; }
  .ep-step { justify-self: start; }
}

.enc-resumen { display: grid; gap: 8px; margin-bottom: 14px; font-size: 14.5px; }
.enc-resumen li { display: flex; justify-content: space-between; gap: 12px; color: var(--on-dark-2); }
.enc-resumen b { color: #fff; white-space: nowrap; }
.enc-resumen-vacio { color: var(--muted-dark) !important; }
.res-resumen .enc-total { border-bottom: 0; }
.res-resumen .enc-total dd { font-size: 20px; color: var(--acento); }

/* ---------- Así le llega al local ----------
   Una notificación de celular, debajo de la confirmación. */
.aviso-dueno { width: 100%; max-width: 440px; margin-top: 18px; padding-top: 20px; border-top: 1px dashed var(--line); display: grid; gap: 10px; text-align: left; }
.aviso-dueno:empty { display: none; }
.ad-tit { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-align: center; }
.ad-noti { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; padding: 14px; border-radius: 20px; background: var(--oscuro); color: var(--on-dark-2); box-shadow: var(--shadow); animation: noti-in 500ms 300ms cubic-bezier(.2, .8, .2, 1) both; }
@keyframes noti-in { from { opacity: 0; transform: translateY(-10px) scale(.98); } to { opacity: 1; transform: none; } }
.ad-app { width: 40px; height: 40px; border-radius: 11px; background: var(--acento); color: var(--acento-ink); display: grid; place-items: center; }
.ad-app svg { width: 22px; height: 22px; }
.ad-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.ad-top b { color: #fff; font-size: 15px; }
.ad-top span { font-size: 12px; color: var(--on-dark-4); }
.ad-body p { font-size: 14px; line-height: 1.45; margin-top: 2px; }
.ad-nota { font-size: 12.5px; color: var(--muted); text-align: center; }
