/* Reservar: hereda las fichas de inicio.css (negro mate, plata cepillada, bronce en detalles). */
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.book { max-width: 1400px; margin-inline: auto; padding: clamp(28px, 5vw, 64px) var(--gutter) clamp(56px, 9vw, 120px); }
.book__head { margin-bottom: clamp(24px, 4vw, 48px); }
.book h1 { font-family: var(--display); font-weight: 900; font-stretch: 125%; text-transform: uppercase; font-size: clamp(2rem, 5.4vw, 4.4rem); line-height: 0.95; letter-spacing: 0.02em; color: var(--silver-hi); text-wrap: balance; }
.book__head p { margin-top: 12px; max-width: 46ch; color: var(--silver-mute); }

.book__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(24px, 5vw, 80px); align-items: start; }

/* Pasos */
.steps { border-top: 2px solid var(--silver); }
.step { border-bottom: 1px solid var(--line); }
.step__head { width: 100%; display: grid; grid-template-columns: 44px auto minmax(0, 1fr); align-items: center; gap: 16px; padding: 20px 0; text-align: left; background: transparent; border: 0; cursor: pointer; color: var(--silver); }
.step__head:disabled { cursor: default; }
.step__n { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); font-family: var(--display); font-weight: 800; font-stretch: 115%; font-size: 1.1rem; color: var(--silver-mute); transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease); }
.step__n svg { width: 20px; height: 20px; }
.step__title { font-family: var(--display); font-weight: 800; font-stretch: 115%; text-transform: uppercase; font-size: clamp(1.25rem, 2.6vw, 1.8rem); line-height: 1.05; color: var(--silver-hi); }
.step__value { justify-self: end; text-align: right; color: var(--silver-mute); font-size: 0.95rem; min-width: 0; overflow-wrap: anywhere; }
.step[data-state="locked"] .step__title { color: var(--silver-mute); }
.step[data-state="locked"] .step__n { opacity: .6; }
.step[data-state="active"] .step__n { background-color: var(--silver); background-image: var(--brushed); border-color: var(--silver-hi); color: var(--black); }
.step[data-state="done"] .step__n { border-color: var(--bronze); color: var(--bronze); }
.step[data-state="done"] .step__head:hover .step__value { color: var(--silver-hi); text-decoration: underline; text-underline-offset: 4px; }
.step__body { padding: 0 0 28px 60px; }
.step__actions { margin-top: 20px; }
.step__body.is-in { animation: step-in .28s var(--ease) both; }
.swap { animation: swap-in .7s var(--ease) both; }
@keyframes step-in { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
@keyframes fade-in { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
@keyframes swap-in { from { opacity: 0; translate: 0 8px; filter: blur(3px); } to { opacity: 1; translate: 0 0; filter: blur(0); } }

/* Opciones (barbero, servicio) */
.choices { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; min-width: 0; }
.choice { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 16px 18px; border: 1px solid var(--line); background: var(--plate); cursor: pointer; --mag: 0; transform: translateX(calc(var(--mag) * 12px)) scale(calc(1 + var(--mag) * 0.035)); transform-origin: left center; transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .14s ease-out, opacity .14s ease-out; }
.choices.is-hot .choice { opacity: calc(0.8 + var(--mag) * 0.2); }
.choices.is-hot .choice:has(input:checked) { opacity: 1; }
.choice:has(input:focus-visible) { --mag: 1; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice:hover { border-color: var(--silver); }
.choice:has(input:focus-visible) { outline: 3px solid var(--silver-hi); outline-offset: 3px; }
.choice:has(input:checked) { background-color: var(--silver); background-image: var(--brushed); border-color: var(--silver-hi); color: var(--black); }
.choice__photo { width: 56px; height: 56px; object-fit: cover; filter: grayscale(1) contrast(1.08); background: var(--black); }
.choice__initial { display: grid; place-items: center; width: 56px; height: 56px; background: var(--black); color: var(--silver); font-family: var(--display); font-weight: 900; font-stretch: 125%; font-size: 1.6rem; }
.choice:has(input:checked) .choice__initial { background: var(--black); }
.choice__main { min-width: 0; }
.choice__name { display: block; font-family: var(--display); font-weight: 800; font-stretch: 112%; text-transform: uppercase; font-size: clamp(1.1rem, 2.2vw, 1.5rem); line-height: 1.1; color: var(--silver-hi); overflow-wrap: anywhere; }
.choice__meta { display: block; margin-top: 2px; font-size: 0.9rem; color: var(--silver-mute); }
.choice__side { text-align: right; font-family: var(--display); font-weight: 900; font-stretch: 110%; font-size: clamp(1.1rem, 2.2vw, 1.5rem); color: var(--silver-hi); font-variant-numeric: tabular-nums; white-space: nowrap; }
.choice__side small { display: block; font-family: var(--body); font-weight: 500; font-size: 0.85rem; color: var(--silver-mute); }
.choice:has(input:checked) .choice__name, .choice:has(input:checked) .choice__side { color: var(--black); }
.choice:has(input:checked) .choice__meta, .choice:has(input:checked) .choice__side small { color: #2a2d33; }
.choices .state { padding: 8px 0; }
.choices__note { margin-top: 4px; font-size: 0.9rem; color: var(--silver-mute); }
.choice--any { border-style: dashed; margin-top: 8px; }
.choice--any .choice__initial { color: var(--silver-mute); }

/* Horas como botones */
.field--date { max-width: 320px; }
.slots { border: 0; padding: 0; margin: 20px 0 0; min-width: 0; }
.slots__legend { padding: 0; margin-bottom: 10px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--silver-mute); }
.slots__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.slot { position: relative; display: grid; place-items: center; min-height: 48px; border: 1px solid var(--line); background: var(--plate); font-family: var(--display); font-weight: 800; font-stretch: 110%; font-size: 1.05rem; color: var(--silver-hi); font-variant-numeric: tabular-nums; cursor: pointer; transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease); }
.slot input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.slot:hover { border-color: var(--silver); }
.slot:has(input:focus-visible) { outline: 3px solid var(--silver-hi); outline-offset: 3px; }
.slot:has(input:checked) { background-color: var(--silver); background-image: var(--brushed); border-color: var(--silver-hi); color: var(--black); }
.slots__empty { padding: 4px 0; }
.slots__busy { margin-top: 16px; color: var(--silver-mute); font-size: 0.9rem; }
.slots__busy summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.slots__busy summary:focus-visible { outline: 3px solid var(--silver-hi); outline-offset: 3px; }
.slots__busy ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.slots__busy li span { display: inline-block; min-width: 3.6em; font-variant-numeric: tabular-nums; color: var(--silver); }

/* Campos */
.fields { display: grid; gap: 18px; }
.fields--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: grid; gap: 8px; min-width: 0; }
.field label { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--silver-mute); }
.field__opt { text-transform: none; letter-spacing: 0; font-weight: 500; }
.field input, .field select, .field textarea {
    width: 100%; min-height: 52px; padding: 12px 14px; font: inherit; font-size: 1rem; color: var(--silver-hi);
    background: var(--plate); border: 1px solid var(--line); border-radius: 0; color-scheme: dark;
    transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.field textarea { resize: vertical; min-height: 84px; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--silver-mute); }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--silver-hi); outline-offset: 0; border-color: var(--silver-hi); background: var(--carbon); }
