/* Reserva, gestión de cita y lista de espera (la cuenta añade account.css). Tokens de marca; objetivos táctiles ≥ 44 px.
   Regla de oro: en cualquier pantalla, lo que hay que elegir y el botón para seguir están a la vista. */

/* ---------- Banda de título (compacta: el protagonista es el formulario) ---------- */
.app-hero .page-hero-in { padding: 78px clamp(24px, 6vw, 48px) 52px; }
.app-hero h1 { margin: 0; }
@media (min-width: 62rem) {
  .app-hero .page-hero-in { display: grid; grid-template-columns: auto 1fr; column-gap: 28px; align-items: baseline; padding-bottom: 50px; }
  .app-hero .label { grid-column: 1 / -1; margin-bottom: 6px; }
  .app-hero h1 { font-size: 2.25rem; }
}
@media (max-width: 61.99rem) {
  /* En el teléfono el título ya lo dice cada paso: la banda queda como fondo de la cabecera */
  .app-hero .label, .app-hero .lead { display: none; }
  .app-hero .page-hero-in { padding: 68px 24px 34px; }
  .app-hero h1 { font-size: 1.375rem; }
  .app-hero::after { display: none; }
}

/* ---------- Contenedor ---------- */
.booking { position: relative; z-index: 2; margin-top: -30px; padding: 0 var(--gutter) 72px; }
.booking-in { max-width: 68rem; margin: 0 auto; }
#app { display: grid; gap: 12px; align-items: start; grid-template-columns: minmax(0, 1fr); }
#app:not([data-page="book"]) { max-width: 42rem; margin-inline: auto; width: 100%; }
@media (min-width: 62rem) {
  #app[data-page="book"] { grid-template-columns: minmax(0, 1fr) 17.5rem; gap: 20px; }
  #app[data-page="book"][data-step="5"] { grid-template-columns: minmax(0, 42rem); justify-content: center; }
}
@media (max-width: 61.99rem) { .booking { margin-top: -18px; padding-inline: 10px; } }

/* ---------- Tarjeta de cada paso ---------- */
.panel { --pp: clamp(18px, 3.5vw, 30px); min-width: 0; padding: var(--pp); margin: 0; background: var(--surface); border-radius: var(--r-lg) var(--r-lg) var(--r-sm) var(--r-lg);
  box-shadow: 0 26px 60px -34px rgba(74,36,51,.55), 0 0 0 1px rgba(166,124,61,.3); }
.panel h3 { font: 500 1.25rem/1.2 var(--font-display); font-variant-numeric: lining-nums; color: var(--brand); margin: 18px 0 6px; }
.panel > h2 { font-size: 1.6rem; margin-bottom: 12px; }
.step-head { margin-bottom: 12px; }
.step-head .label { margin-bottom: 6px; }
.step-head h2 { font-size: clamp(1.4rem, 3.4vw, 1.75rem); line-height: 1.1; }
.dots { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 10px; }
.dots li { width: 28px; height: 3px; border-radius: 2px; background: var(--line); }
.dots li.on { background: var(--brand); }
@media (max-width: 61.99rem) {
  .step-head { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 12px; }
  .step-head .label { margin: 0; } .step-head .dots { margin: 0; }
  .step-head h2 { grid-column: 1 / -1; margin-top: 8px; }
}

