/* ==========================================================================
   TUGA · Módulo de reservas
   ========================================================================== */

.bk {
  --bk-pad: clamp(20px, 3vw, 36px);
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 640px;
  color: var(--text);
}

/* Progreso */
.bk__progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 22px var(--bk-pad) 20px;
  list-style: none;
  border-bottom: 1px solid var(--hair);
  font-size: 12.5px;
  color: var(--text-faint);
}
.bk__progress li { display: flex; align-items: center; gap: 9px; white-space: nowrap; transition: color 0.5s var(--ease); }
.bk__progress li + li::before {
  content: "";
  width: clamp(12px, 3vw, 36px);
  height: 1px;
  margin-right: 3px;
  background: var(--hair);
}
.bk__progress b {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-weight: 500;
  font-size: 11px;
  box-shadow: inset 0 0 0 1px var(--hair);
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.bk__progress .is-current { color: var(--text); }
.bk__progress .is-current b { background: var(--ink); color: var(--bg); box-shadow: none; }
.bk__progress .is-done b { color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }

/* Pasos */
.bk__step { display: flex; flex-direction: column; flex: 1; animation: bkIn 0.7s var(--ease-out) both; }
.bk__step[hidden] { display: none; }
@keyframes bkIn { from { opacity: 0; transform: translateY(14px); } }
.bk__body { flex: 1; padding: 8px var(--bk-pad) 24px; }

.bk__group { margin: 0; padding: 26px 0 0; border: 0; min-width: 0; }
.bk__label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin: 0 0 14px;
  padding: 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}
.bk__label small {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-dim);
}

/* Base para todas las "fichas" seleccionables */
.bk-chip {
  border: 0;
  background: rgba(28, 24, 20, 0.04);
  box-shadow: inset 0 0 0 1px var(--hair);
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.4s var(--ease), box-shadow 0.4s var(--ease), color 0.4s var(--ease), transform 0.4s var(--ease);
}
.bk-chip:hover:not(:disabled):not([aria-pressed="true"]) { box-shadow: inset 0 0 0 1px rgba(28, 24, 20, 0.38); }
.bk-chip:active:not(:disabled) { transform: scale(0.96); }
.bk-chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); box-shadow: none; }
.bk-chip:disabled { cursor: not-allowed; color: var(--text-faint); background: transparent; }

/* Comensales */
.bk__people { display: flex; flex-wrap: wrap; gap: 8px; }
.bk__people .bk-chip { width: 46px; height: 46px; border-radius: 50%; font-size: 15px; }
.bk__hint { margin: 12px 0 0; font-size: 13px; color: var(--text-faint); }
.bk__hint a { color: var(--gold-soft); }

/* Fechas */
.bk__dates-wrap { position: relative; display: flex; align-items: center; gap: 8px; }
.bk__dates {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 64px;
  gap: 8px;
  flex: 1;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  padding: 2px;
  -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
  mask-image: linear-gradient(90deg, #000 88%, transparent);
}
.bk__dates::-webkit-scrollbar { display: none; }
.bk__date {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 0 11px;
  border-radius: 18px;
  scroll-snap-align: start;
  line-height: 1.1;
}
.bk__date span { font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.75; }
.bk__date strong { font-family: var(--serif); font-weight: 400; font-size: 24px; }
.bk__date em { font-style: normal; font-size: 11px; opacity: 0.75; }
.bk__date:disabled strong { text-decoration: line-through; text-decoration-thickness: 1px; opacity: 0.5; }
.bk__date:disabled em { opacity: 1; }
.bk__nav { flex-shrink: 0; width: 38px; height: 38px; }
.bk__nav svg { width: 14px; height: 14px; }

/* Servicio */
.bk__tabs {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 16px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(28, 24, 20, 0.04);
  box-shadow: inset 0 0 0 1px var(--hair);
}
.bk__tab {
  padding: 8px 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-dim);
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}
.bk__tab[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 4px 14px -6px rgba(40, 28, 16, 0.3), inset 0 0 0 1px var(--line); }
.bk__tab:disabled { opacity: 0.35; cursor: not-allowed; }