.field input::placeholder, .field textarea::placeholder { color: var(--silver-mute); opacity: .8; }
.field select { appearance: none; padding-right: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m3 6 5 5 5-5' fill='none' stroke='%23d3d6dc' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.field select:disabled, .field input:disabled { opacity: .55; cursor: not-allowed; }
.field select option, .field select optgroup { background: var(--carbon); color: var(--silver-hi); }
.field select option:disabled { color: var(--silver-mute); }
.field input[aria-invalid="true"] { border-color: var(--bronze); border-width: 2px; }
.field__error, .form-error { display: flex; gap: 8px; align-items: flex-start; font-size: 0.92rem; color: var(--bronze); }
.field__error::before, .form-error::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: 2px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1 .5 14.5h15zM7.2 6h1.6v4.2H7.2zm0 5.2h1.6v1.6H7.2z' fill-rule='evenodd'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1 .5 14.5h15zM7.2 6h1.6v4.2H7.2zm0 5.2h1.6v1.6H7.2z' fill-rule='evenodd'/%3E%3C/svg%3E") center / contain no-repeat; }
.form-error { margin-top: 16px; padding: 12px 14px; border: 1px solid var(--bronze); }
.slots-info { margin-top: 12px; min-height: 1.5em; font-size: 0.95rem; color: var(--silver-mute); }
.slots-info.is-bad { color: var(--bronze); }
.slots-info.is-good { color: var(--silver-hi); }

.consent { display: grid; gap: 6px; margin-top: 4px; }
.check { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 10px 0; cursor: pointer; color: var(--silver); font-size: 0.95rem; line-height: 1.4; }
.check input { flex: none; width: 24px; height: 24px; margin: 0; cursor: pointer; accent-color: var(--silver); }
.check input:focus-visible { outline: 3px solid var(--silver-hi); outline-offset: 3px; }
.check a { color: var(--silver-hi); text-underline-offset: 3px; }
.book__submit { width: 100%; margin-top: 20px; }
.book__fine { margin-top: 14px; font-size: 0.9rem; color: var(--silver-mute); max-width: 52ch; }

/* Resumen */
.summary { position: sticky; top: 96px; padding: clamp(18px, 2.4vw, 32px); background: var(--plate); border: 1px solid var(--line); }
.summary h2 { font-size: clamp(1.4rem, 2.4vw, 2rem); letter-spacing: 0.04em; }
.summary__list { margin-top: 16px; border-top: 1px solid var(--line); position: relative; z-index: 2; }
.summary__list div { display: grid; grid-template-columns: 5.5em minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.summary__list dt { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--silver-mute); padding-top: 3px; }
.summary__list dd { font-family: var(--display); font-weight: 700; font-stretch: 105%; font-size: 1.1rem; color: var(--silver-hi); overflow-wrap: anywhere; }
.summary__list dd.is-empty { color: var(--silver-mute); font-weight: 500; }
.summary__total { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: baseline; margin-top: 16px; color: var(--silver-mute); }
.summary__total strong { font-family: var(--display); font-weight: 900; font-stretch: 110%; font-size: 2rem; color: var(--silver-hi); font-variant-numeric: tabular-nums; }

/* Confirmación */
.done { max-width: 760px; margin-inline: auto; padding-block: clamp(12px, 3vw, 40px); }
.done:focus { outline: none; }
.done h1 { margin-top: 12px; }
.done__card { margin-top: clamp(20px, 3vw, 36px); padding: clamp(16px, 2.4vw, 28px); background: var(--plate); border: 1px solid var(--line); }
.done__card div { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); position: relative; z-index: 2; }
.done__card div:last-child { border-bottom: 0; }
.done__card dt { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--silver-mute); padding-top: 4px; }
.done__card dd { font-family: var(--display); font-weight: 800; font-stretch: 112%; font-size: clamp(1.25rem, 2.6vw, 1.9rem); color: var(--silver-hi); }
.done__card dd::first-letter { text-transform: uppercase; }
.done__mail { margin-top: 20px; color: var(--silver); }
.done__mail strong { color: var(--silver-hi); overflow-wrap: anywhere; }
.done__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.done__fine { margin-top: 14px; font-size: 0.92rem; color: var(--silver-mute); }