/* ---------- Resumen: columna fija en escritorio, una línea en el teléfono ---------- */
.recap { order: -1; min-width: 0; background: var(--surface); border-radius: var(--r-lg); padding: 14px 18px; box-shadow: 0 0 0 1px rgba(166,124,61,.3); }
.recap .label { margin: 0 0 8px; }
.recap-l { margin: 0; display: grid; gap: 6px; }
.recap-l dt { font-size: .6875rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); }
.recap-l dd { margin: 0; font: 500 1.0625rem/1.25 var(--font-display); font-variant-numeric: lining-nums; color: var(--brand); }
.recap-line { display: none; margin: 0; font: 500 1rem/1.3 var(--font-display); font-variant-numeric: lining-nums; color: var(--brand); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recap-p { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-weight: 500; }
.recap-d { font-weight: 400; color: var(--ink-muted); font-size: .875rem; }
@media (min-width: 62rem) { .recap { order: 0; position: sticky; top: 84px; } }
@media (max-width: 61.99rem) {
  .recap { padding: 10px 16px; border-radius: 18px; }
  .recap.is-empty { display: none; }
  .recap .label, .recap-l { display: none; }
  .recap-line { display: block; }
  .recap-p { margin-top: 2px; padding-top: 0; border: 0; font-size: .9375rem; }
}

/* ---------- Barra de acciones: siempre visible al pie de la pantalla ---------- */
.actions { position: sticky; bottom: 0; z-index: 6; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  margin: 16px calc(-1 * var(--pp)) calc(-1 * var(--pp)); padding: 12px var(--pp) calc(12px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 94%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); border-radius: 0 0 var(--r-sm) var(--r-lg); }
.actions .btn { flex: 1 1 auto; text-align: center; }
.actions .btn-quiet { flex: 0 1 auto; }
.actions.inline { position: static; margin: 0 0 12px; padding: 0; background: none; border: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn[aria-busy="true"] { opacity: .7; }

/* ---------- Paso 1: servicios ---------- */
.choices, .checks { border: 0; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.choices legend, .checks legend { font: 500 .75rem/1.2 var(--font-body); text-transform: uppercase; letter-spacing: .16em; color: var(--label); padding: 0; margin-bottom: 10px; }
@media (min-width: 40rem) { #app[data-page="book"] .choices { grid-template-columns: repeat(2, minmax(0, 1fr)); } #app[data-page="book"] .choices legend { grid-column: 1 / -1; } }
.choice { text-align: left; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; display: grid; gap: 2px; cursor: pointer; font: inherit; transition: border-color .15s, background .15s; }
.choice.on { border-color: var(--brand); background: var(--flower); box-shadow: inset 0 0 0 1px var(--brand); }
.choice-t { font: 500 1.25rem/1.15 var(--font-display); font-variant-numeric: lining-nums; color: var(--brand); }
.choice-d { color: var(--ink); font-size: .9375rem; }
.choice-m { color: var(--ink-muted); font-size: .875rem; }
.choice.on .choice-t, .choice.on .choice-m { color: var(--ink); }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 10px 2px; min-height: 48px; cursor: pointer; }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--brand); flex: none; }

/* ---------- Paso 2: zonas ---------- */
.zone-q { margin-bottom: 4px; }
.zones { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 8px; margin: 0 0 8px; }
.zone { text-align: left; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; min-height: 52px; display: grid; gap: 2px; cursor: pointer; font: inherit; transition: border-color .2s, background .2s, transform .15s; }
.zone:active { transform: scale(.98); }
.zone-t { font: 500 1.125rem/1.15 var(--font-display); font-variant-numeric: lining-nums; color: var(--brand); }
.zone-m { font-size: .8125rem; color: var(--ink-muted); }
.zone.on { background: var(--flower); border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.zone.on .zone-t, .zone.on .zone-m { color: var(--ink); }

/* ---------- Paso 3: calendario y horas (lado a lado cuando hay sitio) ---------- */
.when { display: grid; gap: 14px; align-items: start; }
@media (min-width: 46rem) { .when { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); } }
.cal { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 14px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cal-title { font: 500 1.3rem/1.1 var(--font-display); font-variant-numeric: lining-nums; color: var(--brand); margin: 0; }
.cal-nav { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border-strong); background: transparent; color: var(--brand); font-size: 1.5rem; line-height: 1; cursor: pointer; transition: background .2s, border-color .2s; }
.cal-nav[disabled] { opacity: .35; cursor: not-allowed; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { text-align: center; font: 500 .75rem/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); padding: 2px 0 6px; }
.cal-day { position: relative; height: 40px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--ink-muted); font: 500 1rem var(--font-body); cursor: default; display: grid; place-items: center; transition: background .2s, transform .15s, border-color .2s; }
.cal-day[disabled] { opacity: .38; }
.cal-day.has { color: var(--ink); cursor: pointer; }
.cal-day.has::after { content: ""; position: absolute; bottom: 5px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--gold); }
.cal-day.has:active { transform: scale(.94); }
.cal-day.today { border-color: var(--border-strong); }
.cal-day.on { background: var(--brand); color: var(--on-brand); border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 28%, transparent); }
.cal-day.on::after { background: var(--on-brand); }
.cal-legend { margin: 8px 2px 0; font-size: .8125rem; }
.times-in { scroll-margin-top: 92px; animation: unfold .45s cubic-bezier(.2,.7,.2,1) both; transform-origin: top; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; }
.times-in h3 { font: 500 1.125rem/1.2 var(--font-display); font-variant-numeric: lining-nums; color: var(--brand); margin: 0 0 10px; }
.seg { display: inline-grid; grid-template-columns: 1fr 1fr; padding: 4px; margin-bottom: 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.seg-b { min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-muted); font: 500 .9375rem var(--font-body); cursor: pointer; transition: background .25s, color .25s; }
.seg-b.on { background: var(--brand); color: var(--on-brand); box-shadow: 0 0 0 1px var(--gold); }
.seg-b[disabled] { opacity: .4; cursor: not-allowed; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; max-height: 17rem; overflow-y: auto; padding: 2px; }
.chip { flex: 1 1 7rem; min-height: 44px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink); font: 500 1rem var(--font-body); cursor: pointer; transition: transform .15s, background .15s; }
.chip:active { transform: scale(.96); }
.chip.on { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.slots { display: grid; gap: 18px; }
.slot-day h3 { margin: 0 0 8px; }
@keyframes unfold { from { opacity: 0; transform: translateY(-8px) scaleY(.96); } }
@media (prefers-reduced-motion: reduce) { .times-in { animation: none; } }
@media (max-width: 45.99rem) { .cal-title { font-size: 1.2rem; } }

/* ---------- Formularios, avisos y resúmenes ---------- */
.field { margin: 0 0 16px; }
.field label { display: block; font-weight: 500; margin-bottom: 6px; }
.input { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: var(--r-md); border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--ink); font: inherit; }
.input:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.hint { color: var(--ink-muted); font-size: .875rem; margin: 6px 0 0; }
.note { color: var(--ink-muted); margin: 0 0 10px; }
.meta { margin: 0 0 8px; }
.alert { border-radius: var(--r-md); padding: 12px 16px; margin: 12px 0; }
.alert.warn { background: var(--flower); color: var(--ink); }
.alert.ok { background: var(--sage); color: var(--ink); }
.sum { margin: 0 0 16px; }
.sum > div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px dotted var(--border-strong); }
.sum dt { color: var(--ink); } .sum dd { margin: 0; font-variant-numeric: tabular-nums; }
.sum .strong dt, .sum .strong dd { font-weight: 500; }
.sub { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 20px; }
.sub h3 { font: 500 1.4rem/1.2 var(--font-display); font-variant-numeric: lining-nums; color: var(--brand); margin: 0 0 8px; }
.health { margin: 8px 0 0 34px; }
.plain { list-style: none; margin: 0 0 16px; padding: 0; }
.plain li { padding: 10px 0; border-bottom: 1px dotted var(--border-strong); display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: space-between; }