/* Horas */
.bk__times {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 8px;
  min-height: 98px;
}
.bk__time { height: 45px; border-radius: 999px; font-size: 15px; font-variant-numeric: tabular-nums; }
.bk__time:disabled { text-decoration: line-through; text-decoration-thickness: 1px; box-shadow: inset 0 0 0 1px rgba(28, 24, 20, 0.05); }
.bk__time--skeleton {
  height: 45px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(28, 24, 20, 0.04) 0%, rgba(28, 24, 20, 0.1) 50%, rgba(28, 24, 20, 0.04) 100%);
  background-size: 200% 100%;
  animation: bkShimmer 1.4s var(--ease) infinite;
}
@keyframes bkShimmer { to { background-position: -200% 0; } }
.bk__empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 22px;
  border-radius: 18px;
  background: rgba(28, 24, 20, 0.03);
  box-shadow: inset 0 0 0 1px var(--hair);
  color: var(--text-dim);
  font-size: 15px;
}
.bk__empty a { color: var(--gold-soft); }

/* Barra inferior */
.bk__bar {
  position: sticky;
  bottom: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px var(--bk-pad);
  border-top: 1px solid var(--hair);
  background: rgba(255, 255, 255, 0.95);
  border-radius: 0 0 calc(var(--radius) - 8px) calc(var(--radius) - 8px);
}
.bk__summary { margin: 0; min-width: 0; font-family: var(--serif); font-size: 1.05rem; line-height: 1.35; color: var(--text); }
.bk__summary span { display: block; font-family: var(--sans); font-size: 12.5px; color: var(--text-faint); }
.bk__bar .btn { flex-shrink: 0; }
.bk__bar .btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; box-shadow: none; }
.bk__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 4px;
  border: 0;
  background: none;
  color: var(--text-dim);
  font-size: 14px;
  cursor: pointer;
  transition: color 0.4s var(--ease);
}
.bk__back:hover { color: var(--text); }
.bk__back svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }

