/* ==========================================================================================
   Reservas públicas (/reservar/{slug}) y su vista previa en el editor.
   Mobile-first. Los colores del negocio llegan como variables --tpp-* (motor adaptativo de la
   Página pública, AA garantizado) y --bk-* (acción, acento, tipografía). Sin ninguna variable el
   diseño base es neutro y elegante. Nada de estilos en línea: la página corre con CSP estricta.
   ========================================================================================== */

:root {
    --bk-bg: var(--tpp-bg, #f7f6f3);
    --bk-surface: var(--tpp-surface, #ffffff);
    --bk-surface-soft: var(--tpp-surface-soft, #f1efea);
    --bk-text: var(--tpp-text, #17161a);
    --bk-muted: var(--tpp-muted, #66646b);
    --bk-border: var(--tpp-border, rgba(23, 22, 26, .11));
    --bk-ink: var(--tpp-accent-ink, #17161a);
    --bk-tint: var(--tpp-accent-soft, #efede8);
    --bk-kicker-color: var(--tpp-kicker, #7d6331);
    --bk-deep: var(--tpp-bg-deep, #151417);
    --bk-on-deep-label: var(--tpp-gold, #d8bd86);
    --bk-chip-bg-color: var(--tpp-chip-bg, var(--bk-surface-soft));
    --bk-chip-ink-color: var(--tpp-chip-ink, var(--bk-muted));
    --bk-action: #17161a;
    --bk-action-hover: #2f2d34;
    --bk-on-action: #ffffff;
    --bk-action-rgb: 23, 22, 26;
    --bk-highlight: #9a3d12;
    --bk-highlight-soft: #fbece4;
    --bk-font-heading: "Playfair Display Variable", Georgia, "Times New Roman", serif;
    --bk-font-body: "Inter Variable", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --bk-heading-weight: 500;
    --bk-heading-scale: 1;

    --bk-r-card: 18px;
    --bk-r-ctl: 12px;
    --bk-r-btn: 12px;
    --bk-r-chip: 999px;
    --bk-shadow: 0 1px 2px rgba(18, 16, 24, .05), 0 8px 24px -12px rgba(18, 16, 24, .16);
    --bk-shadow-lift: 0 2px 4px rgba(18, 16, 24, .06), 0 18px 40px -18px rgba(18, 16, 24, .28);
    --bk-ease: cubic-bezier(.2, .7, .2, 1);
    --bk-gutter: 16px;
    --bk-bar-h: 0px;
}

.bk-corners-rounded { --bk-r-card: 26px; --bk-r-ctl: 16px; --bk-r-btn: 999px; }
.bk-corners-square { --bk-r-card: 6px; --bk-r-ctl: 6px; --bk-r-btn: 6px; --bk-r-chip: 6px; }

.bk-dark {
    --bk-border: var(--tpp-border, rgba(255, 255, 255, .14));
    --bk-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 26px -14px rgba(0, 0, 0, .6);
    --bk-shadow-lift: 0 2px 6px rgba(0, 0, 0, .35), 0 20px 44px -18px rgba(0, 0, 0, .7);
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body.bk-body {
    margin: 0;
    min-height: 100vh;
    background: var(--bk-bg);
    color: var(--bk-text);
    font-family: var(--bk-font-body);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    padding-bottom: calc(var(--bk-bar-h) + env(safe-area-inset-bottom, 0px));
}

img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.bk-sr {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.bk-skip {
    position: absolute; left: 12px; top: -60px; z-index: 50;
    background: var(--bk-action); color: var(--bk-on-action);
    padding: 10px 14px; border-radius: var(--bk-r-btn); text-decoration: none; font-weight: 600;
}
.bk-skip:focus { top: 12px; }

:focus-visible {
    outline: 3px solid rgba(var(--bk-action-rgb), .55);
    outline-offset: 2px;
}

/* ── Portada ─────────────────────────────────────────────────────────────────────────────── */

.bk-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: calc(28px + env(safe-area-inset-top, 0px)) var(--bk-gutter) 30px;
    text-align: center;
}

.bk-style-premium .bk-hero {
    background: var(--bk-deep);
    color: #fff;
    padding-bottom: 64px;
}

.bk-style-premium:not(.bk-no-deco) .bk-hero::before {
    content: "";
    position: absolute; inset: -40% -20% auto;
    height: 160%;
    background:
        radial-gradient(60% 50% at 20% 20%, rgba(var(--bk-action-rgb), .55), transparent 70%),
        radial-gradient(50% 45% at 85% 10%, rgba(255, 255, 255, .10), transparent 70%);
    opacity: .55;
    z-index: -1;
}

.bk-hero-cover {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: -2;
}

.bk-hero.has-cover::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(10, 9, 12, .35) 0%, rgba(10, 9, 12, .78) 100%);
    z-index: -1;
}

.bk-hide-cover .bk-hero-cover,
.bk-hide-cover .bk-hero.has-cover::after { display: none; }

.bk-style-minimal .bk-hero.has-cover:not(.bk-hide-cover *) { color: #fff; }
.bk-style-minimal.bk-hide-cover .bk-hero.has-cover { color: inherit; }

.bk-hero-inner {
    position: relative;
    max-width: 640px;
    margin: 0 auto;
}

.bk-brand { display: flex; justify-content: center; margin-bottom: 14px; }

.bk-logo {
    position: relative;
    width: 72px; height: 72px;
    border-radius: 50%;
    display: inline-grid; place-items: center;
    overflow: hidden;
    font-family: var(--bk-font-heading);
    font-size: 30px;
    font-weight: 600;
    background: var(--bk-surface);
    color: var(--bk-ink);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, .14), var(--bk-shadow);
}

.bk-logo img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; background: var(--bk-surface); }
.bk-logo-initial { position: absolute; inset: 0; display: grid; place-items: center; }
.bk-hide-logo .bk-brand { display: none; }

.bk-eyebrow {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--bk-kicker-color);
}
.bk-style-premium .bk-eyebrow,
.bk-hero.has-cover:not(.bk-hide-cover *) .bk-eyebrow { color: var(--bk-on-deep-label); }

.bk-title {
    margin: 0;
    font-family: var(--bk-font-heading);
    font-weight: var(--bk-heading-weight);
    font-size: calc(clamp(30px, 8.4vw, 46px) * var(--bk-heading-scale));
    line-height: 1.08;
    letter-spacing: -.01em;
    overflow-wrap: anywhere;
}

.bk-welcome {
    margin: 12px auto 0;
    max-width: 52ch;
    font-size: 15.5px;
    line-height: 1.55;
    white-space: pre-line;
    opacity: .86;
}

.bk-hero-link {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 16px;
    min-height: 40px;
    padding: 8px 14px;
    border-radius: var(--bk-r-chip);
    font-size: 14px; font-weight: 600;
    color: inherit;
    text-decoration: none;
    border: 1px solid currentColor;
    border-color: color-mix(in srgb, currentColor 30%, transparent);
}
.bk-hero-link:hover { background: rgba(255, 255, 255, .08); }

.bk-style-minimal .bk-hero { text-align: left; padding-bottom: 8px; }
.bk-style-minimal .bk-hero-inner { max-width: 1120px; display: grid; grid-template-columns: auto 1fr; column-gap: 16px; align-items: center; }
.bk-style-minimal .bk-brand { grid-row: span 2; margin: 0; }
.bk-style-minimal .bk-logo { width: 56px; height: 56px; font-size: 24px; box-shadow: var(--bk-shadow); }
.bk-style-minimal .bk-eyebrow { align-self: end; margin: 0; }
.bk-style-minimal .bk-title { font-size: calc(clamp(24px, 6.4vw, 34px) * var(--bk-heading-scale)); align-self: start; }
.bk-style-minimal .bk-welcome { grid-column: 1 / -1; margin: 12px 0 0; }
.bk-style-minimal .bk-hero-link { grid-column: 1 / -1; justify-self: start; }
.bk-style-minimal.bk-hide-logo .bk-hero-inner { grid-template-columns: 1fr; }

/* ── Estructura ──────────────────────────────────────────────────────────────────────────── */

.bk-shell {
    position: relative;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 var(--bk-gutter) 24px;
}

.bk-style-premium .bk-shell { margin-top: -36px; }

.bk-main {
    background: var(--bk-surface);
    border: 1px solid var(--bk-border);
    border-radius: var(--bk-r-card);
    box-shadow: var(--bk-shadow);
    padding: 20px 16px 24px;
    min-width: 0;
}
.bk-main:focus { outline: none; }

.bk-style-minimal .bk-main { box-shadow: none; }

/* Progreso */
.bk-progress ol {
    list-style: none; margin: 0 0 20px; padding: 0;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
}
.bk-progress-item {
    display: flex; align-items: center; gap: 8px;
    font-size: 12.5px; font-weight: 600; color: var(--bk-muted);
    padding-top: 10px;
    border-top: 3px solid var(--bk-surface-soft);
    transition: border-color .3s var(--bk-ease), color .3s var(--bk-ease);
    min-width: 0;
}
.bk-progress-num {
    flex: none;
    width: 22px; height: 22px; border-radius: 50%;
    display: grid; place-items: center;
    font-size: 11.5px;
    background: var(--bk-surface-soft); color: var(--bk-muted);
}
.bk-progress-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-progress-item.is-done, .bk-progress-item.is-current { border-top-color: var(--bk-action); color: var(--bk-text); }
.bk-progress-item.is-current .bk-progress-num, .bk-progress-item.is-done .bk-progress-num { background: var(--bk-action); color: var(--bk-on-action); }
.bk-no-progress .bk-progress { display: none; }

/* Pasos */
.bk-step { animation: bk-enter .32s var(--bk-ease) both; }
@keyframes bk-enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.bk-step-head { margin-bottom: 16px; }
.bk-step-kicker { margin: 0 0 4px; font-size: 12.5px; font-weight: 600; color: var(--bk-muted); letter-spacing: .02em; }
.bk-step-title {
    margin: 0;
    font-family: var(--bk-font-heading);
    font-weight: var(--bk-heading-weight);
    font-size: calc(clamp(22px, 5.8vw, 28px) * var(--bk-heading-scale));
    line-height: 1.18;
    overflow-wrap: anywhere;
}
.bk-step-title:focus { outline: none; }

.bk-back {
    display: inline-flex; align-items: center; gap: 4px;
    margin: -6px 0 10px -8px;
    min-height: 44px;
    padding: 8px 10px;
    border: 0; background: none;
    color: var(--bk-ink);
    font-size: 14px; font-weight: 600;
    border-radius: var(--bk-r-btn);
}
.bk-back:hover { background: var(--bk-tint); }

.bk-block { margin-top: 22px; }
.bk-block-title { margin: 0 0 10px; font-size: 14px; font-weight: 700; letter-spacing: .01em; }

.bk-msg { margin: 12px 0 0; color: var(--bk-muted); font-size: 14.5px; }
.bk-note {
    margin: 0; padding: 12px 14px;
    background: var(--bk-surface-soft);
    border-radius: var(--bk-r-ctl);
    font-size: 14px; color: var(--bk-muted);
}

.bk-banner {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: var(--bk-r-ctl);
    background: var(--bk-highlight-soft);
    color: var(--bk-highlight);
    font-size: 14.5px; font-weight: 600;
    border: 1px solid color-mix(in srgb, var(--bk-highlight) 25%, transparent);
}

/* Vacío */
.bk-empty { text-align: center; padding: 28px 12px; }
.bk-empty-icon { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--bk-surface-soft); color: var(--bk-muted); }
.bk-empty-title { margin: 14px 0 4px; font-weight: 700; }
.bk-empty-text { margin: 0; color: var(--bk-muted); font-size: 14.5px; }

/* ── Paso 1: servicios ───────────────────────────────────────────────────────────────────── */

.bk-search { position: relative; margin-bottom: 12px; }
.bk-search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--bk-muted); pointer-events: none; }
/* Más específico que .bk-input (definido después): si no, el ícono tapaba el texto. */
.bk-search .bk-search-input { padding-left: 42px; }

.bk-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.bk-no-categories .bk-categories { display: none; }
.bk-chip {
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid var(--bk-border);
    border-radius: var(--bk-r-chip);
    background: var(--bk-surface);
    font-size: 14px; font-weight: 600;
    color: var(--bk-muted);
    transition: background .2s, color .2s, border-color .2s;
}
.bk-chip:hover { border-color: rgba(var(--bk-action-rgb), .4); color: var(--bk-text); }
.bk-chip.is-active { background: var(--bk-action); border-color: var(--bk-action); color: var(--bk-on-action); }

.bk-services { display: grid; grid-template-columns: 1fr; gap: 10px; }

.bk-service {
    position: relative;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    text-align: left;
    padding: 14px;
    min-height: 72px;
    border: 1.5px solid var(--bk-border);
    border-radius: var(--bk-r-card);
    background: var(--bk-surface);
    transition: border-color .2s, box-shadow .25s var(--bk-ease), transform .2s var(--bk-ease);
}
.bk-service.has-image { grid-template-columns: 64px 1fr auto; }
.bk-service:hover { border-color: rgba(var(--bk-action-rgb), .35); box-shadow: var(--bk-shadow); }
.bk-service:active { transform: scale(.99); }
.bk-service[aria-pressed="true"] { border-color: var(--bk-action); box-shadow: 0 0 0 1px var(--bk-action), var(--bk-shadow); }

.bk-service-media { width: 64px; height: 64px; border-radius: calc(var(--bk-r-card) - 6px); overflow: hidden; background: var(--bk-surface-soft); }
.bk-service-media img { width: 100%; height: 100%; object-fit: cover; }
.bk-no-service-images .bk-service.has-image { grid-template-columns: 1fr auto; }
.bk-no-service-images .bk-service-media { display: none; }

.bk-service-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bk-service-name { font-weight: 650; font-size: 15.5px; line-height: 1.3; overflow-wrap: anywhere; }
.bk-service-desc {
    color: var(--bk-muted); font-size: 13.5px; line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bk-no-service-desc .bk-service-desc { display: none; }
.bk-service-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }

.bk-meta-pill {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 9px;
    border-radius: var(--bk-r-chip);
    background: var(--bk-chip-bg-color);
    color: var(--bk-chip-ink-color);
    font-size: 12.5px; font-weight: 600;
}

.bk-promo-tag {
    display: inline-flex; align-items: center;
    padding: 3px 9px;
    border-radius: var(--bk-r-chip);
    background: var(--bk-highlight-soft);
    color: var(--bk-highlight);
    font-size: 12px; font-weight: 700; letter-spacing: .02em;
}

.bk-service-side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.bk-price { font-weight: 700; font-size: 15.5px; color: var(--bk-ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bk-price-old { color: var(--bk-muted); font-size: 12.5px; white-space: nowrap; }

.bk-service-check {
    width: 24px; height: 24px; margin-top: 4px;
    border-radius: 50%;
    display: grid; place-items: center;
    border: 1.5px solid var(--bk-border);
    color: transparent;
    transition: background .2s, color .2s, border-color .2s;
}
.bk-service[aria-pressed="true"] .bk-service-check { background: var(--bk-action); border-color: var(--bk-action); color: var(--bk-on-action); }

.bk-services-list .bk-services { gap: 0; border: 1px solid var(--bk-border); border-radius: var(--bk-r-card); overflow: hidden; }
.bk-services-list .bk-service { border: 0; border-radius: 0; border-bottom: 1px solid var(--bk-border); grid-template-columns: 1fr auto; min-height: 64px; }
.bk-services-list .bk-service-item:last-child .bk-service { border-bottom: 0; }
.bk-services-list .bk-service-media { display: none; }
.bk-services-list .bk-service[aria-pressed="true"] { box-shadow: inset 4px 0 0 var(--bk-action); background: var(--bk-tint); }
.bk-services-list .bk-service:hover { box-shadow: none; background: var(--bk-surface-soft); }

/* ── Paso 2: equipo, calendario, horas ───────────────────────────────────────────────────── */

.bk-staff { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.bk-person {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 12px 6px 10px;
    min-height: 44px;
    border: 1.5px solid var(--bk-border);
    border-radius: var(--bk-r-card);
    background: var(--bk-surface);
    text-align: center;
    transition: border-color .2s, box-shadow .2s;
}
.bk-person:hover { border-color: rgba(var(--bk-action-rgb), .35); }
.bk-person[aria-pressed="true"] { border-color: var(--bk-action); box-shadow: 0 0 0 1px var(--bk-action); }
.bk-avatar {
    position: relative;
    width: 52px; height: 52px; border-radius: 50%;
    overflow: hidden;
    display: grid; place-items: center;
    background: var(--bk-surface-soft);
    color: var(--bk-muted);
}
.bk-avatar img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.bk-avatar-initial {
    position: absolute; inset: 0;
    display: grid; place-items: center;
    font-weight: 700; font-size: 19px;
    color: #fff; background: #6366f1;
}
.bk-avatar-any { background: var(--bk-tint); color: var(--bk-ink); }
.bk-person-name { font-weight: 650; font-size: 13.5px; line-height: 1.25; overflow-wrap: anywhere; }
.bk-person-role { font-size: 12px; color: var(--bk-muted); line-height: 1.2; }

.bk-calendar {
    border: 1px solid var(--bk-border);
    border-radius: var(--bk-r-card);
    padding: 12px;
    background: var(--bk-surface);
}
.bk-cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.bk-cal-month { margin: 0; font-weight: 700; font-size: 15px; }
.bk-cal-nav {
    width: 44px; height: 44px;
    display: grid; place-items: center;
    border: 0; border-radius: var(--bk-r-btn);
    background: none; color: var(--bk-text);
}
.bk-cal-nav:hover:not(:disabled) { background: var(--bk-surface-soft); }
.bk-cal-nav:disabled { opacity: .3; cursor: default; }
.bk-cal-week, .bk-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.bk-cal-week span { text-align: center; font-size: 11.5px; font-weight: 700; color: var(--bk-muted); padding: 6px 0; }
.bk-cal-day {
    position: relative;
    aspect-ratio: 1;
    min-height: 40px;
    display: grid; place-items: center;
    border: 0;
    border-radius: var(--bk-r-ctl);
    background: none;
    font-size: 14.5px; font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--bk-text);
    transition: background .15s, color .15s;
}
.bk-cal-day:hover:not([aria-disabled="true"]):not([aria-pressed="true"]) { background: var(--bk-surface-soft); }
.bk-cal-day[aria-disabled="true"] { color: var(--bk-muted); opacity: .38; cursor: default; }
.bk-cal-day.is-today::after { content: ""; position: absolute; inset: 4px; border: 1.5px solid var(--bk-border); border-radius: inherit; pointer-events: none; }
.bk-cal-day.is-available::before {
    content: ""; position: absolute; bottom: 5px; left: 50%;
    width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%;
    background: var(--bk-action);
}
.bk-cal-day.is-full { color: var(--bk-muted); }
.bk-cal-day[aria-pressed="true"] { background: var(--bk-action); color: var(--bk-on-action); }
.bk-cal-day[aria-pressed="true"]::before { background: var(--bk-on-action); }
.bk-cal-day.is-empty { visibility: hidden; }
.bk-cal-legend { display: flex; align-items: center; gap: 6px; margin: 8px 2px 0; font-size: 12.5px; color: var(--bk-muted); }
.bk-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--bk-action); display: inline-block; }

.bk-times[aria-busy="true"] { min-height: 96px; }
.bk-time-group + .bk-time-group { margin-top: 14px; }
.bk-time-group-title { margin: 0 0 8px; font-size: 12.5px; font-weight: 700; color: var(--bk-muted); text-transform: uppercase; letter-spacing: .08em; }
.bk-time-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.bk-no-time-groups .bk-time-group-title { display: none; }
.bk-no-time-groups .bk-time-group + .bk-time-group { margin-top: 8px; }

.bk-time {
    min-height: 46px;
    padding: 10px 6px;
    border: 1.5px solid var(--bk-border);
    border-radius: var(--bk-r-btn);
    background: var(--bk-surface);
    font-weight: 650; font-size: 14.5px;
    font-variant-numeric: tabular-nums;
    transition: border-color .15s, background .15s, color .15s;
}
.bk-time:hover { border-color: rgba(var(--bk-action-rgb), .45); }
.bk-time[aria-pressed="true"] { background: var(--bk-action); border-color: var(--bk-action); color: var(--bk-on-action); }

.bk-skeleton {
    display: block; height: 46px;
    border-radius: var(--bk-r-btn);
    background: linear-gradient(90deg, var(--bk-surface-soft) 0%, var(--bk-surface) 50%, var(--bk-surface-soft) 100%);
    background-size: 200% 100%;
    animation: bk-shimmer 1.2s linear infinite;
}
@keyframes bk-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.bk-link-btn {
    margin-top: 10px; min-height: 44px; padding: 8px 0;
    border: 0; background: none;
    color: var(--bk-ink); font-weight: 650; font-size: 14.5px;
    text-decoration: underline; text-underline-offset: 3px;
}

/* Próximos espacios: chips compactos (2 columnas en celular, grilla fluida desde tablet). */
.bk-next-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; margin-bottom: 10px; }
.bk-next-head .bk-block-title { margin: 0; }
.bk-next-hint { margin: 0; font-size: 12.5px; color: var(--bk-muted); }
.bk-next-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bk-next-item {
    position: relative;
    display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px;
    min-width: 0;
    min-height: 58px;
    padding: 9px 12px;
    border: 1.5px solid var(--bk-border);
    border-radius: var(--bk-r-ctl);
    background: var(--bk-surface);
    color: var(--bk-text);
    text-align: left;
    transition: border-color .15s, background .15s, color .15s, transform .15s var(--bk-ease);
}
.bk-next-item:hover { border-color: rgba(var(--bk-action-rgb), .45); background: var(--bk-surface-soft); }
.bk-next-item:active { transform: scale(.98); }
.bk-next-date { max-width: 100%; font-size: 12.5px; font-weight: 600; color: var(--bk-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-next-time { font-size: 15.5px; font-weight: 750; color: var(--bk-ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bk-next-who { max-width: 100%; font-size: 12px; font-weight: 600; color: var(--bk-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-next-item[aria-pressed="true"] { background: var(--bk-action); border-color: var(--bk-action); color: var(--bk-on-action); }
.bk-next-item[aria-pressed="true"] .bk-next-date,
.bk-next-item[aria-pressed="true"] .bk-next-time,
.bk-next-item[aria-pressed="true"] .bk-next-who { color: var(--bk-on-action); }
.bk-next-skeleton { height: 58px; border-radius: var(--bk-r-ctl); }
.bk-empty-compact { padding: 20px 12px; margin-top: 22px; border: 1px dashed var(--bk-border); border-radius: var(--bk-r-card); }
@media (min-width: 600px) {
    .bk-next-list { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
}

/* ── Paso 3: formulario ──────────────────────────────────────────────────────────────────── */

.bk-form { display: grid; gap: 16px; }
.bk-field { display: grid; gap: 6px; }
.bk-label { font-weight: 650; font-size: 14px; }
.bk-input {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    border: 1.5px solid var(--bk-border);
    border-radius: var(--bk-r-ctl);
    background: var(--bk-surface);
    font-size: 16px; /* evita el zoom automático de iOS */
    transition: border-color .15s, box-shadow .15s;
    appearance: none;
}
.bk-input::placeholder { color: var(--bk-muted); opacity: .8; }
.bk-input:focus { outline: none; border-color: var(--bk-action); box-shadow: 0 0 0 3px rgba(var(--bk-action-rgb), .18); }
.bk-input[aria-invalid="true"] { border-color: #c2410c; }
.bk-hint { margin: 0; color: var(--bk-muted); font-size: 13px; }
.bk-field-error { margin: 0; color: #b42318; font-size: 13.5px; font-weight: 600; }
.bk-dark .bk-field-error { color: #ffb4a8; }

.bk-check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14.5px; min-height: 44px; padding-top: 2px; }
.bk-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bk-check-box {
    flex: none; width: 22px; height: 22px; margin-top: 1px;
    border: 1.5px solid var(--bk-border); border-radius: 6px;
    background: var(--bk-surface);
    display: grid; place-items: center;
    transition: background .15s, border-color .15s;
}
.bk-check input:checked + .bk-check-box { background: var(--bk-action); border-color: var(--bk-action); }
.bk-check input:checked + .bk-check-box::after {
    content: ""; width: 10px; height: 6px; margin-top: -2px;
    border-left: 2.5px solid var(--bk-on-action); border-bottom: 2.5px solid var(--bk-on-action);
    transform: rotate(-45deg);
}
.bk-check input:focus-visible + .bk-check-box { outline: 3px solid rgba(var(--bk-action-rgb), .55); outline-offset: 2px; }

.bk-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.bk-before {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 12px 14px;
    border-radius: var(--bk-r-ctl);
    background: var(--bk-tint);
    color: var(--bk-text);
    font-size: 14.5px;
}
.bk-before svg { flex: none; margin-top: 2px; color: var(--bk-ink); }
.bk-before p { margin: 0; white-space: pre-line; }
.bk-before.is-empty { display: none; }

.bk-legal { margin: 0; font-size: 12.5px; color: var(--bk-muted); }

.bk-error {
    padding: 12px 14px;
    border-radius: var(--bk-r-ctl);
    background: #fdecea; color: #8a1c12;
    font-size: 14.5px; font-weight: 600;
    border: 1px solid #f5c2bc;
}

.bk-deposit {
    display: grid; gap: 12px;
    padding: 16px;
    border-radius: var(--bk-r-card);
    border: 1px solid var(--bk-border);
    background: var(--bk-surface-soft);
}
.bk-deposit-title { margin: 0; font-weight: 700; }
.bk-deposit-rows, .bk-summary-rows, .bk-done-summary { margin: 0; display: grid; gap: 8px; }
.bk-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14.5px; }
.bk-row dt { color: var(--bk-muted); }
.bk-row dd { margin: 0; font-weight: 650; text-align: right; overflow-wrap: anywhere; }
.bk-row-strong dd { font-size: 16px; color: var(--bk-ink); }
.bk-sinpe {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    padding: 12px 14px;
    border-radius: var(--bk-r-ctl);
    background: var(--bk-surface);
    border: 1px dashed var(--bk-border);
}
.bk-sinpe-label { display: block; font-size: 12px; color: var(--bk-muted); font-weight: 600; }
.bk-sinpe-number { display: block; font-size: 20px; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.bk-sinpe-holder { display: block; font-size: 13px; color: var(--bk-muted); }
.bk-deposit-note { margin: 0; font-size: 13px; color: var(--bk-muted); white-space: pre-line; }
.bk-file { font-size: 14px; max-width: 100%; }
.bk-proof { display: grid; gap: 6px; }
.bk-proof-preview { display: flex; align-items: center; gap: 12px; }
.bk-proof-preview img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--bk-r-ctl); border: 1px solid var(--bk-border); }

/* ── Botones ─────────────────────────────────────────────────────────────────────────────── */

.bk-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 50px;
    padding: 12px 20px;
    border: 1.5px solid transparent;
    border-radius: var(--bk-r-btn);
    font-weight: 700; font-size: 15.5px;
    text-decoration: none;
    transition: background .2s, color .2s, border-color .2s, transform .15s var(--bk-ease), box-shadow .2s;
}
.bk-btn:active:not(:disabled) { transform: scale(.985); }
.bk-btn-primary { background: var(--bk-action); color: var(--bk-on-action); box-shadow: 0 8px 20px -10px rgba(var(--bk-action-rgb), .7); }
.bk-btn-primary:hover:not(:disabled) { background: var(--bk-action-hover); }
.bk-btn-primary:disabled { opacity: .42; cursor: not-allowed; box-shadow: none; }
.bk-btn-ghost { background: var(--bk-surface); color: var(--bk-text); border-color: var(--bk-border); }
.bk-btn-ghost:hover { border-color: rgba(var(--bk-action-rgb), .45); }
.bk-btn-sm { min-height: 44px; padding: 8px 14px; font-size: 14px; }
.bk-btn.is-loading { pointer-events: none; }
.bk-btn.is-loading::before {
    content: ""; width: 16px; height: 16px;
    border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
    animation: bk-spin .7s linear infinite;
}
@keyframes bk-spin { to { transform: rotate(360deg); } }

/* ── Resumen (barra inferior en celular, tarjeta lateral en escritorio) ──────────────────── */

.bk-summary {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 30;
    padding: 0 0 env(safe-area-inset-bottom, 0px);
    pointer-events: none;
}
.bk-summary-card {
    pointer-events: auto;
    margin: 0 auto;
    max-width: 720px;
    background: var(--bk-surface);
    border-top: 1px solid var(--bk-border);
    box-shadow: 0 -12px 32px -18px rgba(18, 16, 24, .35);
    padding: 10px var(--bk-gutter) 12px;
    display: grid;
    gap: 10px;
    border-radius: 20px 20px 0 0;
}
.bk-summary-toggle {
    display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 2px 2px;
    border: 0; background: none; text-align: left;
}
/* Hasta dos líneas: en teléfono la HORA elegida (lo último de la línea) no debe cortarse. */
.bk-summary-line {
    font-size: 14px; font-weight: 600; line-height: 1.3; min-width: 0; overflow: hidden;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
    overflow-wrap: anywhere;
}
.bk-summary-price { font-weight: 700; color: var(--bk-ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bk-summary-caret { color: var(--bk-muted); transition: transform .25s var(--bk-ease); }
.bk-summary.is-open .bk-summary-caret { transform: rotate(180deg); }
.bk-summary-details { display: none; max-height: 52vh; overflow: auto; padding: 4px 2px 6px; }
.bk-summary.is-open .bk-summary-details { display: block; animation: bk-enter .25s var(--bk-ease) both; }
.bk-summary-title { margin: 0; font-family: var(--bk-font-heading); font-weight: var(--bk-heading-weight); font-size: calc(20px * var(--bk-heading-scale)); }
.bk-summary-business { margin: 2px 0 12px; color: var(--bk-muted); font-size: 13.5px; }
.bk-row-total { padding-top: 8px; border-top: 1px solid var(--bk-border); }
.bk-row-total dd { font-size: 17px; color: var(--bk-ink); }
.bk-summary-state { margin: 14px 0 0; font-size: 13px; color: var(--bk-muted); display: grid; gap: 6px; justify-items: start; }
.bk-cta { width: 100%; }

@media (max-width: 979.98px) {
    .bk-summary.is-idle { display: none; }
}

.bk-state {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px;
    border-radius: var(--bk-r-chip);
    font-size: 12.5px; font-weight: 700;
}
.bk-state.is-pending { background: #fff4d6; color: #7a4d00; }
.bk-state.is-pending::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #d48a00; }

/* ── Enviada ─────────────────────────────────────────────────────────────────────────────── */

.bk-done { text-align: center; padding: 12px 4px; }
.bk-done-icon {
    display: inline-grid; place-items: center;
    width: 68px; height: 68px; margin-bottom: 14px;
    border-radius: 50%;
    background: var(--bk-action); color: var(--bk-on-action);
    animation: bk-pop .5s var(--bk-ease) both;
}
@keyframes bk-pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.bk-done .bk-state { margin: 10px 0 4px; }
.bk-done-text { margin: 10px auto 0; max-width: 46ch; white-space: pre-line; }
.bk-done-next { margin: 8px auto 18px; max-width: 46ch; color: var(--bk-muted); font-size: 14px; }
.bk-done-summary { max-width: 420px; margin: 0 auto; text-align: left; padding: 14px 16px; border-radius: var(--bk-r-card); background: var(--bk-surface-soft); }

.bk-footer { text-align: center; padding: 8px var(--bk-gutter) 28px; font-size: 12.5px; color: var(--bk-muted); }

/* ── Vista previa / edición directa ──────────────────────────────────────────────────────── */

.bk-editing [data-bk-text] {
    cursor: text;
    border-radius: 6px;
    outline: 1.5px dashed transparent;
    outline-offset: 3px;
    transition: outline-color .15s;
}
.bk-editing [data-bk-text]:hover { outline-color: rgba(var(--bk-action-rgb), .45); }
.bk-editing .bk-hero [data-bk-text]:hover { outline-color: rgba(255, 255, 255, .6); }
.bk-editing [data-bk-text]:focus { outline: 2px solid rgba(var(--bk-action-rgb), .8); }
.bk-editing .bk-before.is-empty { display: flex; opacity: .7; }
.bk-editing [data-bk-optional]:empty::before { content: attr(data-placeholder); color: var(--bk-muted); }
.bk-preview-note {
    position: sticky; top: 0; z-index: 40;
    margin: 0;
    padding: 6px 12px;
    text-align: center;
    font-size: 12px; font-weight: 600;
    background: #111827; color: #f9fafb;
}

/* ── Tablet y escritorio ─────────────────────────────────────────────────────────────────── */

@media (min-width: 600px) {
    :root { --bk-gutter: 24px; }
    .bk-main { padding: 28px 28px 32px; }
    .bk-services { grid-template-columns: repeat(2, 1fr); }
    .bk-services-list .bk-services { grid-template-columns: 1fr; }
    .bk-staff { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
    .bk-hero { padding-top: 40px; }
    .bk-style-premium .bk-hero { padding-bottom: 80px; }
    .bk-logo { width: 84px; height: 84px; font-size: 34px; }
}

@media (min-width: 980px) {
    body.bk-body { padding-bottom: 0; }
    .bk-shell {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 340px;
        gap: 28px;
        align-items: start;
    }
    .bk-main { padding: 32px 36px 40px; }
    .bk-summary { position: sticky; top: 24px; padding: 0; pointer-events: auto; }
    .bk-summary-card {
        max-width: none;
        border: 1px solid var(--bk-border);
        border-radius: var(--bk-r-card);
        box-shadow: var(--bk-shadow);
        padding: 22px;
        gap: 16px;
    }
    .bk-style-minimal .bk-summary-card { box-shadow: none; }
    .bk-summary-toggle { display: none; }
    .bk-summary-details { display: block; max-height: none; overflow: visible; padding: 0; }
    .bk-hero { padding-top: 56px; }
    .bk-style-premium .bk-hero { padding-bottom: 96px; }
    .bk-style-premium .bk-shell { margin-top: -52px; }
    .bk-style-minimal .bk-hero { padding: 40px var(--bk-gutter) 20px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media (forced-colors: active) {
    .bk-service[aria-pressed="true"], .bk-time[aria-pressed="true"], .bk-cal-day[aria-pressed="true"], .bk-person[aria-pressed="true"] { outline: 3px solid Highlight; }
}

/* El calendario no crece más allá de lo cómodo: los días cuadrados se volvían enormes en escritorio. */
@media (min-width: 600px) {
    .bk-calendar { max-width: 440px; }
}
