/**
 * Venue Capacity Explorer (widgets/venue-explorer-widget.php)
 * Values from the "A · Seat plan explorer" design (19 Nov 2026).
 */

.cbk-vx {
    --vx-navy: #1B2F6B;
    --vx-navy-ink: #14213D;
    --vx-seat: #2F5BB7;
    --vx-muted: #4A5A80;
    --vx-side-muted: #A9BCE6;
    --vx-side-ink: #E6EEFF;
    --vx-line: #C9D8F0;
    --vx-plan-bg: #F7FAFE;
    --vx-grid: #E6EDF8;
    --vx-table: #DCE6F6;
    --vx-table-line: #9DB6E0;
    --vx-off-bg: #F4F6FA;
    --vx-off-ink: #6B7590;
    --vx-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
    --vx-display: "Poppins", sans-serif;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--vx-navy-ink);
}

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

.cbk-vx__shell {
    display: grid;
    grid-template-columns: clamp(260px, 25%, 360px) minmax(0, 1fr);
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(20, 33, 61, .10), 0 0 0 1px rgba(27, 47, 107, .06);
}

/* ---------------------------------------------------------------- */
/* Space list                                                        */
/* ---------------------------------------------------------------- */

.cbk-vx__side {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 44px 24px;
    background: var(--vx-navy);
    color: #fff;
}
.cbk-vx__eyebrow {
    padding: 0 14px;
    font-family: var(--vx-mono);
    font-size: 11px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--vx-side-muted);
}
.cbk-vx .cbk-vx__side-title {
    margin: 0;
    padding: 6px 14px 18px;
    font-family: var(--vx-display);
    font-size: 24px;
    font-weight: 600;
    line-height: 1.25;
    color: #fff;
}
.cbk-vx__venues { display: flex; flex-direction: column; gap: 4px; }
.cbk-vx .cbk-vx__venue {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 0 14px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--vx-side-ink);
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
    text-align: left;
    text-transform: none;
    letter-spacing: 0;
    box-shadow: none;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease;
}
.cbk-vx .cbk-vx__venue:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.cbk-vx .cbk-vx__venue.is-active { background: #fff; color: var(--vx-navy); }
.cbk-vx .cbk-vx__venue:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.cbk-vx__venue-max {
    flex: none;
    font-family: var(--vx-mono);
    font-size: 12px;
    color: var(--vx-side-muted);
    white-space: nowrap;
}
.cbk-vx .cbk-vx__venue.is-active .cbk-vx__venue-max { color: var(--vx-muted); }

/* ---------------------------------------------------------------- */
/* Selected space                                                    */
/* ---------------------------------------------------------------- */

.cbk-vx__main {
    display: flex;
    flex-direction: column;
    gap: 22px;
    min-width: 0;
    padding: 44px clamp(24px, 4vw, 56px);
    background: #fff;
}
.cbk-vx__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
}
.cbk-vx__titles { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cbk-vx__group {
    min-height: 1em;
    font-family: var(--vx-mono);
    font-size: 12px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--vx-muted);
}
.cbk-vx .cbk-vx__name {
    margin: 0;
    font-family: var(--vx-display);
    font-size: clamp(28px, 3vw, 40px);
    font-weight: 600;
    line-height: 1.1;
    color: var(--vx-navy);
}
.cbk-vx .cbk-vx__cta {
    flex: none;
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    background: var(--vx-navy);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .2s ease, transform .2s ease;
}
.cbk-vx .cbk-vx__cta:hover,
.cbk-vx .cbk-vx__cta:focus-visible { background: var(--vx-seat); color: #fff; transform: translateY(-1px); }
.cbk-vx .cbk-vx__cta:focus-visible { outline: 2px solid var(--vx-seat); outline-offset: 3px; }

/* Layout choices */
.cbk-vx__layouts { display: flex; gap: 12px; }
.cbk-vx .cbk-vx__layout {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    min-height: 76px;
    margin: 0;
    padding: 12px 18px;
    border: 1.5px solid var(--vx-line);
    border-radius: 12px;
    background: #fff;
    color: var(--vx-navy);
    font-family: inherit;
    text-align: left;
    text-transform: none;
    letter-spacing: 0;
    box-shadow: none;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.cbk-vx .cbk-vx__layout:hover:not(:disabled):not(.is-active) { border-color: var(--vx-seat); background: var(--vx-plan-bg); }
.cbk-vx .cbk-vx__layout.is-active { border-color: var(--vx-navy); background: var(--vx-navy); color: #fff; }
.cbk-vx .cbk-vx__layout:disabled { border-color: var(--vx-line); background: var(--vx-off-bg); color: var(--vx-off-ink); cursor: not-allowed; opacity: 1; }
.cbk-vx .cbk-vx__layout:focus-visible { outline: 2px solid var(--vx-seat); outline-offset: 2px; }
.cbk-vx__layout-icon {
    flex: none;
    width: 34px;
    height: 34px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
}
.cbk-vx__layout-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cbk-vx__layout-label { font-size: 13px; font-weight: 500; line-height: 1.3; }
.cbk-vx__layout-val { font-family: var(--vx-display); font-size: 22px; font-weight: 600; line-height: 1; }
.cbk-vx__layout-note { font-size: 11px; line-height: 1.3; opacity: .8; }

/* Seat plan */
.cbk-vx__plan {
    position: relative;
    padding: 40px 32px;
    border: 1px solid var(--vx-line);
    border-radius: 16px;
    background-color: var(--vx-plan-bg);
    background-image: linear-gradient(var(--vx-grid) 1px, transparent 1px), linear-gradient(90deg, var(--vx-grid) 1px, transparent 1px);
    background-size: 24px 24px;
}
.cbk-vx__svg { display: block; width: 100%; height: auto; overflow: visible; }
.cbk-vx__stage { fill: var(--vx-navy); }
.cbk-vx__stage-label {
    fill: #fff;
    font-family: var(--vx-mono);
    font-size: 10px;
    letter-spacing: .12em;
    text-anchor: middle;
    dominant-baseline: central;
}
.cbk-vx__table-shape { fill: var(--vx-table); stroke: var(--vx-table-line); stroke-width: 1; }
.cbk-vx__seat { fill: var(--vx-seat); }
.cbk-vx__seats.is-entering .cbk-vx__seat {
    animation: cbk-vx-seat .35s ease-out both;
    animation-delay: var(--i, 0ms);
    transform-box: fill-box;
    transform-origin: center;
}
.cbk-vx__seats.is-entering .cbk-vx__table-shape,
.cbk-vx__seats.is-entering .cbk-vx__stage,
.cbk-vx__seats.is-entering .cbk-vx__stage-label { animation: cbk-vx-fade .3s ease-out both; }
@keyframes cbk-vx-seat { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
@keyframes cbk-vx-fade { from { opacity: 0; } to { opacity: 1; } }

/* Count and legend */
.cbk-vx__foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 24px;
}
.cbk-vx .cbk-vx__count { display: flex; align-items: baseline; gap: 12px; margin: 0; }
.cbk-vx__n { font-family: var(--vx-display); font-size: 44px; font-weight: 700; line-height: 1; color: var(--vx-navy); }
.cbk-vx__n-text { font-size: 16px; color: var(--vx-muted); }
.cbk-vx .cbk-vx__legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    color: var(--vx-muted);
}
.cbk-vx__dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--vx-seat); }
.cbk-vx__sep { margin: 0 2px; }

