/* ============================================================
   JK Web Agency — /reservar/  (usa los tokens de css/styles.css)
   Móvil primero. Animaciones sutiles; respetan reduced-motion.
   ============================================================ */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

.bk { position: relative; overflow: hidden; padding: clamp(96px, 14vh, 140px) 0 clamp(64px, 10vh, 110px); }
.bk__glow { position: absolute; top: -10%; left: 50%; transform: translateX(-50%); width: min(900px, 120vw); height: 700px; background: radial-gradient(circle, rgba(74,70,255,.26), transparent 62%); filter: blur(40px); pointer-events: none; }
.bk__inner { position: relative; max-width: 1080px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }

/* ---------- Resumen ---------- */
.bk-side { position: sticky; top: 110px; }
.bk-side__brand { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.bk-side__logo svg { border-radius: 16px; box-shadow: var(--shadow-glow); }
.bk-side__title { font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 4.6vw, 2.9rem); line-height: 1.05; letter-spacing: -.02em; margin: 0 0 14px; }
.bk-side__lead { color: var(--text-muted); font-size: 1.05rem; line-height: 1.6; margin-bottom: 24px; }
.bk-facts { display: grid; gap: 10px; }
.bk-facts li { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(255,255,255,.025); }
.bk-facts svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--blue-bright); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bk-facts span { display: grid; min-width: 0; }
.bk-facts small { color: var(--text-dim); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.bk-facts strong { font-weight: 600; }
.bk-facts__pick { border-color: rgba(111,108,255,.5) !important; background: rgba(74,70,255,.12) !important; animation: bkIn .4s var(--ease) both; }
.bk-side__note { margin-top: 18px; color: var(--text-dim); font-size: .9rem; }

/* ---------- Tarjeta de pasos ---------- */
.bk-card { position: relative; background: linear-gradient(180deg, rgba(28,23,48,.92), rgba(22,18,31,.92)); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); padding: clamp(20px, 3.4vw, 34px); box-shadow: 0 40px 100px -40px rgba(0,0,0,.8); min-height: 520px; }
.bk-steps { display: flex; gap: 8px; margin-bottom: 26px; counter-reset: s; }
.bk-steps li { flex: 1; display: flex; align-items: center; gap: 8px; color: var(--text-dim); font-size: .82rem; font-weight: 600; position: relative; padding-bottom: 12px; }
.bk-steps li::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 3px; background: var(--line-strong); transition: background .4s var(--ease); }
.bk-steps span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-strong); font-size: .75rem; flex: none; transition: background .3s, border-color .3s, color .3s; }
.bk-steps em { font-style: normal; white-space: nowrap; }
.bk-steps li.is-active, .bk-steps li.is-done { color: var(--text); }
.bk-steps li.is-active::after, .bk-steps li.is-done::after { background: var(--blue); }
.bk-steps li.is-active span { background: var(--blue); border-color: var(--blue); color: #fff; }
.bk-steps li.is-done span { background: rgba(74,70,255,.2); border-color: var(--blue); color: var(--blue-bright); }

.bk-step { animation: bkIn .45s var(--ease) both; }
@keyframes bkIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.bk-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.bk-h { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.3rem, 2.6vw, 1.65rem); letter-spacing: -.01em; outline: none; }
.bk-step > .bk-h { margin-bottom: 18px; }
.bk-sub { color: var(--text-muted); margin: -8px 0 18px; }
.bk-back { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(255,255,255,.03); display: grid; place-items: center; color: var(--text); cursor: pointer; flex: none; transition: border-color .2s, background .2s; }
.bk-back:hover { border-color: var(--blue); background: rgba(74,70,255,.12); }
.bk-back svg, .bk-cal__nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bk-hint { color: var(--text-dim); font-size: .88rem; margin-top: 16px; }
.bk-hint--center { text-align: center; }
.bk-hint a { color: var(--blue-bright); }
.bk-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.bk-actions--end { justify-content: flex-end; }
.bk-actions--center { justify-content: center; }
.btn:focus-visible, .bk-back:focus-visible, .bk-day:focus-visible, .bk-slot:focus-visible, .bk-type:focus-visible, .bk-cal__nav:focus-visible { outline: 3px solid var(--blue-bright); outline-offset: 3px; }

