/* Reservas en línea y panel del salón. Usa los colores y tipografías de ../styles.css */

.book-header { padding: 20px 0; border-bottom: 1px solid var(--line); }
.book-header__row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.book-header__right { display: flex; align-items: center; gap: 24px; }
.book-back { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.book-back:hover { color: var(--accent); }

.book { padding: clamp(40px, 6vw, 80px) 0 clamp(72px, 9vw, 128px); }
.book__intro h1 { font-size: clamp(46px, 6.6vw, 100px); line-height: .98; letter-spacing: -.02em; margin: 16px 0 20px; }
.book__intro h1 em { color: var(--accent); }
.book__intro p { max-width: 34em; margin: 0; color: var(--ink-2); font-size: 18px; }
.muted { color: var(--muted); }

.book__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 360px;
  gap: clamp(32px, 5vw, 80px); align-items: start; margin-top: clamp(40px, 5vw, 72px);
}

/* pasos */
.step { padding: 30px 0 44px; border-top: 1px solid var(--ink); transition: opacity .35s var(--ease); }
.step.is-locked { opacity: .38; pointer-events: none; }
.step__title { display: flex; align-items: baseline; gap: 14px; font-size: clamp(28px, 2.6vw, 36px); margin-bottom: 24px; }
.step__n { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--accent); }