/* All capacities as a table */
.cbk-vx__table { margin-top: 18px; }
.cbk-vx__table summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 2px;
    font-size: 15px;
    font-weight: 500;
    color: var(--vx-seat);
    cursor: pointer;
    list-style: none;
}
.cbk-vx__table summary::-webkit-details-marker { display: none; }
.cbk-vx__table summary::before {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform .2s ease;
}
.cbk-vx__table[open] summary::before { transform: rotate(45deg); }
.cbk-vx__table summary:focus-visible { outline: 2px solid var(--vx-seat); outline-offset: 2px; border-radius: 4px; }
.cbk-vx__table-wrap { margin-top: 10px; overflow-x: auto; border: 1px solid var(--vx-line); border-radius: 12px; }
.cbk-vx__table table { width: 100%; margin: 0; border-collapse: collapse; font-size: 15px; }
.cbk-vx__table th,
.cbk-vx__table td { padding: 12px 16px; border: 0; border-bottom: 1px solid var(--vx-grid); text-align: center; white-space: nowrap; }
.cbk-vx__table thead th { background: var(--vx-navy); color: #fff; font-weight: 600; }
.cbk-vx__table tbody th { text-align: left; font-weight: 500; color: var(--vx-navy); }
.cbk-vx__table tbody tr:nth-child(even) { background: var(--vx-plan-bg); }
.cbk-vx__table tbody tr:last-child th,
.cbk-vx__table tbody tr:last-child td { border-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
    .cbk-vx__seats.is-entering .cbk-vx__seat,
    .cbk-vx__seats.is-entering .cbk-vx__table-shape,
    .cbk-vx__seats.is-entering .cbk-vx__stage,
    .cbk-vx__seats.is-entering .cbk-vx__stage-label { animation: none; }
}

/* ---------------------------------------------------------------- */
/* Tablet: the list becomes a row of chips above the plan            */
/* ---------------------------------------------------------------- */

@media (max-width: 1024px) {
    .cbk-vx__shell { grid-template-columns: minmax(0, 1fr); }
    .cbk-vx__side { padding: 28px 20px 20px; }
    .cbk-vx .cbk-vx__side-title { padding-bottom: 12px; }
    .cbk-vx__venues {
        flex-direction: row;
        gap: 8px;
        overflow-x: auto;
        padding: 2px 2px 8px;
        scroll-snap-type: x proximity;
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, .35) transparent;
    }
    .cbk-vx .cbk-vx__venue {
        flex: none;
        width: auto;
        min-height: 44px;
        border: 1px solid rgba(255, 255, 255, .22);
        border-radius: 999px;
        scroll-snap-align: start;
        white-space: nowrap;
    }
    .cbk-vx .cbk-vx__venue.is-active { border-color: #fff; }
    .cbk-vx__main { padding: 28px 24px; }
    .cbk-vx__layouts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------------------------------------------------------------- */
/* Phone                                                             */
/* ---------------------------------------------------------------- */

@media (max-width: 767px) {
    .cbk-vx__shell { border-radius: 12px; }
    .cbk-vx__main { gap: 18px; padding: 22px 16px; }
    .cbk-vx__head { flex-direction: column; align-items: flex-start; gap: 14px; }
    .cbk-vx .cbk-vx__cta { min-height: 44px; padding: 0 20px; font-size: 14px; }
    .cbk-vx__layouts { gap: 8px; }
    .cbk-vx .cbk-vx__layout { gap: 10px; min-height: 66px; padding: 10px 12px; }
    .cbk-vx__layout-icon { width: 26px; height: 26px; }
    .cbk-vx__layout-val { font-size: 20px; }
    .cbk-vx__plan { padding: 16px 10px; border-radius: 12px; }
    .cbk-vx__n { font-size: 36px; }
    .cbk-vx__n-text { font-size: 15px; }
    .cbk-vx__table table { font-size: 14px; }
    .cbk-vx__table th,
    .cbk-vx__table td { padding: 10px 12px; }
}