/* ---------- Pasar el cursor: solo en dispositivos que lo tienen (en iPhone no hay doble toque) ---------- */
@media (hover: hover) {
  .choice:hover { border-color: var(--border-strong); }
  .zone:hover, .chip:hover, .cal-day.has:hover { border-color: var(--gold); }
  .cal-day.has:hover { background: var(--flower); }
  .cal-nav:hover:not([disabled]) { background: var(--flower); border-color: var(--gold); }
}

/* ---------- Modo oscuro: capas y bordes que se distinguen del fondo ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .panel { background: #271D22; box-shadow: 0 26px 60px -30px rgba(0,0,0,.7), 0 0 0 1px rgba(201,161,90,.4); }
  :root:not([data-theme="light"]) .recap { background: #271D22; box-shadow: 0 0 0 1px rgba(201,161,90,.4); }
  :root:not([data-theme="light"]) .actions { background: color-mix(in srgb, #271D22 94%, transparent); border-color: #3A2E34; }
  :root:not([data-theme="light"]) .choice, :root:not([data-theme="light"]) .zone, :root:not([data-theme="light"]) .cal, :root:not([data-theme="light"]) .times-in { background: #33262C; border-color: #6B5A61; }
  :root:not([data-theme="light"]) .input, :root:not([data-theme="light"]) .chip { background: #33262C; border-color: #8F7E85; }
  :root:not([data-theme="light"]) .seg { background: #271D22; border-color: #6B5A61; }
  :root:not([data-theme="light"]) .choice.on, :root:not([data-theme="light"]) .zone.on { background: #5A3443; border-color: var(--gold-bright); box-shadow: inset 0 0 0 1px var(--gold-bright), 0 0 18px rgba(201,161,90,.2); }
  :root:not([data-theme="light"]) .cal-day.on, :root:not([data-theme="light"]) .seg-b.on, :root:not([data-theme="light"]) .chip.on { border-color: var(--gold-bright); box-shadow: 0 0 0 3px rgba(201,161,90,.25); }
  :root:not([data-theme="light"]) .chip.on { background: var(--brand); }
  :root:not([data-theme="light"]) .cal-day.has::after { background: var(--gold-bright); }
  :root:not([data-theme="light"]) .btn[disabled] { opacity: .6; }
}
:root[data-theme="dark"] .panel { background: #271D22; box-shadow: 0 0 0 1px rgba(201,161,90,.4); }
:root[data-theme="dark"] .choice, :root[data-theme="dark"] .zone, :root[data-theme="dark"] .cal, :root[data-theme="dark"] .times-in, :root[data-theme="dark"] .input, :root[data-theme="dark"] .chip { background: #33262C; border-color: #6B5A61; }
:root[data-theme="dark"] .choice.on, :root[data-theme="dark"] .zone.on { background: #5A3443; border-color: var(--gold-bright); }

/* Botón pequeño (gestión de cita y cuenta) */
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: .875rem; }
