/* Vergelijkende uitslag — vergelijkende_uitslag.php. Huisstijlvariabelen (--app-*),
   donkere variant via prefers-color-scheme en [data-theme="dark"]. */

.vu-page {
    --vu-ink: var(--app-text, #163049);
    --vu-ink-2: var(--app-text-soft, #3d5368);
    --vu-ink-3: var(--app-muted, #607286);
    --vu-line: var(--app-line, #d9e1e8);
    --vu-soft: var(--app-surface-soft, #eef3f8);
    --vu-surface: var(--app-surface, #ffffff);
    --vu-accent: var(--app-accent, #0f4c81);
    --vu-mark: #fff3d6;
    --vu-mark-line: #f2b33d;
    --vu-gold: #b8860b;
    --vu-silver: #6b7c8c;
    --vu-bronze: #a0522d;
    --vu-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .vu-page {
        --app-bg: #0d1820;
        --app-surface: #13222c;
        --app-surface-soft: #1c2e3b;
        --app-text: #e8eff4;
        --app-text-soft: #c3d0da;
        --app-muted: #9aabb8;
        --app-line: #26394a;
        --app-accent: #4cb3d4;
        --vu-mark: #3a3216;
        --vu-mark-line: #c99a2e;
        --vu-gold: #f2c14e;
        --vu-silver: #c9d3dc;
        --vu-bronze: #e39a6b;
        color-scheme: dark;
        background: var(--app-bg);
        color: var(--app-text);
    }
}

:root[data-theme="dark"] .vu-page {
    --app-bg: #0d1820;
    --app-surface: #13222c;
    --app-surface-soft: #1c2e3b;
    --app-text: #e8eff4;
    --app-text-soft: #c3d0da;
    --app-muted: #9aabb8;
    --app-line: #26394a;
    --app-accent: #4cb3d4;
    --vu-mark: #3a3216;
    --vu-mark-line: #c99a2e;
    --vu-gold: #f2c14e;
    --vu-silver: #c9d3dc;
    --vu-bronze: #e39a6b;
    color-scheme: dark;
    background: var(--app-bg);
    color: var(--app-text);
}

.vu-page .vu {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

.vu-card {
    background: var(--vu-surface);
    border: 1px solid var(--vu-line);
    border-radius: var(--app-radius, 10px);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.vu-card h2,
.vu-card h3,
.vu-title {
    margin: 0;
    color: var(--vu-ink);
}

.vu-card p {
    margin: 0;
    max-width: 80ch;
    color: var(--vu-ink-2);
}

.vu-choices,
.vu-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
    align-items: end;
}

.vu-choices label,
.vu-bar label {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: .78rem;
    color: var(--vu-ink-3);
    min-width: 0;
}

.vu-page .vu-choices select,
.vu-page .vu-bar select,
.vu-page .vu-bar input {
    font: inherit;
    font-size: .92rem;
    color: var(--vu-ink);
    background: var(--vu-surface);
    border: 1px solid var(--vu-line);
    border-radius: 8px;
    padding: 6px 9px;
    max-width: 100%;
}

/* Filterbalk blijft bij scrollen bovenaan staan (op brede schermen; op smalle schermen
   zou hij een groot deel van het beeld bedekken). */
.vu-bar {
    background: var(--vu-surface);
    border: 1px solid var(--vu-line);
    border-radius: var(--app-radius, 10px);
    padding: 10px 14px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .06);
}

.vu-source {
    font-size: .9rem;
    background: var(--vu-soft);
    border-left: 4px solid var(--vu-accent);
    border-radius: 6px;
    padding: 9px 13px;
}

.vu-bm {
    display: inline-block;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--vu-ink-2);
    border: 1px solid var(--vu-line);
    border-radius: 4px;
    padding: 0 5px;
    margin-left: 4px;
    vertical-align: 1px;
}

.vu-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
    gap: 18px;
    align-items: start;
}

@media (min-width: 900px) {
    .vu-bar {
        position: sticky;
        top: 0;
        z-index: 5;
    }
}

@media (max-width: 980px) {
    .vu-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

.vu-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.vu-side {
    position: sticky;
    top: 90px;
}

@media (max-width: 980px) {
    .vu-side {
        position: static;
        order: -1;
    }
}

.vu-status {
    color: var(--vu-ink-3);
    font-size: .9rem;
    margin: 0;
}

.vu-note {
    font-size: .82rem;
    color: var(--vu-ink-3) !important;
}

.vu-scroll {
    position: relative;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.vu-table,
.vu-side-table {
    width: 100%;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
    font-size: .9rem;
}

.vu-table th,
.vu-table td,
.vu-side-table th,
.vu-side-table td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--vu-line);
    text-align: left;
    color: var(--vu-ink);
    white-space: nowrap;
    vertical-align: top;
}

.vu-table thead th,
.vu-side-table thead th {
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--vu-ink-3);
}

.vu-table .num,
.vu-side-table .num {
    text-align: right;
}

.vu-place {
    font-weight: 800;
}

.vu-place small {
    display: block;
    font-weight: 400;
    font-size: .7rem;
    color: var(--vu-ink-3);
}

.vu-row--p1 .vu-place { color: var(--vu-gold); }
.vu-row--p2 .vu-place { color: var(--vu-silver); }
.vu-row--p3 .vu-place { color: var(--vu-bronze); }

.vu-row--mark td {
    background: var(--vu-mark);
}

.vu-row--mark td:first-child {
    box-shadow: inset 4px 0 0 var(--vu-mark-line);
}

.vu-row--hit .vu-name {
    text-decoration: underline;
    text-decoration-color: var(--vu-mark-line);
    text-decoration-thickness: 3px;
}

.vu-name {
    font-weight: 600;
}

.vu-members {
    display: block;
    font-weight: 400;
    font-size: .8rem;
    color: var(--vu-ink-2);
    white-space: normal;
    margin-top: 2px;
}

.vu-time {
    font-family: var(--vu-mono);
}

.vu-meet {
    font-size: .8rem;
    color: var(--vu-ink-2);
}

.vu-sep td {
    border-bottom: 2px dashed var(--vu-line);
    padding: 2px;
    font-size: .72rem;
    color: var(--vu-ink-3);
}

.vu-page .vu-split-toggle {
    display: inline-block;
    width: auto;
    min-height: 0;
    font: inherit;
    font-size: .76rem;
    color: var(--vu-accent);
    background: transparent;
    border: 1px solid var(--vu-line);
    border-radius: 6px;
    padding: 1px 7px;
    cursor: pointer;
    box-shadow: none;
}

.vu-splits td {
    background: var(--vu-soft);
}

.vu-splits table {
    border-collapse: collapse;
    font-size: .8rem;
}

.vu-splits th,
.vu-splits td td {
    padding: 2px 12px 2px 0;
    border: 0;
    background: transparent;
}

.vu-unranked {
    font-size: .84rem;
    color: var(--vu-ink-2);
    margin: 6px 0 0;
}

.vu-program-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 12px;
}

.vu-program-head small {
    color: var(--vu-ink-3);
}

.vu-side-table button {
    display: block;
    width: auto;
    min-height: 0;
    font: inherit;
    font-weight: 600;
    color: var(--vu-ink);
    background: none;
    border: 0;
    padding: 0;
    text-align: left;
    cursor: pointer;
    box-shadow: none;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vu-side-table tr.is-marked button {
    color: var(--vu-accent);
}

.vu-page button:focus-visible,
.vu-page select:focus-visible,
.vu-page input:focus-visible,
.vu-page a:focus-visible {
    outline: 2px solid var(--vu-accent);
    outline-offset: 2px;
}

@media (max-width: 520px) {
    .vu-card {
        padding: 14px;
    }

    .vu-choices label,
    .vu-bar label {
        flex: 1 1 140px;
    }

    .vu-page .vu-choices select,
    .vu-page .vu-bar select,
    .vu-page .vu-bar input {
        width: 100%;
    }
}

/* Op smalle schermen staan tijd en punten ook onder de naam (de tabel scrolt horizontaal). */
.vu-mobile-time {
    display: none;
}

@media (max-width: 640px) {
    .vu-mobile-time {
        display: block;
        font-family: var(--vu-mono);
        font-size: .8rem;
        color: var(--vu-accent);
    }
}

/* Alle klassen en seizoen (vergelijkend_scope). */
.vu-page .vu-choices .vu-check {
    flex-direction: row;
    align-items: center;
    gap: 6px;
    font-size: .86rem;
    color: var(--vu-ink-2);
    padding-bottom: 6px;
}

.vu-classes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 8px;
}

.vu-class {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    font-size: .72rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--vu-accent);
    background: var(--vu-soft);
    border: 1px solid var(--vu-line);
    border-radius: 999px;
    padding: 2px 8px;
    white-space: nowrap;
    vertical-align: 1px;
}

.vu-class small {
    font-weight: 500;
    color: var(--vu-ink-3);
}

.vu-class--extra {
    border-style: dashed;
    color: var(--vu-ink-3);
}

.vu-progress {
    display: block;
    height: 6px;
    margin-top: 8px;
    max-width: 360px;
    background: var(--vu-soft);
    border-radius: 999px;
    overflow: hidden;
}

.vu-progress > span {
    display: block;
    height: 100%;
    background: var(--vu-accent);
    transition: width .2s ease;
}

.vu-page .vu-choices label[hidden] {
    display: none;
}
