/* ════════════════════════════════════════════════
   CBv2 – Mobile-First Stundenplan-Formular
   Shared stylesheet — reached from the suite via the shared/ junction.

   Every colour goes through the --cbtt-* design tokens (core/design/
   design_tokens.php, markdowns/plugin/DESIGN-SYSTEM.md) so this form matches
   the classic grid (assets/css/frontend.css) and the rest of the suite under
   the active design. Fallback convention for THIS file: exactly one literal
   per token, always the Solver-Blue palette value — the fallbacks are what
   renders under the 'theme' preset (no palette printed) and on a third-party
   theme, so a second value for the same token would show up as two different
   blues on one page. Slot states use the grid's own tokens (--cbtt-available,
   --cbtt-preferred, --cbtt-possible*), never the status families: status
   colours mark status, not categories.
════════════════════════════════════════════════ */

/* ─── Fullscreen modal ─────────────────────── */
#cbv2-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 100000;
    background: var(--cbtt-surface, #fff);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
#cbv2-modal.cbv2-modal-open {
    display: block;
}
body.cbv2-modal-active {
    overflow: hidden;
}

#cbv2-modal-close {
    position: sticky;
    top: 0.75rem;
    float: right;
    margin: 0.75rem 0.75rem 0 0;
    z-index: 10001;
    background: var(--cbtt-surface-alt, #f7f3ec);
    border: none;
    border-radius: 50%;
    width: 36px; height: 36px;
    font-size: 1rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--cbtt-body, #4a5262);
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    transition: background 0.15s;
}
#cbv2-modal-close:hover { background: var(--cbtt-border-soft, #f0ebe1); }

/* Anchor spans – invisible, used as scroll targets */
.cbv2-step-anchor {
    display: block;
    height: 0;
    visibility: hidden;
}

#cbv2-app {
    max-width: 680px;
    margin: 0 auto;
    padding: 1rem 1rem 7rem;
    font-family: var(--cbtt-font-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
    clear: both;
}

