/* Reservar mesa, pedir cita y gestionarlas. Usa las variables de site.css y el color de cada negocio (--brand). */
[hidden] { display: none !important; }

.book-head { padding: clamp(36px, 6vw, 72px) 0 clamp(24px, 4vw, 40px); background: var(--surface); border-bottom: 1px solid var(--line); }
.book-head h1 { margin: 12px 0 0; font-size: clamp(44px, 8vw, 88px); line-height: .95; }
.demo-note { margin: 16px 0 0; max-width: 60ch; font-size: .95rem; color: var(--muted); }

.book { max-width: 680px; padding: 8px 0 64px; }
.book-intro { margin: 0; }
.book-intro + .book-intro { margin-top: 10px; font-size: 15px; color: var(--muted); }
.step { margin: 0; padding: 24px 0; border: 0; border-bottom: 1px solid var(--line); min-width: 0; }
.step legend { float: left; width: 100%; padding: 0; margin: 0 0 14px; font-family: var(--display); font-weight: var(--h-weight); letter-spacing: var(--h-track); text-transform: var(--h-case); font-size: 1.45rem; line-height: 1.15; }
.step legend + * { clear: both; }

.hint { margin: 12px 0 0; color: var(--muted); font-size: .95rem; }
.notice { margin: 20px 0 0; padding: 12px 14px; border: 1px solid var(--ink); border-radius: var(--radius); }
.error { margin: 12px 0 0; color: var(--bad); font-weight: 600; }
.opt { color: var(--muted); font-weight: 400; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
button.btn { background: transparent; }
button.btn.primary { background: var(--brand); }
.btn:disabled { opacity: .5; }
.btn.danger { color: var(--bad); }
.btn.big { width: 100%; padding: 15px 18px; font-size: 1.05rem; }
.row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.link { padding: 0; border: 0; background: none; text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }

/* Botones de elección: personas, zonas y horas */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-width: 48px; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); font-weight: 600; font-variant-numeric: tabular-nums; }
.chip:hover:not(:disabled) { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.chip.who { display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; text-align: left; }
.who img, .who-initial { flex: none; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.who-initial { display: inline-grid; place-items: center; background: var(--surface); color: var(--ink); font-family: var(--display); font-weight: 700; }
.who-text { display: grid; gap: 1px; line-height: 1.2; }
.who-role { font-size: .82rem; font-weight: 500; color: var(--muted); }
.chip.who[aria-pressed="true"] .who-role { color: inherit; opacity: .85; }
.chip.len { display: inline-grid; gap: 2px; min-width: 112px; text-align: left; line-height: 1.2; }
.len-p { font-size: .88rem; font-weight: 500; color: var(--muted); }
.chip.len[aria-pressed="true"] .len-p { color: inherit; opacity: .85; }
.chip.off { color: var(--muted); text-decoration: line-through; background: var(--surface); }
.chip-select { min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }

/* Calendario */
.cal-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.cal-title { margin: 0; font-weight: 700; }
.cal-nav { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); font-size: 1.4rem; line-height: 1; }
.cal-nav:disabled { opacity: .35; }
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-week span { text-align: center; font-size: .8rem; color: var(--muted); padding: 4px 0; }
.day { aspect-ratio: 1; min-height: 40px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); font-weight: 600; font-variant-numeric: tabular-nums; }
.day:hover:not(:disabled) { border-color: var(--ink); }
.day.today { outline: 1px solid var(--ink); outline-offset: -4px; }
.day.off, .day:disabled { color: var(--muted); background: var(--surface); border-color: transparent; text-decoration: line-through; font-weight: 400; }
.day[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); text-decoration: none; }
.cal-grid[aria-busy="true"] .day { opacity: .6; text-decoration: none; }
/* Completo: tachado como los demás, pero se puede tocar para apuntarse a la lista de espera. */
.day.full { border: 1px dashed var(--muted); cursor: pointer; }
.day.full:hover { border-color: var(--ink); color: var(--ink); }

/* Horas */
.first { margin: 0 0 14px; padding: 10px 14px; background: var(--surface); border-radius: var(--radius); }
.first .link { margin-left: 6px; }
.shift + .shift { margin-top: 16px; }
.shift-name { margin: 0 0 8px; font-weight: 600; color: var(--muted); font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; }
.chip.hour { min-width: 72px; }