/* Pie corto */
.foot--slim { padding-block: 32px; }
.foot__grid--slim { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.foot__grid--slim .foot__name { margin: 0; font-size: clamp(1.25rem, 2.6vw, 1.9rem); }
.foot__grid--slim .foot__account { margin: 0; }

@media (max-width: 1000px) {
    .book__grid { grid-template-columns: 1fr; }
    .summary { position: static; }
    .summary__list div { grid-template-columns: 5em minmax(0, 1fr); }
}
@media (max-width: 600px) {
    .step__head { grid-template-columns: 40px minmax(0, 1fr); gap: 12px; }
    .step__n { width: 40px; height: 40px; }
    .step__value { grid-column: 2; justify-self: start; text-align: left; margin-top: -8px; }
    .step__body { padding-left: 0; }
    .fields--2 { grid-template-columns: 1fr; }
    .choice { grid-template-columns: auto minmax(0, 1fr); }
    .choice__side { grid-column: 2; text-align: left; }
    .choice__photo, .choice__initial { width: 48px; height: 48px; }
    .done__card div { grid-template-columns: 5.5em minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
    .choice, .slot, .step__n, .field input, .field select, .field textarea { transition: none; }
    .choice { transform: none !important; }
    .swap { animation: none; }
    .step__body.is-in { animation: none; }
}

/* Sin sesión: aviso para ingresar o crear cuenta */
.gate { max-width: 640px; padding-block: clamp(12px, 3vw, 40px); }
.gate__lead { margin-top: 14px; max-width: 52ch; color: var(--silver); line-height: 1.6; }
.gate__actions { margin-top: clamp(20px, 3vw, 32px); display: flex; flex-wrap: wrap; gap: 12px; }
.gate__fine { margin-top: 16px; font-size: 0.9rem; color: var(--silver-mute); }

/* Preferencias tomadas de la última cita */
.book__pref { margin-top: 14px; max-width: 60ch; padding: 10px 14px; border-left: 2px solid var(--bronze); background: var(--plate); color: var(--silver); }
.book__pref button { margin-left: 6px; padding: 6px 4px; background: none; border: 0; color: var(--silver-hi); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Ayuda bajo un campo (p. ej. el correo de la cuenta, que no se edita aquí) */
.field__hint { margin-top: 6px; font-size: 0.88rem; color: var(--silver-mute); }
.field input[readonly] { color: var(--silver-mute); cursor: default; }