/* ---------- Estados ---------- */
.bk-state { display: grid; justify-items: center; text-align: center; gap: 14px; padding: 60px 10px; color: var(--text-muted); }
.bk-state--error svg { width: 44px; height: 44px; fill: none; stroke: #ff8a95; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bk-state--error h2 { font-family: var(--font-display); color: var(--text); font-size: 1.3rem; }
.bk-skel { display: grid; gap: 10px; width: min(360px, 100%); }
.bk-skel i { display: block; height: 46px; border-radius: 12px; background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.09), rgba(255,255,255,.04)); background-size: 200% 100%; animation: bkShine 1.3s linear infinite; }
.bk-skel i:nth-child(2) { width: 80%; } .bk-skel i:nth-child(3) { width: 60%; }
@keyframes bkShine { to { background-position: -200% 0; } }
.bk-alert { padding: 12px 16px; border-radius: 12px; background: rgba(255,92,106,.1); border: 1px solid rgba(255,92,106,.35); color: #ffb3ba; margin-bottom: 18px; font-size: .95rem; }

/* ---------- Paso 1: tipos ---------- */
.bk-types { display: grid; gap: 12px; }
.bk-type { text-align: left; display: grid; gap: 6px; padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: rgba(255,255,255,.03); color: var(--text); cursor: pointer; font: inherit; transition: border-color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease); }
.bk-type:hover { border-color: rgba(111,108,255,.6); transform: translateY(-2px); }
.bk-type[aria-checked="true"] { border-color: var(--blue); background: rgba(74,70,255,.14); box-shadow: 0 0 0 1px var(--blue) inset; }
.bk-type__top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.bk-type strong { font-family: var(--font-display); font-size: 1.12rem; }
.bk-type__dur { color: var(--blue-bright); font-weight: 600; font-size: .9rem; white-space: nowrap; }
.bk-type p { color: var(--text-muted); font-size: .95rem; line-height: 1.55; }
.bk-type__modes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.bk-type__modes span { font-size: .78rem; padding: 3px 10px; border-radius: 99px; border: 1px solid var(--line-strong); color: var(--text-muted); }