/* Citas: servicios */
.svc-group + .svc-group { margin-top: 18px; }
.svc-cat { margin: 0 0 8px; font-weight: 600; color: var(--muted); font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; }
.svc-list { display: grid; gap: 8px; }
.svc { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); text-align: left; }
.svc:hover { border-color: var(--ink); }
.svc[aria-pressed="true"] { border-color: var(--brand); outline: 2px solid var(--brand); outline-offset: -2px; }
.svc-name { font-weight: 700; }
.svc-meta { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.svc-desc { grid-column: 1 / -1; color: var(--muted); font-size: .95rem; }

/* Citas: tira de días */
.strip { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.strip-days { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x proximity; padding: 2px; scrollbar-width: thin; }
.strip-days .hint, .strip-days .error { margin: 0; padding: 12px 4px; }
.sday { flex: 0 0 auto; display: grid; justify-items: center; gap: 2px; min-width: 66px; padding: 8px 6px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); scroll-snap-align: start; font-variant-numeric: tabular-nums; }
.sday:hover:not(:disabled) { border-color: var(--ink); }
.sday .w, .sday .m { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.sday .d { font-size: 1.35rem; font-weight: 700; line-height: 1.1; }
.sday .n { margin-top: 2px; font-size: .72rem; font-weight: 600; }
.sday.today { outline: 1px solid var(--ink); outline-offset: -4px; }
.sday.off, .sday:disabled { background: var(--surface); border-color: transparent; color: var(--muted); }
.sday.off .n { font-weight: 400; }
.sday[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.sday[aria-pressed="true"] .w, .sday[aria-pressed="true"] .m { color: inherit; }
.strip-days[aria-busy="true"] .sday { opacity: .6; }

/* Lista de espera */
.wait-offer { margin-top: 20px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); }
.wait-offer p { margin: 0 0 12px; }
.wait-note { margin: 0 0 14px; max-width: 60ch; }
.wait-time { display: grid; gap: 6px; max-width: 320px; font-weight: 600; }
.wait-time select { min-height: 48px; padding: 10px 12px; border: 1px solid #b8b8b8; border-radius: var(--radius); background: #fff; color: #0a0a0a; font-size: 16px; font-weight: 400; }
.wait-q { margin: 18px 0 8px; font-weight: 600; }
/* Citas: un día completo se puede tocar para apuntarse a la lista de espera. */
.sday.full { background: var(--surface); border: 1px dashed var(--line); color: var(--muted); }
.sday.full .n { color: var(--ink); }
.sday.full[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); border-style: solid; }
.sday.full[aria-pressed="true"] .n { color: inherit; }

/* Datos */
.fields { display: grid; gap: 14px; }
.fields label, .notes { display: grid; gap: 6px; font-weight: 600; }
.notes { margin-top: 14px; }
input:not([type="checkbox"]), textarea { width: 100%; padding: 12px; border: 1px solid #b8b8b8; border-radius: var(--radius); background: #fff; color: #0a0a0a; font-size: 16px; }
textarea { resize: vertical; }
.prefs { margin-top: 18px; }
.prefs .label { margin: 0 0 8px; font-weight: 600; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.legal { margin: 16px 0 0; color: var(--muted); font-size: .9rem; }

.send { padding: 24px 0 0; }
.summary { margin: 0 0 14px; font-weight: 700; font-size: 1.1rem; }

/* Reserva hecha y ficha de la reserva */
.done, .ticket { padding: 28px 0 0; }
.done:focus { outline: none; }
.done h2 { margin-bottom: 10px; }
.done .big { font-size: 1.2rem; font-weight: 700; margin: 0 0 12px; }
.code, .facts dd:last-of-type { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; letter-spacing: .06em; }
.keep { margin-top: 20px; font-weight: 600; }
.linkbox { display: flex; gap: 8px; }
.linkbox input { flex: 1; min-width: 0; font-size: 14px; }
.ticket-state { display: inline-block; margin: 0 0 16px; padding: 6px 10px; border: 1px solid var(--ink); border-radius: var(--radius); font-weight: 700; }
.ticket-state[data-estado="confirmed"] { border-color: var(--ok); color: var(--ok); }
.ticket-state[data-estado="cancelled"], .ticket-state[data-estado="rejected"], .ticket-state[data-estado="no_show"] { border-color: var(--bad); color: var(--bad); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.confirm { margin-top: 16px; padding: 14px; border: 1px solid var(--bad); border-radius: var(--radius); }
.confirm p { margin: 0; }

/* Pedir cita: paso a paso o por chat */
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.modes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 22px 0 0; }
.modes-label { font-weight: 600; color: var(--muted); }
.modes .chip { min-height: 42px; padding: 8px 16px; }
.chat { padding: 18px 0 0; }
.chat-log { display: grid; gap: 14px; }
.msg { max-width: 36em; }
.msg p { margin: 0; }
.msg.bot { font-size: 1.05rem; }
.msg.me { justify-self: end; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: flex-end; gap: 6px 12px; text-align: right; }
.msg.me p { padding: 9px 14px; border: 1px solid var(--ink); border-radius: var(--radius); font-weight: 600; }
.msg.me .link { color: var(--muted); font-size: .9rem; font-weight: 500; }
.chat-sum { margin: 8px 0 0; padding-left: 20px; font-weight: 600; }
.chat-sum li + li { margin-top: 2px; }
.chat-ask { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.chat-ask:empty { display: none; }
.chat-ask > .hint:first-child { margin: 0; }
.chat-ask .chip.soonest { border-color: var(--ink); }
.chat-other { margin: 16px 0 0; }
.chat-other .chip.link, .chat-other .link { min-height: 0; padding: 0; border: 0; background: none; }
.chat-form { display: flex; flex-wrap: wrap; gap: 8px; }
.chat-form input { flex: 1 1 220px; width: auto; }
.chat-form .btn { min-height: 48px; }
.chat-ask .legal { margin-top: 12px; }

@media (min-width: 760px) {
    .book-head { padding: 40px 0 28px; }
    .fields { grid-template-columns: 1fr 1fr; }
    .fields label:first-child { grid-column: 1 / -1; }
    .btn.big { width: auto; min-width: 260px; }
}

/* ---- Plano de la sala para elegir zona (public/js/sala-plano.js) ------------------------------- */
.book-plan { margin: 2px 0 10px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #ffffff; }
.book-plan .plano { display: block; width: 100%; height: auto; max-height: 58vh; font-family: var(--display); user-select: none; -webkit-user-select: none; }
.book-plan .plano * { pointer-events: none; }
.book-plan .pl-floor { fill: #ffffff; }
.book-plan .pl-zone rect { pointer-events: auto; cursor: pointer; stroke: none; }
.book-plan .pl-zone.is-sel rect { stroke: var(--brand); stroke-width: 12; }
.book-plan .pl-zone.is-off rect { cursor: default; opacity: .4; }
.book-plan .pl-zone-name { font-weight: 700; text-anchor: middle; fill: rgba(0, 0, 0, .5); }
.book-plan .pl-zone.is-sel .pl-zone-name { fill: var(--ink); }
.book-plan .pl-wall { stroke: var(--ink); stroke-width: 12; stroke-linecap: square; }
.book-plan .pl-gap { stroke: #ffffff; stroke-width: 14; }
.book-plan .pl-door-leaf { stroke: var(--ink); stroke-width: 4; stroke-linecap: round; }
.book-plan .pl-door-arc { fill: none; stroke: #9aa0aa; stroke-width: 2; stroke-dasharray: 6 6; }
.book-plan .pl-glass { stroke: #9ec5f0; stroke-width: 5; }
.book-plan .pl-item rect, .book-plan .pl-item circle { stroke-width: 2; }
.book-plan .pl-bar rect { fill: #2a2c33; stroke: #2a2c33; }
.book-plan .pl-plant circle { fill: #dcebd5; stroke: #3f7d3a; }
.book-plan .pl-column rect { fill: #9aa0aa; stroke: #6b7280; }
.book-plan .pl-furniture rect { fill: #f4f5f7; stroke: #aeb3bc; }
.book-plan .pl-item-name { font-weight: 600; text-anchor: middle; fill: var(--ink); }
.book-plan .pl-bar .pl-item-name { fill: #ffffff; }
.book-plan .pl-combos, .book-plan .tb .ring, .book-plan .tb-tag { display: none; }
.book-plan .tb .chair { fill: #ffffff; stroke: #aeb3bc; stroke-width: 2; }
.book-plan .tb .top { fill: #ffffff; stroke: var(--ink); stroke-width: 3; }
.book-plan .tb-name { font-weight: 700; text-anchor: middle; fill: var(--ink); }

/* Señal al reservar (se paga en la página de MONEI) */
.deposit-note { margin: -4px 0 14px; padding: 12px 14px; border-left: 3px solid var(--brand); background: color-mix(in srgb, var(--brand) 7%, transparent); border-radius: 0 var(--radius) var(--radius) 0; }
.svc-dep { font-size: .88rem; }
