/* ==========================================================================
   Avodah — agendar cita y cita confirmada (prototipo)
   Reutiliza los componentes de checkout.css (header simple, campos, opciones,
   chips, resumen, escena de confirmación). Aquí: pasos del wizard, tarjetas
   de mascota/servicio, calendario, horarios y la hoja de calendario sellada.
   ========================================================================== */

.bk-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.bk-panel { padding: 30px 32px 0; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.bk-step { animation: co-msg .35s var(--ease-out); }
.bk-step__title { margin: 0 0 4px; font: 800 26px/1.15 var(--sans); letter-spacing: -.02em; color: var(--ink); }
.bk-step__sub { margin: 0 0 22px; color: var(--muted); }

.co-steps button { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; font: inherit; color: inherit; }
.co-steps button:disabled { cursor: default; }
.co-steps .is-done button:hover { color: var(--ink); }

/* Pie del panel: Atrás / Continuar (fijo abajo en celular) */
.bk-nav { display: flex; align-items: center; gap: 12px; margin: 26px -32px 0; padding: 16px 32px; border-top: 1px solid var(--line); border-radius: 0 0 18px 18px; background: var(--surface); }
.bk-nav__hint { margin-right: auto; font-size: 13.5px; color: var(--muted); }
.bk-nav__hint strong { color: var(--ink); }
.bk-nav .btn { height: 46px; }
.bk-nav .btn[disabled] { opacity: .45; cursor: not-allowed; }
.bk-back { display: inline-flex; align-items: center; gap: 6px; padding: 0 6px; border: 0; background: none; font-weight: 600; color: var(--muted); }
.bk-back:hover { color: var(--ink); }

/* Paso 1: mascotas -------------------------------------------------------- */
.bk-pets { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.bk-pet { position: relative; display: grid; justify-items: center; gap: 4px; padding: 22px 16px 18px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--white); text-align: center; transition: border-color .15s, transform .15s var(--ease-out), box-shadow .15s; }
.bk-pet:hover { border-color: #DCD7CF; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(23, 34, 26, .06); }
.bk-pet.is-sel { border-color: var(--olive-700); background: #FBFCF7; }
.bk-pet strong { margin-top: 8px; font-size: 17px; color: var(--ink); }
.bk-pet small { font-size: 13px; color: var(--muted); }
.bk-pet--add { border-style: dashed; color: var(--olive-700); }
.bk-pet--add .bk-avatar { background: var(--olive-100); }
.bk-avatar { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; overflow: hidden; background: var(--peach); color: var(--terracotta-d); font-size: 34px; flex: none; }
.bk-avatar img { width: 100%; height: 100%; object-fit: cover; }
.bk-avatar--gato { background: var(--cat-teal); color: var(--sage-deeper); }
.bk-avatar--sm { width: 40px; height: 40px; font-size: 18px; }
.bk-tip { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 5px 10px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); font-size: 12px; font-weight: 700; line-height: 1.3; text-align: left; }
.bk-tip .ico { font-size: 14px; flex: none; }

.bk-newpet { display: grid; gap: 16px; max-width: 520px; margin-top: 20px; padding: 22px; border-radius: 16px; background: var(--sand); }
.bk-newpet[hidden] { display: none; }
.bk-newpet .co-chip span { min-width: 120px; }
.bk-login { margin: 18px 0 0; font-size: 14px; color: var(--muted); }
.bk-login a { font-weight: 700; color: var(--olive-700); text-decoration: underline; text-underline-offset: 2px; }

/* Paso 2: servicios ------------------------------------------------------- */
.bk-services { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.bk-svc { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-items: start; padding: 20px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--white); text-align: left; transition: border-color .15s, transform .15s var(--ease-out), box-shadow .15s; }
.bk-svc:hover { border-color: #DCD7CF; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(23, 34, 26, .06); }
.bk-svc.is-sel { border-color: var(--olive-700); background: #FBFCF7; }
.bk-svc__icon { grid-row: span 3; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--sand); color: var(--olive-700); font-size: 24px; }
.bk-svc.is-sel .bk-svc__icon { background: var(--olive-700); color: #fff; }
.bk-svc strong { font-size: 16px; color: var(--ink); }
.bk-svc__desc { font-size: 13.5px; line-height: 1.45; color: var(--text); }
.bk-svc__meta { display: flex; gap: 12px; margin-top: 4px; font-size: 13px; color: var(--muted); }
.bk-svc__meta b { font-size: 15px; color: var(--ink); }
.bk-svc__badge { position: absolute; top: -10px; right: 14px; padding: 4px 10px; border-radius: 999px; background: var(--mustard); color: #4A3507; font-size: 11.5px; font-weight: 800; letter-spacing: .02em; }

/* Paso 3: día y hora ------------------------------------------------------ */
.bk-vets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.bk-vet { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px 0 5px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--white); font-size: 14px; font-weight: 600; color: var(--ink); }
.bk-vet:hover { border-color: #DCD7CF; }
.bk-vet[aria-pressed="true"] { border-color: var(--olive-700); background: var(--olive-700); color: #fff; }
.bk-vet__ini { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--olive-100); color: var(--olive-700); font-size: 12px; font-weight: 800; }
.bk-vet__ini .ico { font-size: 16px; }
.bk-vet[aria-pressed="true"] .bk-vet__ini { background: rgba(255, 255, 255, .18); color: #fff; }

.bk-soonest { display: flex; align-items: center; gap: 12px; width: 100%; margin-bottom: 20px; padding: 14px 16px; border: 0; border-radius: 14px; background: var(--ok-bg); color: var(--ok); text-align: left; transition: background .15s; }
.bk-soonest:hover { background: #DCE6CF; }
.bk-soonest .ico { font-size: 22px; flex: none; }
.bk-soonest span { display: grid; gap: 1px; font-size: 13px; }
.bk-soonest b { font-size: 15px; color: var(--ink); }
.bk-soonest em { margin-left: auto; font-style: normal; font-weight: 700; font-size: 13.5px; white-space: nowrap; }

.bk-when { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
.bk-calhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.bk-calhead span { font-weight: 800; color: var(--ink); }
.bk-calnav { display: grid; place-items: center; width: 36px; height: 36px; border: 1.5px solid var(--line); border-radius: 50%; background: var(--white); color: var(--ink); }
.bk-calnav .ico { font-size: 18px; }
.bk-calnav:hover:not(:disabled) { border-color: var(--olive-700); }
.bk-calnav:disabled { opacity: .3; cursor: default; }
.bk-calgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.bk-dow { padding-bottom: 4px; text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.bk-day { aspect-ratio: 1; border: 0; border-radius: 10px; background: var(--olive-100); color: var(--ink); font-size: 14px; font-weight: 700; transition: background .15s, color .15s; }
.bk-day:hover:not(:disabled) { background: #D9DFC6; }
.bk-day.is-sel { background: var(--olive-700); color: #fff; }
.bk-day.is-today { box-shadow: inset 0 0 0 1.5px var(--olive-700); }
.bk-day:disabled { background: transparent; color: #C9C6BD; font-weight: 500; cursor: default; }
.bk-day.is-full { text-decoration: line-through; }
.bk-legend { display: flex; gap: 16px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.bk-legend span { display: inline-flex; align-items: center; gap: 6px; }
.bk-legend i { width: 12px; height: 12px; border-radius: 4px; background: var(--olive-100); }
.bk-legend i.is-full { background: transparent; box-shadow: inset 0 0 0 1px #D6D1C8; }

.bk-slots__day { margin: 0 0 12px; font-weight: 800; color: var(--ink); }
.bk-slots__day::first-letter { text-transform: uppercase; }
.bk-slots__group { margin-bottom: 14px; }
.bk-slots__label { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.bk-slots__label .ico { font-size: 15px; }
.bk-slots__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.bk-slot { height: 42px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--white); font-size: 14px; font-weight: 700; color: var(--ink); transition: border-color .15s, background .15s; }
.bk-slot:hover { border-color: var(--olive-700); }
.bk-slot.is-sel { border-color: var(--olive-700); background: var(--olive-700); color: #fff; }
.bk-empty { display: grid; justify-items: center; gap: 8px; padding: 34px 10px; border-radius: 14px; background: var(--sand); text-align: center; color: var(--muted); font-size: 14px; }
.bk-empty .ico { font-size: 26px; color: var(--olive-500); }

/* Paso 4: confirmar ------------------------------------------------------- */
.bk-confirm { display: grid; gap: 22px; }
.bk-block h3 { margin: 0 0 12px; font: 700 16px/1.2 var(--sans); color: var(--ink); }
.bk-who { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--sand); font-size: 14px; }
.bk-who strong { color: var(--ink); }
.bk-who a { margin-left: auto; font-weight: 700; color: var(--olive-700); }
.bk-textarea { height: auto; min-height: 84px; padding: 12px 14px; line-height: 1.45; resize: vertical; }
.bk-policy { display: flex; gap: 10px; margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--info-bg); color: var(--info); font-size: 13.5px; }
.bk-policy .ico { font-size: 18px; flex: none; margin-top: 1px; }
.bk-account { margin: 4px 0 0; font-size: 13px; color: var(--muted); }

/* Resumen lateral --------------------------------------------------------- */
.bk-summary { position: sticky; top: 100px; padding: 24px; border-radius: 18px; background: var(--hero-bg); }
.bk-summary h2 { margin: 0 0 14px; font: 700 18px/1.2 var(--sans); color: var(--ink); }
.bk-sum { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.bk-sum li { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px dashed #E2DAD0; }
.bk-sum li:last-child { border-bottom: 0; }
.bk-sum__ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--white); color: var(--olive-700); font-size: 18px; }
.bk-sum small { display: block; font-size: 12px; color: var(--muted); }
.bk-sum b { display: block; font-size: 14px; color: var(--ink); line-height: 1.3; }
.bk-sum .is-empty b { font-weight: 500; color: #B4B0A6; }
.bk-sum button { padding: 4px 0; border: 0; background: none; font-size: 12.5px; font-weight: 700; color: var(--olive-700); }
.bk-sum li.is-new { animation: bk-flash .8s var(--ease-out); }
@keyframes bk-flash { from { background: rgba(246, 196, 83, .35); } to { background: transparent; } }
.bk-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; padding-top: 14px; border-top: 1px solid #E8E0D5; }
.bk-total span { font-weight: 700; color: var(--ink); }
.bk-total strong { font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.bk-summary .co-trust { margin-top: 14px; }

/* ==========================================================================
   Cita confirmada: hoja de calendario que recibe el sello de huellita
   ========================================================================== */
.cal-scene .cal-sheet { transform-box: fill-box; transform-origin: 50% 0; animation: sheet-drop .7s cubic-bezier(.34, 1.56, .64, 1) both, sheet-thump .3s ease-out 1.05s; }
.cal-scene .stamp { transform-box: fill-box; transform-origin: center; animation: stamp .45s cubic-bezier(.2, .9, .3, 1.4) .85s both; }
.cal-scene .ring { transform-box: fill-box; transform-origin: center; opacity: 0; animation: ring .7s ease-out 1.1s both; }
.cal-scene .leaf { transform-box: fill-box; transform-origin: 50% 100%; animation: leaf-in .6s var(--ease-out) .3s both; }
.cal-scene .leaf--2 { animation-delay: .42s; }
.cal-scene .burst { transform-box: fill-box; transform-origin: center bottom; opacity: 0; animation: burst .6s cubic-bezier(.34, 1.56, .64, 1) 1.25s both; }
.cal-scene .burst--2 { animation-delay: 1.4s; }
.cal-scene .burst--3 { animation-delay: 1.55s; }
@keyframes sheet-drop { from { opacity: 0; transform: translateY(-46px) rotate(-7deg); } to { opacity: 1; transform: none; } }
@keyframes sheet-thump { 50% { transform: translateY(3px) scale(1.012, .985); } }
@keyframes stamp { 0% { opacity: 0; transform: scale(2.3) rotate(10deg); } 60% { opacity: 1; transform: scale(.86); } 100% { opacity: 1; transform: none; } }
@keyframes ring { from { opacity: .7; transform: scale(.6); } to { opacity: 0; transform: scale(1.7); } }
@keyframes leaf-in { from { opacity: 0; transform: scale(.4) rotate(-20deg); } to { opacity: 1; transform: none; } }

.ok-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ok-list li { display: flex; gap: 10px; font-size: 14.5px; }
.ok-list .ico { margin-top: 3px; font-size: 16px; color: var(--olive-700); flex: none; }
.ok-cal { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.ok-cal .btn { height: 42px; padding: 0 18px; font-size: 14px; }
.ok-links { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 16px; font-size: 14px; font-weight: 700; }
.ok-links a { display: inline-flex; align-items: center; gap: 6px; color: var(--olive-700); }
.ok-links .ico { font-size: 17px; }
.ok-card .ok-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.ok-card .ok-btns .btn { height: 40px; padding: 0 16px; font-size: 13.5px; }

/* Responsive ------------------------------------------------------------- */
@media (max-width: 1060px) {
	.bk-grid { grid-template-columns: 1fr; }
	.bk-summary { position: static; }
}
@media (max-width: 760px) {
	.bk-when { grid-template-columns: 1fr; }
	.bk-services { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
	.bk-panel { padding: 22px 18px 0; }
	.bk-nav { position: sticky; bottom: 0; z-index: 5; margin: 22px -18px 0; padding: 12px 18px; box-shadow: 0 -8px 20px rgba(23, 34, 26, .06); }
	.bk-step__title { font-size: 22px; }
	.bk-pets { grid-template-columns: 1fr 1fr; }
	.bk-pet { padding: 18px 10px 14px; }
	.bk-avatar { width: 68px; height: 68px; }
	.bk-soonest em { display: none; }
	.bk-nav__hint { display: none; }
	.bk-nav .btn { flex: 1; }
	body[data-page="booking"] .co-demo { bottom: 84px; } /* demo arriba de la barra Atrás / Continuar */
}

@media (prefers-reduced-motion: reduce) {
	.bk-step, .bk-sum li.is-new, .cal-scene * { animation: none !important; }
	.cal-scene .burst, .cal-scene .ring { opacity: 0; }
	.cal-scene .burst { opacity: 1; }
	.bk-pet, .bk-svc { transition: none; }
}