/* Paso 2: datos */
.bk__recap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 24px;
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(201, 161, 96, 0.08);
  box-shadow: inset 0 0 0 1px rgba(201, 161, 96, 0.22);
}
.bk__recap p { margin: 0; font-family: var(--serif); font-size: 1.1rem; }
.bk__recap p span { display: block; font-family: var(--sans); font-size: 12.5px; color: var(--text-dim); }
.bk__recap button { border: 0; background: none; padding: 0; color: var(--gold-soft); font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.bk__form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 14px; margin-top: 26px; }
.bk__field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.bk__field--full { grid-column: 1 / -1; }
.bk__field label { font-size: 13px; color: var(--text-dim); }
.bk__field label i { font-style: normal; color: var(--text-faint); }
.bk__field input,
.bk__field textarea {
  width: 100%;
  padding: 13px 16px;
  border: 0;
  border-radius: 14px;
  background: rgba(28, 24, 20, 0.045);
  box-shadow: inset 0 0 0 1px var(--hair);
  color: var(--text);
  font: inherit;
  font-size: 15.5px;
  transition: box-shadow 0.4s var(--ease), background-color 0.4s var(--ease);
}
.bk__field textarea { min-height: 92px; resize: vertical; }
.bk__field input::placeholder,
.bk__field textarea::placeholder { color: var(--text-faint); }
.bk__field input:focus,
.bk__field textarea:focus { outline: none; background: rgba(28, 24, 20, 0.07); box-shadow: inset 0 0 0 1px var(--gold); }
.bk__field.is-invalid input { box-shadow: inset 0 0 0 1px #b5482f; }
.bk__error { min-height: 0; margin: 0; font-size: 12.5px; color: #b5482f; }

.bk__check { grid-column: 1 / -1; display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; color: var(--text-dim); cursor: pointer; }
.bk__check input {
  appearance: none;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(28, 24, 20, 0.3);
  cursor: pointer;
  transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.bk__check input:checked {
  background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23faf8f4' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat;
  box-shadow: none;
}
.bk__check.is-invalid input { box-shadow: inset 0 0 0 1px #b5482f; }
.bk__check a { color: var(--gold-soft); }

/* Paso 3: confirmación */
.bk__done { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px var(--bk-pad); text-align: center; }
.bk__tick { width: 76px; height: 76px; margin-bottom: 28px; }
.bk__tick circle { fill: none; stroke: rgba(201, 161, 96, 0.35); stroke-width: 1.2; }
.bk__tick path { fill: none; stroke: var(--gold); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: bkTick 0.9s 0.25s var(--ease-out) forwards; }
@keyframes bkTick { to { stroke-dashoffset: 0; } }
.bk__done h3 { margin: 0 0 12px; font-family: var(--serif); font-weight: 300; font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.05; letter-spacing: -0.02em; }
.bk__done h3 em { color: var(--gold-soft); }
.bk__done > p { max-width: 26em; margin: 0 0 28px; color: var(--text-dim); font-size: 15.5px; }
.bk__ticket {
  width: 100%;
  max-width: 380px;
  margin: 0 0 28px;
  padding: 20px 24px;
  border-radius: 20px;
  background: rgba(28, 24, 20, 0.04);
  box-shadow: inset 0 0 0 1px var(--hair);
  text-align: left;
}
.bk__ticket div { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; font-size: 14.5px; }
.bk__ticket div + div { border-top: 1px solid var(--hair); }
.bk__ticket dt { color: var(--text-faint); }
.bk__ticket dd { margin: 0; text-align: right; }
.bk__done-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.bk__demo { margin: 24px 0 0 !important; font-size: 12px !important; color: var(--text-faint) !important; }

/* Contenedores */
.bezel__core--booking { background: var(--surface); overflow: visible; }
.section--deep .bezel__core--booking { background: var(--surface); }
.modal .bk { min-height: 0; }
.modal .bk__bar { border-radius: 0 0 20px 20px; background: rgba(255, 255, 255, 0.97); }

@media (max-width: 560px) {
  .bk { min-height: 0; }
  .bk__progress { gap: 8px; font-size: 12px; }
  .bk__progress li span { display: none; }
  .bk__progress li.is-current span { display: inline; }
  .bk__form { grid-template-columns: 1fr; }
  .bk__nav { display: none; }
  .bk__dates { grid-auto-columns: 58px; }
  .bk__people .bk-chip { width: 42px; height: 42px; }
  .bk__bar { flex-wrap: wrap; }
  .bk__bar .btn { flex: 1; justify-content: space-between; }
  .bk__summary { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .bk__step, .bk__time--skeleton, .bk__tick path { animation: none; stroke-dashoffset: 0; }
}

/* Campo oculto para los robots: las personas no lo ven ni lo rellenan. */
.bk__trap { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.bk__check a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* Aviso bajo la confirmación: el correo puede caer en spam. Rojo vino suave, a juego con la paleta de la casa. */
.bk__notice {
  display: flex; align-items: flex-start; gap: 14px; box-sizing: border-box; width: 100%; max-width: 380px; margin: -14px 0 28px; padding: 16px 18px;
  text-align: left; color: #7a2232; background: linear-gradient(180deg, #fdf1f1 0%, #fbe7e7 100%);
  border: 1px solid rgba(160, 44, 58, 0.22); border-radius: 18px; box-shadow: 0 14px 30px -22px rgba(122, 34, 50, 0.45);
  animation: bkIn .6s .25s var(--ease-out) both;
}
.bk__notice svg { flex: none; width: 34px; height: 34px; padding: 7px; border-radius: 50%; background: #a02c3a; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.bk__notice p { margin: 0; font-size: 14px; line-height: 1.55; color: #7a2232; }
.bk__notice strong { display: block; margin-bottom: 2px; font-family: var(--serif); font-weight: 500; font-size: 16.5px; letter-spacing: -0.01em; color: #6b1a29; }
.bk__notice em { font-style: italic; }