/* ---------- Paso 2: calendario ---------- */
.bk-cal__bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.bk-cal__title { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; text-transform: capitalize; }
.bk-cal__nav { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-strong); background: transparent; color: var(--text); display: grid; place-items: center; cursor: pointer; transition: background .2s, border-color .2s, opacity .2s; }
.bk-cal__nav:hover:not(:disabled) { border-color: var(--blue); background: rgba(74,70,255,.12); }
.bk-cal__nav:disabled { opacity: .3; cursor: default; }
.bk-cal__dow, .bk-cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.bk-cal__dow span { text-align: center; font-size: .75rem; font-weight: 600; color: var(--text-dim); padding-bottom: 6px; }
.bk-cal__grid { min-height: 300px; align-content: start; transition: opacity .2s; }
.bk-cal__grid.is-loading { opacity: .45; pointer-events: none; }
.bk-day { aspect-ratio: 1 / 1; min-height: 42px; border-radius: 14px; border: 1px solid transparent; background: transparent; color: var(--text-dim); font: 600 1rem var(--font-body); display: grid; place-items: center; position: relative; cursor: default; padding: 0; }
.bk-day.is-avail { color: var(--text); background: rgba(74,70,255,.12); border-color: rgba(111,108,255,.28); cursor: pointer; transition: background .2s, border-color .2s, transform .15s; }
.bk-day.is-avail::after { content: ""; position: absolute; bottom: 7px; width: 4px; height: 4px; border-radius: 50%; background: var(--blue-bright); }
.bk-day.is-avail:hover { background: rgba(74,70,255,.24); border-color: var(--blue); }
.bk-day.is-avail:active { transform: scale(.96); }
.bk-day.is-today { box-shadow: inset 0 0 0 1px var(--line-strong); }
.bk-day[aria-selected="true"] { background: var(--blue) !important; border-color: var(--blue) !important; color: #fff; box-shadow: var(--shadow-glow); }
.bk-day[aria-selected="true"]::after { background: #fff; }
.bk-day.is-empty { visibility: hidden; }
.bk-cal__msg { text-align: center; color: var(--text-muted); padding: 14px 0 0; }

/* ---------- Paso 3: horas ---------- */
.bk-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.bk-slot { height: 52px; border-radius: 14px; border: 1px solid var(--line-strong); background: rgba(255,255,255,.03); color: var(--text); font: 600 1.02rem var(--font-body); cursor: pointer; transition: background .2s, border-color .2s, transform .15s; animation: bkIn .35s var(--ease) both; }
.bk-slot small { display: block; font-size: .7rem; color: var(--text-dim); font-weight: 500; }
.bk-slot:hover { border-color: var(--blue); background: rgba(74,70,255,.14); }
.bk-slot:active { transform: scale(.97); }
.bk-slot[aria-checked="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.bk-slot[aria-checked="true"] small { color: rgba(255,255,255,.8); }

/* ---------- Paso 4: formulario ---------- */
.bk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.bk-fld { display: grid; gap: 7px; min-width: 0; border: 0; padding: 0; margin: 0; }
.bk-fld--full { grid-column: 1 / -1; }
.bk-fld > span, .bk-fld legend { font-size: .9rem; font-weight: 600; color: var(--text); padding: 0; }
.bk-fld i { color: var(--blue-bright); font-style: normal; }
.bk-fld em, .bk-check em { color: var(--text-dim); font-style: normal; font-weight: 500; }
.bk-fld legend { margin-bottom: 7px; }
.bk-form input:not([type=checkbox]):not([type=radio]), .bk-form select, .bk-form textarea {
  width: 100%; min-height: 50px; padding: 12px 15px; border-radius: 14px; border: 1px solid var(--line-strong); background: rgba(13,13,15,.6);
  color: var(--text); font: 16px var(--font-body); transition: border-color .2s, box-shadow .2s; -webkit-appearance: none; appearance: none;
}
.bk-form select { padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a5a2b3' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; }
.bk-form textarea { resize: vertical; line-height: 1.55; min-height: 120px; }
.bk-form input:focus, .bk-form select:focus, .bk-form textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(74,70,255,.22); }
.bk-form ::placeholder { color: var(--text-dim); }
.bk-form [aria-invalid="true"] { border-color: #ff6b78 !important; }
.bk-tel { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 8px; }
.bk-err { color: #ff9aa4; font-size: .84rem; min-height: 0; }
.bk-err:empty { display: none; }
.bk-count { justify-self: end; color: var(--text-dim); font-size: .78rem; margin-top: -2px; }
.bk-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bk-chip { position: relative; }
.bk-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bk-chip span { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--line-strong); color: var(--text-muted); font-weight: 600; font-size: .93rem; cursor: pointer; transition: all .2s var(--ease); }
.bk-chip input:checked + span { background: rgba(74,70,255,.18); border-color: var(--blue); color: #fff; }
.bk-chip input:focus-visible + span { outline: 3px solid var(--blue-bright); outline-offset: 2px; }
.bk-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.bk-consents { display: grid; gap: 12px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.bk-check { display: flex; gap: 12px; align-items: flex-start; font-size: .93rem; color: var(--text-muted); line-height: 1.5; cursor: pointer; }
.bk-check input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--blue); cursor: pointer; }
.bk-check a { color: var(--blue-bright); text-decoration: underline; text-underline-offset: 3px; }
.bk-check strong { color: var(--text); }
.bk-check i { color: var(--blue-bright); font-style: normal; }
.bk-legal { font-size: .85rem; color: var(--text-dim); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.bk-legal summary { cursor: pointer; font-weight: 600; color: var(--text-muted); }
.bk-legal dl { display: grid; gap: 8px; margin-top: 10px; }
.bk-legal dt { font-weight: 600; color: var(--text-muted); }
.bk-legal dd { margin: 0; }
.bk-summary { margin-top: 22px; padding: 14px 16px; border-radius: 14px; background: rgba(74,70,255,.1); border: 1px solid rgba(111,108,255,.3); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.bk-summary:empty { display: none; }
.bk-summary strong { font-family: var(--font-display); }
.bk-summary button { margin-left: auto; background: none; border: 0; color: var(--blue-bright); font: 600 .9rem var(--font-body); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.bk-submit { min-width: 220px; }
.bk-submit.is-busy { opacity: .8; pointer-events: none; }
.bk-submit.is-busy::after { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid #fff; border-right-color: transparent; animation: bkSpin .7s linear infinite; }
@keyframes bkSpin { to { transform: rotate(360deg); } }

/* ---------- Paso 5 ---------- */
.bk-done { text-align: center; padding: 20px 0 8px; }
.bk-done__badge { margin-bottom: 20px; }
.bk-done .bk-h { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-bottom: 12px; }
.bk-done__lead { color: var(--text-muted); font-size: 1.08rem; max-width: 520px; margin: 0 auto 20px; }
.bk-done__lead strong { color: var(--text); }
.bk-pending { display: flex; gap: 14px; align-items: flex-start; text-align: left; max-width: 520px; margin: 0 auto 18px; padding: 16px 18px; border-radius: 16px; background: rgba(242,179,61,.08); border: 1px solid rgba(242,179,61,.32); color: #f7d58f; }
.bk-pending svg { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.bk-pending p { line-height: 1.55; font-size: .96rem; }
.bk-ref { color: var(--text-muted); }
.bk-ref strong { font-family: var(--font-display); color: var(--text); letter-spacing: .04em; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .bk__inner { grid-template-columns: minmax(0, 1fr); }
  .bk-side { position: static; }
  .bk-side__brand { display: none; }
  .bk-side__title { font-size: clamp(1.9rem, 8vw, 2.4rem); }
  .bk-side__lead { margin-bottom: 18px; }
  .bk-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .bk-facts li { padding: 10px 12px; gap: 10px; }
  .bk-facts li:nth-child(3), .bk-facts__pick { grid-column: 1 / -1; }
  .bk-side__note { display: none; }
}
@media (max-width: 600px) {
  .bk { padding-top: 92px; }
  .bk-card { padding: 18px 14px 22px; border-radius: 22px; min-height: 0; }
  .bk-steps em { display: none; }
  .bk-steps li { justify-content: center; }
  .bk-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .bk-cal__dow, .bk-cal__grid { gap: 4px; }
  .bk-day { border-radius: 11px; font-size: .95rem; }
  .bk-cal__grid { min-height: 260px; }
  .bk-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .bk-actions--end .btn, .bk-submit { width: 100%; }
  .bk-tel { grid-template-columns: 112px minmax(0, 1fr); }
  /* que el botón flotante de WhatsApp no tape el botón de enviar */
  .bk-page .bk-form { padding-bottom: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  .bk-step, .bk-slot, .bk-facts__pick { animation: none; }
  .bk-skel i, .bk-submit.is-busy::after { animation: none; }
  .bk-type:hover { transform: none; }
}
