/**
 * Reservar hora — the base look of the public booking block.
 *
 * Inherits the site's font. The colour is one variable: a site sets its own
 * from "CSS y JavaScript del sitio" with
 *     .bkgw { --bkgw-accent: #b86f5e; }
 * and every button, selected day and chosen option follows. Every class is
 * namespaced (bkgw-*) so the site's own rules never collide with these.
 */

.bkgw {
    /* Room for a sticky site header when a step scrolls back into view. */
    scroll-margin-top: 96px;
    --bkgw-accent: #4f6f63;
    --bkgw-accent-soft: color-mix(in srgb, var(--bkgw-accent) 12%, #fff);
    --bkgw-ink: #2b2723;
    --bkgw-muted: #6b645c;
    --bkgw-line: #e7e2dc;
    --bkgw-surface: #fff;
    --bkgw-soft: #faf8f5;
    --bkgw-radius: 14px;
    color: var(--bkgw-ink);
    max-width: 640px;
    margin: 0 auto;
    text-align: left;
}

.bkgw *, .bkgw *::before, .bkgw *::after { box-sizing: border-box; }

.bkgw-card {
    background: var(--bkgw-surface);
    border: 1px solid var(--bkgw-line);
    border-radius: var(--bkgw-radius);
    padding: 32px;
    box-shadow: 0 8px 24px rgba(43, 39, 35, .06);
}

.bkgw-title { font-size: 1.375rem; font-weight: 600; line-height: 1.3; margin: 0 0 8px; color: var(--bkgw-ink); }
.bkgw-muted { color: var(--bkgw-muted); margin: 0; }
.bkgw-summary { color: var(--bkgw-muted); margin: 0 0 24px; font-size: .9375rem; }

/* --- steps -------------------------------------------------------------- */

.bkgw-steps { display: flex; gap: 8px; margin: 0 0 24px; }
.bkgw-steps span {
    flex: 1;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--bkgw-muted);
    padding-top: 8px;
    border-top: 3px solid var(--bkgw-line);
}
.bkgw-steps .is-done { border-top-color: color-mix(in srgb, var(--bkgw-accent) 45%, #fff); }
.bkgw-steps .is-active { border-top-color: var(--bkgw-accent); color: var(--bkgw-ink); }

.bkgw-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    margin: -8px 0 8px -8px;
    padding: 0 8px;
    border: 0;
    background: none;
    color: var(--bkgw-muted);
    font: inherit;
    font-size: .9375rem;
    cursor: pointer;
    border-radius: 8px;
}
.bkgw-back:hover { color: var(--bkgw-ink); }

/* --- option lists (service, professional) --------------------------------- */

.bkgw-list { display: flex; flex-direction: column; gap: 12px; }

.bkgw-option {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    min-height: 64px;
    padding: 16px 20px;
    border: 1px solid var(--bkgw-line);
    border-radius: 12px;
    background: var(--bkgw-surface);
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}
.bkgw-option:hover { border-color: var(--bkgw-accent); background: var(--bkgw-soft); }
.bkgw-option > i { color: var(--bkgw-muted); flex-shrink: 0; }
.bkgw-option-body { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.bkgw-option-title { font-weight: 600; font-size: 1rem; }
.bkgw-option-help { color: var(--bkgw-muted); font-size: .9375rem; line-height: 1.45; }
.bkgw-option-meta { color: var(--bkgw-muted); font-size: .875rem; }

/* --- calendar ------------------------------------------------------------- */

.bkgw-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.bkgw-cal-head strong { font-size: 1.0625rem; }

.bkgw-nav {
    width: 44px;
    height: 44px;
    border: 1px solid var(--bkgw-line);
    border-radius: 50%;
    background: var(--bkgw-surface);
    color: var(--bkgw-ink);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.bkgw-nav:disabled { opacity: .35; cursor: default; }

.bkgw-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.bkgw-dow { text-align: center; font-size: .75rem; font-weight: 600; color: var(--bkgw-muted); padding: 4px 0; }

.bkgw-day {
    /* Fixed height, not square: at desktop width a square cell is 80 px and
       the month alone fills the screen. */
    height: 48px;
    border: 0;
    border-radius: 10px;
    background: none;
    color: #b5aea6;
    font: inherit;
    font-size: .9375rem;
}
.bkgw-day.is-free {
    background: var(--bkgw-accent-soft);
    color: var(--bkgw-ink);
    font-weight: 600;
    cursor: pointer;
    transition: background-color .15s ease;
}
.bkgw-day.is-free:hover { background: color-mix(in srgb, var(--bkgw-accent) 24%, #fff); }
.bkgw-day.is-selected, .bkgw-day.is-selected:hover { background: var(--bkgw-accent); color: #fff; }
.bkgw-empty { margin-top: 16px; }

.bkgw-slots:not(:empty) { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--bkgw-line); }
.bkgw-slots-title { font-weight: 600; margin: 0 0 12px; }
.bkgw-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.bkgw-chip {
    min-height: 44px;
    border: 1px solid var(--bkgw-line);
    border-radius: 10px;
    background: var(--bkgw-surface);
    color: var(--bkgw-ink);
    font: inherit;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}
.bkgw-chip:hover { border-color: var(--bkgw-accent); background: var(--bkgw-accent-soft); }

/* --- form ----------------------------------------------------------------- */

.bkgw-form { display: flex; flex-direction: column; gap: 16px; }
.bkgw-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.bkgw-field { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.bkgw-label { font-weight: 600; font-size: .9375rem; padding: 0; }
.bkgw-label .bkgw-muted { font-weight: 400; }
/* A legend ignores its fieldset's gap, so it carries its own space. */
legend.bkgw-label { margin-bottom: 8px; float: none; width: auto; font-size: .9375rem; line-height: 1.5; }

.bkgw-input {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid #d6cfc7;
    border-radius: 10px;
    background: var(--bkgw-surface);
    color: var(--bkgw-ink);
    font: inherit;
    font-size: 1rem;
}
textarea.bkgw-input { min-height: 96px; resize: vertical; }
.bkgw-input:focus { outline: none; border-color: var(--bkgw-accent); box-shadow: 0 0 0 3px var(--bkgw-accent-soft); }

.bkgw-choices { display: flex; flex-direction: column; gap: 8px; }
.bkgw-choice {
    position: relative;
    display: block;
    padding: 16px 16px 16px 52px;
    border: 1px solid var(--bkgw-line);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}
.bkgw-choice input { position: absolute; opacity: 0; pointer-events: none; }
.bkgw-choice::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 50%;
    width: 22px;
    height: 22px;
    margin-top: -11px;
    border: 2px solid #cfc7be;
    border-radius: 50%;
    background: #fff;
}
.bkgw-choice:has(input:checked) { border-color: var(--bkgw-accent); background: var(--bkgw-accent-soft); }
.bkgw-choice:has(input:checked)::before {
    border-color: var(--bkgw-accent);
    background: var(--bkgw-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'%3E%3Cpath d='M13.5 4.5 6.5 11.5 3 8l1-1 2.5 2.5 6-6z'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.bkgw-choice:has(input:focus-visible) { outline: 2px solid var(--bkgw-accent); outline-offset: 2px; }
.bkgw-choice-body { display: flex; flex-direction: column; gap: 4px; }
.bkgw-choice-title { font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.bkgw-choice-title i { color: var(--bkgw-accent); }
.bkgw-choice-help { color: var(--bkgw-muted); font-size: .9375rem; }

.bkgw-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.bkgw-submit {
    min-height: 52px;
    margin-top: 8px;
    border: 0;
    border-radius: 12px;
    background: var(--bkgw-accent);
    color: #fff;
    font: inherit;
    font-size: 1.0625rem;
    font-weight: 600;
    cursor: pointer;
    transition: filter .15s ease;
}
.bkgw-submit:hover { filter: brightness(.93); }
.bkgw-submit:disabled { opacity: .7; cursor: progress; }

.bkgw-alert {
    background: #fdf1ef;
    color: #8a2f22;
    border-radius: 10px;
    padding: 12px 16px;
    margin: 0 0 16px;
}

/* --- done ----------------------------------------------------------------- */

.bkgw-done { text-align: center; }
.bkgw-done-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    border-radius: 50%;
    background: var(--bkgw-accent-soft);
    color: var(--bkgw-accent);
    font-size: 1.75rem;
}
.bkgw-when { margin: 8px 0 24px; line-height: 1.6; }
.bkgw-note {
    text-align: left;
    background: var(--bkgw-soft);
    border-radius: 12px;
    padding: 16px;
    margin: 0 0 24px;
}
.bkgw-pre { display: block; white-space: pre-line; margin-top: 8px; }
.bkgw-link { color: var(--bkgw-accent); font-weight: 600; }

/* --- shared --------------------------------------------------------------- */

.bkgw-slots { scroll-margin-bottom: 16px; }

.bkgw button:focus-visible { outline: 2px solid var(--bkgw-accent); outline-offset: 2px; }

@media (max-width: 575px) {
    .bkgw-card { padding: 24px 16px; border-radius: 12px; }
    .bkgw-row { grid-template-columns: 1fr; }
    .bkgw-steps span { font-size: .75rem; } /* 11 px was below a readable minimum */
}

@media (prefers-reduced-motion: reduce) {
    .bkgw * { transition: none !important; }
}

/* Seats left on a workshop date: calm by default, warm when few, muted when full. */
.bkgw-seats{display:inline-block;margin-top:6px;font-size:.8rem;font-weight:600;color:var(--bkgw-accent,#0d6efd)}
.bkgw-seats.is-few{color:#9a5b00}
.bkgw-seats.is-full{color:#6b7280}
.bkgw-option[disabled]{opacity:.55;cursor:not-allowed}

/* ------------------------------------------------------------------------
 * "Próximo encuentro" and "Actividades grupales" (booking-sessions-embed.js).
 * Same idea: one accent variable, every class namespaced (bkgn-*, bkgc-*),
 * and the site's font and colours inherited. A site restyles them freely.
 * ------------------------------------------------------------------------ */

.bkgn, .bkgc {
    --bkgw-accent: #4f6f63;
    --bkgw-on-accent: #fff;
    --bkgw-ink: #2b2723;
    --bkgw-muted: #6b645c;
    --bkgw-line: #e7e2dc;
    --bkgw-surface: #fff;
    text-align: left;
}
.bkgn *, .bkgc * { box-sizing: border-box; }
.bkgn[hidden] { display: none; }

.bkgn-eyebrow { margin: 0; font-size: .8125rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--bkgw-muted); }
.bkgn-title { margin: 10px 0 0; font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem); line-height: 1.08; color: var(--bkgw-ink); }
.bkgn-text { margin: 16px 0 0; max-width: 54ch; line-height: 1.7; color: var(--bkgw-ink); }
.bkgn-when { display: inline-flex; align-items: center; gap: 10px; margin: 20px 0 0; padding: 8px 16px;
    border-radius: 999px; background: var(--bkgw-surface); border: 1px solid var(--bkgw-line); font-size: .9375rem; color: var(--bkgw-ink); }
.bkgn-when i { color: var(--bkgw-accent); }
.bkgn-label { margin: 24px 0 0; font-size: .8125rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--bkgw-muted); }
.bkgn-count { display: flex; gap: 8px; margin-top: 10px; }
.bkgn-unit { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 64px; padding: 10px 8px;
    border-radius: 12px; background: var(--bkgw-surface); border: 1px solid var(--bkgw-line); }
.bkgn-unit b { font-size: 1.5rem; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--bkgw-ink); }
.bkgn-unit small { margin-top: 2px; font-size: .75rem; color: var(--bkgw-muted); }
.bkgn-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 24px; }
.bkgn-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 28px;
    border-radius: 999px; background: var(--bkgw-accent); color: var(--bkgw-on-accent); font-weight: 600; text-decoration: none;
    transition: filter .18s ease; }
.bkgn-btn:hover { filter: brightness(.95); color: var(--bkgw-on-accent); }
.bkgn-seats { font-size: .9375rem; color: var(--bkgw-muted); }
.bkgn-seats.is-few { color: var(--bkgw-ink); font-weight: 600; }

.bkgc-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--bkgw-line); }
.bkgc-item { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--bkgw-line); }
.bkgc-date { flex: 0 0 56px; display: flex; flex-direction: column; align-items: center; padding: 6px 0;
    border-radius: 12px; background: var(--bkgw-surface); border: 1px solid var(--bkgw-line); }
.bkgc-date b { font-size: 1.375rem; line-height: 1.1; color: var(--bkgw-ink); }
.bkgc-date small { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--bkgw-muted); }
.bkgc-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bkgc-title { font-weight: 600; color: var(--bkgw-ink); line-height: 1.35; }
.bkgc-meta { font-size: .9375rem; color: var(--bkgw-muted); }
.bkgc-seats { font-size: .875rem; color: var(--bkgw-muted); }
.bkgc-seats.is-few { color: var(--bkgw-ink); font-weight: 600; }
.bkgc-btn { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 44px; padding: 10px 20px; border-radius: 999px;
    border: 1.5px solid var(--bkgw-accent); color: var(--bkgw-ink); font-weight: 600; text-decoration: none; transition: background-color .18s ease; }
.bkgc-btn:hover { background: var(--bkgw-accent); color: var(--bkgw-on-accent); }
.bkgc-empty { margin: 0; padding: 16px 0; color: var(--bkgw-muted); }
@media (max-width: 575.98px) {
    .bkgn-unit { min-width: 0; flex: 1 1 0; }
    .bkgc-item { flex-wrap: wrap; }
    .bkgc-btn { margin-left: 72px; }
}