/* servicios */
.cats { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; margin: 0 -2px 18px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat {
  flex: none; border: 1px solid var(--line); background: none; border-radius: 999px; cursor: pointer;
  padding: 9px 16px; font-size: 13px; letter-spacing: .06em; white-space: nowrap;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.cat:hover { border-color: var(--ink); }
.cat[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.svc-list { border-top: 1px solid var(--line); }
.svc {
  display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center;
  padding: 16px 12px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .2s;
}
.svc:hover { background: rgba(234, 223, 208, .45); }
.svc:has(input:checked) { background: var(--surface); }
.svc input {
  appearance: none; -webkit-appearance: none; width: 18px; height: 18px; margin: 0;
  border: 1px solid var(--ink); border-radius: 50%; cursor: pointer;
}
.svc input:checked { background: var(--ink); box-shadow: inset 0 0 0 3px var(--surface); }
.svc input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.svc__name { font-size: 17px; color: var(--ink); line-height: 1.35; }
.svc__meta { font-size: 14px; color: var(--muted); text-align: right; line-height: 1.35; }
.svc__meta b { display: block; font-weight: 400; color: var(--ink-2); }

/* calendario */
.when { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal__month { font-family: var(--serif); font-size: 26px; margin: 0; }
.cal__nav {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--ink); background: none; cursor: pointer;
  display: grid; place-items: center; transition: background .25s var(--ease), color .25s var(--ease), opacity .25s;
}
.cal__nav svg { width: 18px; height: 18px; }
.cal__nav:hover:not(:disabled) { background: var(--ink); color: var(--bg); }
.cal__nav:disabled { opacity: .25; cursor: default; }
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal__dow { text-align: center; font-size: 11px; letter-spacing: .14em; color: var(--muted); padding: 6px 0 8px; }
.cal__day {
  position: relative; aspect-ratio: 1; border: 0; background: none; border-radius: 50%;
  font-size: 15px; font-variant-numeric: tabular-nums; cursor: pointer; color: var(--ink);
  transition: background .2s, color .2s;
}
.cal__day::after {
  content: ""; position: absolute; left: 50%; bottom: 18%; width: 4px; height: 4px; margin-left: -2px;
  border-radius: 50%; background: var(--accent);
}
.cal__day:disabled { color: rgba(35, 26, 21, .24); cursor: default; }
.cal__day:disabled::after { display: none; }
.cal__day:not(:disabled):hover { background: var(--bg-2); }
.cal__day.is-today { box-shadow: inset 0 0 0 1px var(--line); }
.cal__day[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.cal__day[aria-pressed="true"]::after { background: var(--bg); }

/* horarios */
.slots__hint { color: var(--muted); margin: 6px 0 0; }
.slots__day { font-family: var(--serif); font-size: 24px; margin: 0 0 16px; }
.slots__group + .slots__group { margin-top: 20px; }
.slots__label { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.slots__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.slot {
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px; cursor: pointer;
  padding: 10px 8px; font-size: 14px; font-variant-numeric: tabular-nums; color: var(--ink);
  transition: border-color .2s, background .2s, color .2s;
}
.slot:hover { border-color: var(--ink); }
.slot[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* datos */
.field { display: grid; gap: 8px; margin-bottom: 22px; }
.field label { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; font-size: 17px; color: var(--ink);
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 0; background: var(--surface);
}
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.field small { font-size: 13px; color: var(--muted); line-height: 1.5; }
.field.has-error input { border-color: #9a2f1c; }
.consent { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; font-size: 14.5px; color: var(--ink-2); cursor: pointer; }
.consent input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--ink); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* resumen */
.summary { position: sticky; top: 24px; background: var(--surface); border-top: 1px solid var(--ink); padding: 26px 26px 28px; }
.summary dl { margin: 14px 0 24px; }
.summary dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.summary dt { color: var(--muted); flex: none; }
.summary dd { margin: 0; text-align: right; color: var(--ink); }
.summary__cta { width: 100%; justify-content: center; }
.summary__cta:disabled { opacity: .3; cursor: not-allowed; }
.summary__cta:disabled:hover { background: var(--ink); border-color: var(--ink); }
.summary__note { font-size: 13px; line-height: 1.6; color: var(--muted); margin: 16px 0 0; }
.summary__note a { color: var(--accent-ink); }
.form-error { margin: 14px 0 0; font-size: 14px; color: #9a2f1c; }
.form-error:empty { display: none; }
.is-busy .summary__cta { opacity: .6; pointer-events: none; }

/* confirmación */
.book-done { max-width: 680px; padding-top: clamp(16px, 3vw, 40px); }
.book-done:focus { outline: none; }
.book-done h1 { font-size: clamp(46px, 6.4vw, 92px); line-height: .98; letter-spacing: -.02em; margin: 16px 0 24px; }
.book-done h1 em { color: var(--accent); }
.book-done__lead { font-size: clamp(19px, 1.7vw, 22px); color: var(--ink); margin: 0 0 12px; }
.book-done p { color: var(--ink-2); }
.book-done__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 8px; }

.book-footer { border-top: 1px solid var(--line); padding: 26px 0 34px; font-size: 13px; color: var(--muted); }
.book-footer__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }

@media (max-width: 1100px) {
  .when { grid-template-columns: 1fr; }
  .cal { max-width: 420px; }
}
@media (max-width: 900px) {
  .book__grid { grid-template-columns: 1fr; }
  .summary { position: static; }
}
@media (max-width: 600px) {
  .book-back [lang] { display: none !important; }
  .book-back { font-size: 20px; }
  .svc { grid-template-columns: auto 1fr; padding: 14px 6px; }
  .svc__meta { grid-column: 2; text-align: left; margin-top: -8px; }
  .svc__meta b { display: inline; margin-right: 8px; }
  .book-done__actions .btn { flex: 1 1 100%; justify-content: center; }
}

/* ---------- panel del salón ---------- */
.admin { padding: clamp(32px, 5vw, 56px) 0 96px; }
.admin h1 { font-size: clamp(40px, 5vw, 64px); margin: 12px 0 28px; }
.admin-login { max-width: 420px; }
.admin-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 18px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.admin-bar input[type="date"] { font: inherit; font-size: 16px; padding: 9px 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.admin-bar .btn { padding: 11px 18px; }
.admin-day { font-family: var(--serif); font-size: 30px; margin: 28px 0 6px; }
.admin-meta { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.admin-warn { background: #f3e2c9; color: var(--ink); padding: 12px 16px; font-size: 14px; margin: 18px 0 0; }
.appt { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 18px; align-items: start; padding: 18px 0; border-bottom: 1px solid var(--line); }
.appt__time { font-variant-numeric: tabular-nums; font-size: 16px; }
.appt__time small { display: block; color: var(--muted); font-size: 13px; }
.appt__who { font-size: 17px; color: var(--ink); }
.appt__svc { color: var(--ink-2); font-size: 15px; }
.appt__notes { color: var(--muted); font-size: 14px; margin-top: 4px; }
.appt__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); }
.tag--ok { background: #dfe8df; color: var(--deep); }
.tag--off { background: #efd9d2; color: #84321f; }
.appt.is-cancelled { opacity: .5; }
.appt.is-cancelled .appt__who { text-decoration: line-through; }
.appt__actions .btn { padding: 9px 14px; font-size: 11px; }
.admin-cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 56px); margin-top: 56px; }
.admin-card { border-top: 1px solid var(--ink); padding-top: 22px; }
.admin-card h2 { font-size: 30px; margin-bottom: 18px; }
.admin-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.admin-blocks { list-style: none; margin: 18px 0 0; padding: 0; }
.admin-blocks li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.admin-blocks button { border: 0; background: none; color: #84321f; cursor: pointer; font-size: 13px; text-decoration: underline; }
.admin-msg { font-size: 14px; margin: 10px 0 0; color: var(--deep); }
.admin-msg.is-error { color: #9a2f1c; }
.admin-empty { color: var(--muted); padding: 18px 0; }
@media (max-width: 900px) {
  .admin-cols { grid-template-columns: 1fr; }
  .appt { grid-template-columns: 1fr; gap: 6px; }
}

/* ---------- política de datos ---------- */
.legal { margin: clamp(32px, 4vw, 56px) 0 0; }
.legal h2 { font-size: clamp(28px, 2.8vw, 38px); }
mark.fill { background: #f3e2c9; color: var(--ink); padding: 0 4px; }
.consent a { color: var(--accent-ink); }