/* Steps */
.cbv2-step { animation: cbv2-fadein 0.25s ease-out; }
@keyframes cbv2-fadein {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.cbv2-step-header h2 { font-size: 1.3rem; margin: 0 0 0.4rem; }
.cbv2-step-header p  { color: var(--cbtt-body, #4a5262); margin: 0 0 1.25rem; }

/* Week badge */
.cbv2-week-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--cbtt-primary, #003f86);
    color: var(--cbtt-on-primary, #fff);
    border-radius: 6px;
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.cbv2-week-date { color: var(--cbtt-muted, #7c8494); font-weight: 400; }

/* Option buttons */
.cbv2-btn-group { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1rem; }
.cbv2-option-btn {
    position: relative;
    padding: 0.7rem 1.3rem;
    border: 2px solid var(--cbtt-border, #e6e1d7);
    border-radius: 10px;
    background: var(--cbtt-surface, #fff);
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.1s;
    min-width: 4.5rem;
    text-align: center;
}
.cbv2-option-btn:active { transform: scale(0.95); }
.cbv2-option-btn.cbv2-selected {
    border-color: var(--cbtt-primary, #003f86);
    background: var(--cbtt-surface-alt, #f7f3ec);
    color: var(--cbtt-primary, #003f86);
    font-weight: 600;
}
/* "Recommended" marker = teal accent ("here"), not a status colour. */
.cbv2-option-btn.cbv2-popular { border-color: var(--cbtt-accent, #0193aa); }

/* Pause — deliberately separated from the lesson-count options so it can't be
   mistaken for "zero, I'll pick a number later". Full-width, muted, secondary. */
.cbv2-pause-separator {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--cbtt-muted, #7c8494);
    font-size: 0.85rem;
    margin: 1.25rem 0 0.75rem;
}
.cbv2-pause-separator::before,
.cbv2-pause-separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--cbtt-border-soft, #f0ebe1);
}
.cbv2-pause-separator span { padding: 0 0.75rem; }
.cbv2-pause-wrap { margin-bottom: 1rem; }
.cbv2-pause-btn {
    display: block;
    width: 100%;
    padding: 0.7rem 1rem;
    background: var(--cbtt-surface-alt, #f7f3ec);
    border: 1px dashed var(--cbtt-muted, #7c8494);
    border-radius: 8px;
    color: var(--cbtt-muted, #7c8494);
    font-size: 0.95rem;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}
.cbv2-pause-btn:hover { background: var(--cbtt-border-soft, #f0ebe1); color: var(--cbtt-body, #4a5262); }
.cbv2-pause-btn.cbv2-pause-btn-selected {
    border-style: solid;
    border-color: var(--cbtt-muted, #7c8494);
    background: var(--cbtt-border-soft, #f0ebe1);
    color: var(--cbtt-ink, #1f2733);
    font-weight: 600;
}

/* Star badge */
.cbv2-star-badge {
    position: absolute;
    top: -9px; right: -7px;
    background: var(--cbtt-accent, #0193aa);
    color: var(--cbtt-on-primary, #fff);
    border-radius: 50%;
    width: 20px; height: 20px;
    font-size: 11px;
    display: flex; align-items: center; justify-content: center;
}

/* Legend */
.cbv2-popular-legend { color: var(--cbtt-muted, #7c8494); margin-bottom: 1rem; }
.cbv2-legend-large   { font-size: 1rem; font-weight: 500; }
.cbv2-star-inline    { color: var(--cbtt-accent-ink, #086b7e); }

/* Explanation / notices */
.cbv2-explanation {
    background: var(--cbtt-surface-alt, #f7f3ec);
    border-left: 4px solid var(--cbtt-primary, #003f86);
    padding: 1.25rem 1.5rem;
    border-radius: 0 6px 6px 0;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: var(--cbtt-primary, #003f86);
}
.cbv2-pause-notice {
    background: var(--cbtt-surface-alt, #f7f3ec);
    border-left: 4px solid var(--cbtt-muted, #7c8494);
    padding: 0.75rem 1rem;
    border-radius: 0 6px 6px 0;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--cbtt-body, #4a5262);
}

/* Navigation */
.cbv2-step-nav { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.5rem; align-items: center; }
.cbv2-step-nav-single { justify-content: flex-end; }
.cbv2-btn-next, .cbv2-btn-submit {
    background: var(--cbtt-primary, #003f86); color: var(--cbtt-on-primary, #fff); border: none;
    border-radius: 8px; padding: 0.75rem 1.5rem;
    font-size: 1rem; cursor: pointer; font-weight: 600;
    transition: background 0.15s, transform 0.1s;
}
/* Disabled = the same primary, faded — one blue, not a second lighter one. */
.cbv2-btn-next:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.cbv2-next-wrap { display: inline-block; cursor: not-allowed; }
.cbv2-btn-next:not(:disabled):hover { background: var(--cbtt-primary-hover, #002b57); }
.cbv2-btn-next:not(:disabled):active { transform: scale(0.97); }
/* cbtt-ui secondary recipe: surface + 1px border + text ink. */
.cbv2-btn-back {
    background: var(--cbtt-surface, #fff); color: var(--cbtt-text, #1f2733);
    border: 1px solid var(--cbtt-border, #e6e1d7);
    border-radius: 8px; padding: 0.75rem 1.25rem; font-size: 1rem; cursor: pointer;
}
.cbv2-btn-back:hover { background: var(--cbtt-surface-alt, #f7f3ec); }
.cbv2-btn-skip {
    background: none; border: none; color: var(--cbtt-muted, #7c8494);
    font-size: 0.875rem; cursor: pointer; text-decoration: underline; padding: 0.5rem 0;
}
.cbv2-btn-secondary {
    background: var(--cbtt-surface-alt, #f7f3ec); color: var(--cbtt-body, #4a5262);
    border: 1px solid var(--cbtt-border, #e6e1d7); border-radius: 8px;
    padding: 0.75rem 1.25rem; font-size: 0.9rem; cursor: pointer;
    text-decoration: none;
}
.cbv2-btn-secondary:hover { background: var(--cbtt-border-soft, #f0ebe1); }
.cbv2-btn-undo {
    background: var(--cbtt-surface, #fff); color: var(--cbtt-text, #1f2733);
    border: 1px solid var(--cbtt-border, #e6e1d7); border-radius: 8px;
    padding: 0.65rem 1.1rem; font-size: 0.9rem; cursor: pointer;
}
/* Submit is the ONE primary CTA of the review step — navy like Next, not a
   status green. */
.cbv2-btn-submit {
    font-size: 1.05rem; padding: 0.85rem 2rem;
}
.cbv2-btn-submit:disabled { opacity: 0.45; cursor: not-allowed; }
.cbv2-btn-submit:not(:disabled):hover { background: var(--cbtt-primary-hover, #002b57); }
/* Transient "saved" states set by frontend_v2.js after a successful AJAX
   save (the button stays disabled, so the :disabled variants are needed). */
.cbv2-btn-next.cbv2-saved-pause,
.cbv2-btn-next.cbv2-saved-pause:disabled {
    background: var(--cbtt-muted, #7c8494); color: var(--cbtt-on-primary, #fff); opacity: 1;
}
.cbv2-btn-submit.cbv2-saved,
.cbv2-btn-submit.cbv2-saved:disabled {
    background: var(--cbtt-success, #1f8f5f); color: var(--cbtt-on-primary, #fff); opacity: 1;
}
.cbv2-muted { color: var(--cbtt-muted, #7c8494); }

/* [cbtt_open_btn] shortcode trigger button — sits outside #cbv2-modal, in
   .cbtt-open-btn-wrap, so the --cbtt-* tokens are still in scope. Kept
   separate from .cbv2-modal-open-btn, which is only a jQuery click-delegation
   hook (frontend_v2.js) also applied to the unrelated "Make changes" summary
   button, which must keep its own .cbv2-btn-secondary look. */
.cbv2-open-btn {
    background: var(--cbtt-primary, #003f86);
    color: var(--cbtt-on-primary, #fff);
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 600;
    margin-top: 1rem;
}
.cbv2-open-btn:disabled {
    background: var(--cbtt-border, #e6e1d7);
    color: var(--cbtt-muted, #7c8494);
    cursor: not-allowed;
    opacity: 0.7;
}

/* Phase labels — coloured like the slot state each phase collects
   (phase 1 = available, phase 2 = preferred), ink text on both. */
.cbv2-phase-label {
    display: inline-block; border-radius: 20px;
    padding: 0.3rem 1rem; font-size: 0.85rem; font-weight: 700;
    letter-spacing: 0.03em; margin-bottom: 0.75rem;
}
.cbv2-phase-1-label { background: var(--cbtt-available, #f4c430); color: var(--cbtt-ink, #1f2733); }
.cbv2-phase-2-label { background: var(--cbtt-preferred, #7fd9c4); color: var(--cbtt-ink, #1f2733); }
.cbv2-phase2-intro  { color: var(--cbtt-body, #4a5262); margin-bottom: 1rem; }

/* Ghost hint bar */
.cbv2-ghost-hint {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.8rem; color: var(--cbtt-muted, #7c8494);
    padding: 0.4rem 0.75rem; margin-bottom: 0.5rem;
    background: var(--cbtt-surface-alt, #f7f3ec); border: 1px dashed var(--cbtt-border, #e6e1d7); border-radius: 6px;
}
.cbv2-ghost-swatch {
    display: inline-block; width: 1.1rem; height: 1.1rem;
    border-radius: 3px; opacity: 0.4; flex-shrink: 0;
}
.cbv2-ghost-swatch-available { background: var(--cbtt-available, #f4c430); border: 1px solid var(--cbtt-available, #f4c430); }
.cbv2-ghost-swatch-preferred { background: var(--cbtt-preferred, #7fd9c4); border: 1px solid var(--cbtt-preferred, #7fd9c4); }

/* Location legend */
.cbv2-legend-box {
    background: var(--cbtt-surface-alt, #f7f3ec); border: 1px solid var(--cbtt-border-soft, #f0ebe1);
    border-radius: 8px; padding: 0.5rem 1rem;
    margin-bottom: 0.75rem; font-size: 0.85rem;
}
.cbv2-location-legend { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.cbv2-loc-item   { display: flex; align-items: center; gap: 0.4rem; }
.cbv2-loc-color-bar {
    display: inline-block;
    width: 4px; height: 20px;
    border-left: 4px solid var(--cbtt-border, #e6e1d7);
    border-radius: 2px;
    flex-shrink: 0;
}

/* ─── Multi-column slot grid ─────────────────── */
#cbv2-slots-column-wrapper,
#cbv2-phase2-column-wrapper {
    border: 1px solid var(--cbtt-border-soft, #f0ebe1);
    border-radius: 10px;
    padding: 0.25rem;
    margin-bottom: 0.5rem;
    background: var(--cbtt-surface-alt, #f7f3ec);
    /* No overflow/scroll – columns fill viewport height */
}

/* Grid container: columns sit side by side */
.cbv2-multicol-grid {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
}

/* Each column takes equal width */
.cbv2-mc-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.cbv2-slot-row {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.1rem 0.2rem;
    border-radius: 5px;
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
    transition: background 0.07s;
    min-height: 36px;
}
.cbv2-slot-row:hover { background: rgba(0,0,0,0.04); }

.cbv2-slot-row-time {
    width: 2.4rem;
    font-size: 0.68rem;
    color: var(--cbtt-muted, #7c8494);
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    padding-right: 0.1rem;
}

.cbv2-slot-row-block {
    flex: 1;
    min-width: 0;
    height: 32px;
    border-radius: 5px;
    border: 2px solid var(--cbtt-border-soft, #f0ebe1);
    background: var(--cbtt-surface-alt, #f7f3ec);
    transition: background 0.1s, border-color 0.1s;
    position: relative;
}

/* States */
.cbv2-slot-row-block.cbv2-sel-available {
    background: var(--cbtt-available, #f4c430); border-color: var(--cbtt-available, #f4c430);
}
.cbv2-slot-row-block.cbv2-bounce-tmp {
    animation: cbv2-bounce 0.18s ease-out;
}
.cbv2-slot-row-block.cbv2-sel-preferred {
    background: var(--cbtt-preferred, #7fd9c4); border-color: var(--cbtt-preferred, #7fd9c4);
}
/* "possible" (not upgraded in phase 2) — its own grid-state token family like
   --cbtt-available/--cbtt-preferred; printed by the palette since 2026-08-29
   (cbtt_suite_design_palettes()), the fallbacks are the Solver-Blue values. */
.cbv2-slot-row-block.cbv2-sel-possible {
    background: var(--cbtt-possible, #fbbf24); border-color: var(--cbtt-possible-border, #d97706);
}
.cbv2-slot-row-block.cbv2-unavail {
    background: var(--cbtt-border-soft, #f0ebe1); border-color: var(--cbtt-border, #e6e1d7);
    opacity: 0.7;
}
/* Ghost: previous submission shown faintly, not selected */
.cbv2-slot-row-block.cbv2-ghost {
    opacity: 0.35;
}
.cbv2-slot-row-block.cbv2-ghost-available {
    background: var(--cbtt-available, #f4c430); border-color: var(--cbtt-available, #f4c430);
}
.cbv2-slot-row-block.cbv2-ghost-preferred {
    background: var(--cbtt-preferred, #7fd9c4); border-color: var(--cbtt-preferred, #7fd9c4);
}
@keyframes cbv2-ghost-pulse {
    0%   { opacity: 0.35; transform: scaleX(1); }
    30%  { opacity: 0.9;  transform: scaleX(1.06); }
    70%  { opacity: 0.9;  transform: scaleX(1.06); }
    100% { opacity: 0.35; transform: scaleX(1); }
}
.cbv2-slot-row-block.cbv2-ghost-pulse {
    animation: cbv2-ghost-pulse 0.75s ease-in-out;
}
/* Surcharge euro sign */
.cbv2-slot-row-block.cbv2-surcharge::after {
    content: '€';
    position: absolute; top: 1px; right: 3px;
    font-size: 0.55rem; color: var(--cbtt-ink, #1f2733); font-weight: bold;
}

/* Day counter badge */
.cbv2-day-counter {
    font-size: 0.75rem; color: var(--cbtt-muted, #7c8494); font-weight: 400;
    margin-left: 0.4rem;
}

/* Slot step day title */
.cbv2-slots-day-title {
    font-size: 1.6rem;
    font-weight: 700;
    text-align: center;
    margin: 0.1rem 0 0.5rem;
}
@keyframes cbv2-day-pulse {
    0%   { transform: scale(1);    opacity: 1; }
    40%  { transform: scale(1.12); opacity: 0.85; }
    100% { transform: scale(1);    opacity: 1; }
}
.cbv2-day-title-pulse {
    display: inline-block;
    animation: cbv2-day-pulse 0.6s ease-out;
}

/* Phase-2 intro explain box — a neutral explanation card, not a status. */
.cbv2-phase2-explain-box {
    background: var(--cbtt-surface-alt, #f7f3ec);
    border: 1px solid var(--cbtt-border, #e6e1d7);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    line-height: 1.6;
}
.cbv2-phase2-explain-box p { margin: 0 0 0.6rem; }
.cbv2-phase2-explain-box p:last-child { margin-bottom: 0; }
.cbv2-phase2-intro-hint { color: var(--cbtt-body, #4a5262); margin-bottom: 1rem; font-size: 0.875rem; }

/* Colour demo dots for phase-2 intro */
.cbv2-color-demo {
    display: inline-block;
    width: 14px; height: 14px;
    border-radius: 3px;
    vertical-align: middle;
    margin-right: 3px;
}
.cbv2-color-blue   { background: var(--cbtt-available, #f4c430); }
.cbv2-color-green  { background: var(--cbtt-preferred, #7fd9c4); }
.cbv2-color-yellow { background: var(--cbtt-possible, #fbbf24); }

/* Review blocks — slot pills carry the slot-state colours (available /
   preferred / possible); the confirm/done variants are real states. */
.cbv2-review-day {
    display: flex; align-items: center; flex-wrap: wrap;
    gap: 0.4rem; margin-bottom: 0.5rem; font-size: 0.88rem;
}
.cbv2-review-day-label { min-width: 5rem; }
.cbv2-review-blocks { display: inline-flex; flex-wrap: wrap; gap: 0.35rem; }
.cbv2-review-block {
    background: var(--cbtt-available, #f4c430); color: var(--cbtt-ink, #1f2733);
    border-radius: 5px; padding: 0.15rem 0.5rem;
    font-size: 0.8rem; font-variant-numeric: tabular-nums;
}
.cbv2-review-block-confirm {
    cursor: pointer;
    border: 2px dashed var(--cbtt-error, #c4443a);
    background: var(--cbtt-error-tint, #fbe3e0); color: var(--cbtt-error-ink, #992e26);
    display: inline-flex; align-items: center; gap: 0.3rem;
    transition: background 0.15s, border-color 0.15s;
}
.cbv2-review-block-confirm:hover { filter: brightness(0.96); }
.cbv2-review-block-x {
    font-size: 0.75rem; font-weight: 700;
    color: var(--cbtt-error, #c4443a);
}
.cbv2-review-block-done {
    background: var(--cbtt-success-tint, #e4f3ec); color: var(--cbtt-success-ink, #166b46);
    border: 2px solid var(--cbtt-success, #1f8f5f);
    cursor: default;
}
.cbv2-review-block-done .cbv2-review-block-x {
    color: var(--cbtt-success, #1f8f5f);
}
.cbv2-review-card-dummy {
    border: 2px dashed var(--cbtt-border-soft, #f0ebe1);
    background: var(--cbtt-surface-alt, #f7f3ec);
    opacity: 0.8;
}
.cbv2-review-hint {
    font-size: 0.85rem; color: var(--cbtt-muted, #7c8494);
    margin: 0 0 0.75rem; font-weight: 500;
}

@keyframes cbv2-bounce {
    0%   { transform: scaleX(1); }
    40%  { transform: scaleX(1.04); }
    100% { transform: scaleX(1); }
}

/* Invalid pulse */
@keyframes cbv2-pulse-red {
    0%,100% { outline: 3px solid var(--cbtt-error, #c4443a); outline-offset: -2px; }
    50%      { outline: 3px solid var(--cbtt-error-ink, #992e26); opacity: 0.5; }
}
.cbv2-invalid { animation: cbv2-pulse-red 0.6s ease-in-out infinite !important; }

/* ─── Progress Bar ──────────────────────────── */
#cbv2-progress-container {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--cbtt-surface, #fff); border-top: 1px solid var(--cbtt-border-soft, #f0ebe1);
    padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom, 0px));
    z-index: 100001; box-shadow: 0 -2px 8px rgba(0,0,0,0.08);
}
#cbv2-progress-track {
    position: relative; height: 16px;
    background: var(--cbtt-surface-alt, #f7f3ec); border-radius: 8px; overflow: hidden;
}
#cbv2-progress-fill {
    height: 100%;
    /* Flattened from a blue->green linear-gradient: brand gradients are not
       permitted (they'd clash across design presets); solid primary matches
       the buttons/badges the rest of this step flow already uses. */
    background: var(--cbtt-primary, #003f86);
    border-radius: 8px;
    transition: width 0.4s cubic-bezier(.34,1.56,.64,1);
    width: 0%;
}
#cbv2-progress-segments {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    display: flex; pointer-events: none;
}
.cbv2-seg { height: 100%; border-right: 2px solid rgba(255,255,255,0.6); box-sizing: border-box; }
.cbv2-seg:last-child { border-right: none; }
.cbv2-seg.cbv2-seg-locked {
    background: repeating-linear-gradient(
        135deg, rgba(0,0,0,0.05) 0px, rgba(0,0,0,0.05) 4px, transparent 4px, transparent 8px
    );
}
#cbv2-progress-label { font-size: 0.75rem; color: var(--cbtt-muted, #7c8494); margin-top: 0.3rem; text-align: center; }
#cbv2-milestone-popup {
    position: fixed; bottom: 5rem; left: 50%;
    transform: translateX(-50%); background: var(--cbtt-ink, #1f2733); color: var(--cbtt-white, #fff);
    border-radius: 10px; padding: 0.5rem 1rem; font-size: 0.9rem;
    white-space: nowrap; animation: cbv2-popup-in 0.3s ease-out; z-index: 10100;
}
/* Coupon code inside the dark popup: the grid's gold token reads as the
   highlight there (warning-ink would vanish on the ink background). */
.cbv2-milestone-coupon { color: var(--cbtt-available, #f4c430); margin-left: .4rem; }
@keyframes cbv2-popup-in {
    from { opacity: 0; transform: translateX(-50%) translateY(8px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ─── Validation Modal (an error state, so the error family is right) ─── */
#cbv2-validation-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.5); z-index: 9999;
    align-items: center; justify-content: center;
}
#cbv2-validation-overlay.cbv2-visible { display: flex; }
#cbv2-validation-modal {
    background: var(--cbtt-surface, #fff); border-radius: 12px; padding: 2rem;
    max-width: 400px; width: 90%; text-align: center;
    animation: cbv2-modal-in 0.2s ease-out;
}
@keyframes cbv2-modal-in {
    from { transform: scale(0.85); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}
#cbv2-validation-icon { font-size: 2.5rem; }
#cbv2-validation-title { color: var(--cbtt-error-ink, #992e26); margin: 0.5rem 0 0.75rem; }
#cbv2-validation-close {
    background: var(--cbtt-error, #c4443a); color: var(--cbtt-on-primary, #fff); border: none;
    border-radius: 6px; padding: 0.6rem 1.5rem; cursor: pointer; font-size: 0.95rem;
}
#cbv2-validation-delete {
    background: var(--cbtt-surface, #fff); color: var(--cbtt-error-ink, #992e26); border: 2px solid var(--cbtt-error, #c4443a);
    border-radius: 6px; padding: 0.6rem 1.5rem; cursor: pointer; font-size: 0.95rem; font-weight: 600;
}
#cbv2-validation-delete:hover { background: var(--cbtt-error-tint, #fbe3e0); }

/* ─── Review cards ──────────────────────────── */
#cbv2-review-content { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.5rem; }
.cbv2-review-card {
    background: var(--cbtt-surface-alt, #f7f3ec); border: 1px solid var(--cbtt-border-soft, #f0ebe1);
    border-radius: 10px; padding: 1rem;
}
.cbv2-review-card-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 0.6rem;
}
.cbv2-review-card h4 { margin: 0; color: var(--cbtt-ink, #1f2733); font-size: 0.95rem; }
.cbv2-edit-link {
    background: none; border: none; padding: 0.15rem 0.5rem;
    font-size: 0.8rem; color: var(--cbtt-primary, #003f86); cursor: pointer;
    text-decoration: underline; font-weight: 500; flex-shrink: 0;
}
.cbv2-edit-link:hover { color: var(--cbtt-primary-hover, #002b57); }
.cbv2-review-slot-list { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.cbv2-review-slot {
    font-size: 0.78rem; padding: 0.2rem 0.5rem;
    border-radius: 4px; background: var(--cbtt-available, #f4c430); color: var(--cbtt-ink, #1f2733);
}
.cbv2-review-slot.preferred { background: var(--cbtt-preferred, #7fd9c4); color: var(--cbtt-ink, #1f2733); }
.cbv2-review-slot.possible  { background: var(--cbtt-possible-tint, #fef9c3); color: var(--cbtt-possible-ink, #78350f); }

/* ─── Consent checkbox (Review step) ──────────────── */
.cbv2-consent-block {
    background: var(--cbtt-surface-alt, #f7f3ec); border: 1px solid var(--cbtt-border-soft, #f0ebe1);
    border-radius: 10px; padding: 0.85rem 1rem; margin-top: 0.25rem;
}
.cbv2-consent-block label {
    display: flex; align-items: flex-start; gap: 0.6rem;
    font-size: 0.9rem; color: var(--cbtt-ink, #1f2733); cursor: pointer; line-height: 1.4;
}
.cbv2-consent-block input[type="checkbox"] {
    margin-top: 0.2rem; width: 1.1rem; height: 1.1rem; flex-shrink: 0; cursor: pointer;
}
.cbv2-consent-block a { color: var(--cbtt-primary, #003f86); }

/* ─── Summary Display ──────────────────────────── */
#cbv2-summary-container {
    margin-top: 2rem; padding: 0 1rem;
}
/* Flat card in the brand neutrals — the "saved" confirmation is carried by
   the submit button's state and the text, not by a green box. */
.cbv2-summary-card {
    background: var(--cbtt-surface-alt, #f7f3ec); border: 2px solid var(--cbtt-border, #e6e1d7);
    border-radius: 12px; padding: 1.5rem;
}
.cbv2-summary-card h3 {
    margin: 0 0 1rem; font-size: 1.3rem; color: var(--cbtt-primary, #003f86);
}
.cbv2-summary-card #cbv2-summary-content {
    margin-bottom: 1.25rem; font-size: 0.95rem; line-height: 1.6;
}
.cbv2-summary-card .cbv2-btn-secondary {
    background: var(--cbtt-surface, #fff); border: 1px solid var(--cbtt-border, #e6e1d7); color: var(--cbtt-primary, #003f86);
    cursor: pointer; font-weight: 500;
}
.cbv2-summary-card .cbv2-btn-secondary:hover { background: var(--cbtt-border-soft, #f0ebe1); }

/* ─── Day buttons ───────────────────────────── */
.cbv2-day-btn { min-width: 6rem; }
.cbv2-day-btn.cbv2-selected { border-color: var(--cbtt-primary, #003f86); background: var(--cbtt-surface-alt, #f7f3ec); color: var(--cbtt-primary, #003f86); font-weight: 600; }

/* ─── Responsive ────────────────────────────── */
@media (max-width: 600px) {
    .cbv2-step-header h2 { font-size: 1.1rem; }
    .cbv2-slot-row-time  { width: 1.8rem; font-size: 0.72rem; }
}
