/*
 * Wedstrijdteam: the Bleau Competition Team look on top of Pico.
 * Colours come from the team gear: the purple hoodie, the cream print on it, the charcoal t-shirt and the orange of
 * harness and helmet straps. The climbing-hold colours (red, yellow, green, blue) are only for small playful accents.
 * Every Pico component picks the colours up through its own variables, so templates need no theme classes.
 */

:root {
    --wt-purple: #5d2a96;
    --wt-purple-dark: #46207a;
    --wt-purple-ink: #3b1966;
    --wt-cream: #f1e9da;
    --wt-charcoal: #3a3b45;
    --wt-orange: #f07d1a;
    --wt-hold-red: #e5484d;
    --wt-hold-yellow: #f5c518;
    --wt-hold-green: #2fa84f;
    --wt-hold-blue: #2f6fd6;
    --wt-hold-stripe: linear-gradient(90deg,
        var(--wt-orange) 0 20%, var(--wt-hold-yellow) 20% 40%, var(--wt-hold-green) 40% 60%,
        var(--wt-hold-blue) 60% 80%, var(--wt-hold-red) 80% 100%);
    --wt-tabbar-height: 4rem;
}

/* Light (Pico's own selector, so these win over its defaults). */
[data-theme=light],
:root:not([data-theme=dark]) {
    --pico-font-family-sans-serif: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", system-ui, "Segoe UI", Roboto, sans-serif, var(--pico-font-family-emoji);
    --pico-border-radius: 0.75rem;
    --pico-font-weight: 400;
    --pico-background-color: #faf6ef;
    --pico-color: #2c2a33;
    --pico-muted-color: #6b6676;
    --pico-muted-border-color: #e7dfd1;
    --pico-h1-color: var(--wt-purple-ink);
    --pico-h2-color: var(--wt-purple-ink);
    --pico-h3-color: #2c2a33;
    --pico-primary: var(--wt-purple);
    --pico-primary-background: var(--wt-purple);
    --pico-primary-border: var(--wt-purple);
    --pico-primary-underline: rgba(93, 42, 150, 0.45);
    --pico-primary-hover: var(--wt-purple-dark);
    --pico-primary-hover-background: var(--wt-purple-dark);
    --pico-primary-hover-border: var(--wt-purple-dark);
    --pico-primary-hover-underline: var(--wt-purple-dark);
    --pico-primary-focus: rgba(93, 42, 150, 0.3);
    --pico-primary-inverse: #fff;
    --pico-secondary: var(--wt-charcoal);
    --pico-secondary-background: var(--wt-charcoal);
    --pico-secondary-border: var(--wt-charcoal);
    --pico-secondary-underline: rgba(58, 59, 69, 0.45);
    --pico-secondary-hover: #24252c;
    --pico-secondary-hover-background: #24252c;
    --pico-secondary-hover-border: #24252c;
    --pico-secondary-focus: rgba(58, 59, 69, 0.25);
    --pico-secondary-inverse: #fff;
    --pico-card-background-color: #fff;
    --pico-card-border-color: #ece4d6;
    --pico-card-sectioning-background-color: #f7f2fc;
    --pico-card-box-shadow: 0 1px 0 rgba(58, 59, 69, 0.04), 0 6px 20px -8px rgba(59, 25, 102, 0.18);
    --pico-form-element-background-color: #fff;
    --pico-form-element-border-color: #d8cfbf;
    --pico-del-color: #b3261e;
    --wt-header-background: var(--wt-purple);
    --wt-header-color: var(--wt-cream);
    --wt-tag-background: #f1ebe0;
    --wt-tag-color: #4a4752;
    --wt-tag-strong-background: #ece2f8;
    --wt-tag-strong-color: var(--wt-purple-ink);
    --wt-tag-warning-background: #fde3e1;
    --wt-tag-warning-color: #9c2019;
    --wt-proposed: var(--wt-orange);
}

/* Dark: deep purple-charcoal instead of grey, the purple lifted so it stays readable. */
@media only screen and (prefers-color-scheme: dark) {
    :root:not([data-theme]) {
        --pico-font-family-sans-serif: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", system-ui, "Segoe UI", Roboto, sans-serif, var(--pico-font-family-emoji);
        --pico-border-radius: 0.75rem;
        --pico-background-color: #16131c;
        --pico-color: #ece8f2;
        --pico-muted-color: #a8a1b4;
        --pico-muted-border-color: #332b3f;
        --pico-h1-color: #e3d4fb;
        --pico-h2-color: #e3d4fb;
        --pico-h3-color: #ece8f2;
        --pico-primary: #c8acf7;
        --pico-primary-background: #7b47c7;
        --pico-primary-border: #7b47c7;
        --pico-primary-underline: rgba(200, 172, 247, 0.5);
        --pico-primary-hover: #dccaf9;
        --pico-primary-hover-background: #8d5bd9;
        --pico-primary-hover-border: #8d5bd9;
        --pico-primary-hover-underline: #dccaf9;
        --pico-primary-focus: rgba(200, 172, 247, 0.35);
        --pico-primary-inverse: #fff;
        --pico-secondary: #c9c6d2;
        --pico-secondary-background: #4a4a57;
        --pico-secondary-border: #4a4a57;
        --pico-secondary-hover-background: #5a5a69;
        --pico-secondary-hover-border: #5a5a69;
        --pico-secondary-inverse: #fff;
        --pico-card-background-color: #211c2a;
        --pico-card-border-color: #2f2839;
        --pico-card-sectioning-background-color: #2a2335;
        --pico-card-box-shadow: 0 6px 20px -8px rgba(0, 0, 0, 0.6);
        --pico-form-element-background-color: #1c1824;
        --pico-form-element-border-color: #3d3449;
        --pico-del-color: #f2837b;
        --wt-header-background: #2e1650;
        --wt-header-color: var(--wt-cream);
        --wt-tag-background: #2c2636;
        --wt-tag-color: #d4cfdc;
        --wt-tag-strong-background: #3a2a55;
        --wt-tag-strong-color: #e3d4fb;
        --wt-tag-warning-background: #4a2222;
        --wt-tag-warning-color: #f6a8a1;
        --wt-proposed: #f5934a;
    }
}

/* Type: rounded and a bit bold, like the print on the hoodie. */
h1, h2, h3 {
    font-weight: 800;
    letter-spacing: -0.01em;
}

h1::after {
    content: "";
    display: block;
    width: 3.5rem;
    height: 0.35rem;
    margin-top: 0.4rem;
    border-radius: 1rem;
    background: var(--wt-hold-stripe);
}

/* Buttons: pill-shaped and bold. */
button,
[role="button"],
input[type="submit"] {
    border-radius: 2rem;
    font-weight: 700;
}

article {
    border: 1px solid var(--pico-card-border-color);
    border-radius: 1rem;
}

/* Header: purple bar, hold-coloured stripe underneath. */
.wt-header {
    background: var(--wt-header-background);
    color: var(--wt-header-color);
    margin-bottom: calc(var(--pico-spacing) * 1.5);
}

.wt-header::after {
    content: "";
    display: block;
    height: 0.3rem;
    background: var(--wt-hold-stripe);
}

.wt-header-inner {
    display: flex;
    align-items: center;
    gap: 0.5rem 1.5rem;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
}

.wt-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-right: auto;
    color: var(--wt-header-color);
    text-decoration: none;
}

.wt-brand:hover {
    color: #fff;
}

.wt-brand-mark {
    width: 2.6rem;
    height: 2.6rem;
    flex: none;
    color: var(--wt-cream);
}

/* The club icon as printed on the hoodie: cream shapes, the purple shows through as the lines. */
.wt-brand:hover .wt-brand-mark {
    transform: rotate(-8deg);
}

.wt-brand-mark {
    transition: transform 0.2s ease;
}

.wt-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.wt-brand-text strong {
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.wt-brand-text span {
    font-size: 0.8rem;
    opacity: 0.85;
}

/* Main menu, wide screens: tabs in the purple bar. */
.wt-nav,
.wt-nav ul {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.wt-nav ul {
    gap: 0.25rem;
}

.wt-nav li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.wt-tab {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    padding: 0.4rem 0.8rem;
    border-radius: 2rem;
    color: var(--wt-header-color);
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.wt-tab svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.wt-tab svg .wt-fill {
    fill: currentColor;
    stroke: none;
}

.wt-tab:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.wt-tab[aria-current="page"],
.wt-tab--current {
    background: var(--wt-cream);
    color: var(--wt-purple-ink);
}

/* "Beheer": a details menu, so it works without JavaScript. Pico colours a summary through its accordion variables. */
.wt-menu {
    position: relative;
    margin: 0;
    --pico-accordion-close-summary-color: var(--wt-header-color);
    --pico-accordion-active-summary-color: var(--wt-header-color);
    --pico-accordion-open-summary-color: var(--wt-purple-ink);
}

.wt-menu:has(> .wt-tab--current) {
    --pico-accordion-close-summary-color: var(--wt-purple-ink);
    --pico-accordion-active-summary-color: var(--wt-purple-ink);
}

/* Pico styles every summary as an accordion title; the menu's summary is a tab like the links next to it. */
.wt-menu > summary.wt-tab {
    list-style: none;
    line-height: inherit;
    color: var(--wt-header-color);
}

.wt-menu > summary.wt-tab:hover {
    color: #fff;
}

.wt-menu > summary.wt-tab.wt-tab--current,
.wt-menu[open] > summary.wt-tab {
    color: var(--wt-purple-ink);
    background: var(--wt-cream);
}

.wt-menu summary::-webkit-details-marker,
.wt-menu summary::after {
    display: none;
}

.wt-menu > ul {
    position: absolute;
    z-index: 20;
    right: 0;
    top: calc(100% + 0.4rem);
    min-width: 14rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.4rem;
    border: 1px solid var(--pico-card-border-color);
    border-radius: 1rem;
    background: var(--pico-card-background-color);
    box-shadow: 0 12px 32px -10px rgba(30, 10, 60, 0.45);
}

.wt-menu > ul a {
    display: block;
    padding: 0.55rem 0.8rem;
    border-radius: 0.6rem;
    color: var(--pico-color);
    text-decoration: none;
}

.wt-menu > ul .wt-menu-heading {
    padding: 0.5rem 0.8rem 0.15rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--pico-muted-color);
}

.wt-menu > ul a:hover {
    background: var(--pico-card-sectioning-background-color);
    color: var(--pico-primary);
}

.wt-logout {
    margin: 0;
}

.wt-logout-button {
    margin: 0;
    padding: 0.3rem 0.9rem;
    border: 1px solid rgba(241, 233, 218, 0.55);
    background: transparent;
    color: var(--wt-header-color);
    font-size: 0.85rem;
}

.wt-logout-button:hover {
    border-color: var(--wt-cream);
    background: rgba(255, 255, 255, 0.12);
}

.wt-header .wt-impersonation {
    margin-top: 0;
    margin-bottom: 0.6rem;
    color: var(--pico-color);
}

/* Leden and Instellingen are two dropdowns on a wide screen; the phone has one Beheer tab instead. */
@media (min-width: 768px) {
    .wt-nav li.wt-phone-only {
        display: none;
    }
}

/* Phone: the main menu becomes a tab bar fixed to the bottom of the screen. */
@media (max-width: 767px) {
    .wt-nav li.wt-desktop-only {
        display: none;
    }

    body:has(.wt-nav) {
        padding-bottom: calc(var(--wt-tabbar-height) + env(safe-area-inset-bottom));
    }

    .wt-brand-mark {
        width: 2rem;
        height: 2rem;
    }

    .wt-nav {
        position: fixed;
        z-index: 30;
        left: 0;
        right: 0;
        bottom: 0;
        padding: 0.35rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom));
        border-top: 1px solid var(--pico-card-border-color);
        background: var(--pico-card-background-color);
        box-shadow: 0 -6px 20px -10px rgba(30, 10, 60, 0.35);
    }

    .wt-nav > ul {
        width: 100%;
        justify-content: space-around;
    }

    .wt-nav > ul > li {
        flex: 1;
    }

    .wt-tab {
        flex-direction: column;
        gap: 0.1rem;
        padding: 0.3rem 0.25rem;
        border-radius: 1rem;
        color: var(--pico-muted-color);
        font-size: 0.72rem;
        text-align: center;
    }

    .wt-tab svg {
        width: 1.5rem;
        height: 1.5rem;
    }

    .wt-tab:hover {
        background: transparent;
        color: var(--pico-primary);
    }

    .wt-tab[aria-current="page"],
    .wt-tab--current,
    .wt-menu > summary.wt-tab.wt-tab--current,
    .wt-menu[open] > summary.wt-tab {
        background: var(--pico-card-sectioning-background-color);
        color: var(--pico-primary);
    }

    .wt-menu {
        --pico-accordion-close-summary-color: var(--pico-muted-color);
        --pico-accordion-active-summary-color: var(--pico-primary);
        --pico-accordion-open-summary-color: var(--pico-primary);
    }

    .wt-menu:has(> .wt-tab--current) {
        --pico-accordion-close-summary-color: var(--pico-primary);
        --pico-accordion-active-summary-color: var(--pico-primary);
    }

    .wt-menu > summary.wt-tab {
        color: var(--pico-muted-color);
    }

    .wt-menu > summary.wt-tab:hover {
        color: var(--pico-primary);
    }

    .wt-menu > ul {
        position: fixed;
        top: auto;
        right: 0.75rem;
        bottom: calc(var(--wt-tabbar-height) + env(safe-area-inset-bottom) + 0.5rem);
    }
}

.wt-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin-top: calc(var(--pico-spacing) * 3);
    padding-bottom: var(--pico-spacing);
    color: var(--pico-muted-color);
}

/* The data disclaimer: its own line under the holds and the team name. */
.wt-disclaimer {
    flex-basis: 100%;
    margin: 0;
}

/* Five little climbing holds. */
.wt-holds {
    display: inline-flex;
    gap: 0.25rem;
}

.wt-holds i {
    width: 0.6rem;
    height: 0.5rem;
    border-radius: 50% 50% 45% 55%;
    background: var(--wt-orange);
}

.wt-holds i:nth-child(2) { background: var(--wt-hold-yellow); }
.wt-holds i:nth-child(3) { background: var(--wt-hold-green); }
.wt-holds i:nth-child(4) { background: var(--wt-hold-blue); }
.wt-holds i:nth-child(5) { background: var(--wt-hold-red); }

/* A competition card shows the trainers' choice as a coloured edge: purple official, orange proposed. */
.wt-card:has(.wt-keuze[data-choice="OFFICIAL"]) {
    border-left: 0.4rem solid var(--wt-purple);
}

.wt-card:has(.wt-keuze[data-choice="PROPOSED"]) {
    border-left: 0.4rem solid var(--wt-proposed);
}

.wt-keuze[data-choice="OFFICIAL"] .wt-keuze-tekst {
    color: var(--pico-primary);
    font-weight: 700;
}

.wt-narrow {
    max-width: 36rem;
}

.wt-notice {
    padding: var(--pico-spacing);
    border-radius: var(--pico-border-radius);
    border-left: 0.3rem solid var(--pico-primary-background);
    background: var(--pico-card-background-color);
    box-shadow: var(--pico-card-box-shadow);
}

.wt-notice--warning {
    border-left-color: var(--pico-del-color);
}

/* Competition pages: mobile-first, no wide tables. */

.wt-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    margin-bottom: calc(var(--pico-spacing) * 0.5);
}

.wt-competition header a,
.wt-info dd,
.wt-change {
    overflow-wrap: anywhere;
}

.wt-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: var(--pico-spacing);
}

.wt-actions form,
.wt-actions button,
.wt-actions [role="button"] {
    margin: 0;
}

.wt-info dt {
    font-weight: bold;
}

.wt-info dd {
    margin: 0 0 var(--pico-spacing) 0;
}

.wt-info dd form,
.wt-change form {
    margin: 0.25rem 0 0 0;
}

.wt-info dd button,
.wt-change button {
    margin: 0;
    padding: 0.25rem 0.75rem;
}

.wt-bands {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr);
    gap: 0 0.5rem;
    align-items: center;
}

.wt-bands input {
    margin-bottom: 0.5rem;
}

/* Date fields open their calendar on click (js/wt.js). */
input[type="date"] {
    cursor: pointer;
}

/* "Bekijk als": banner while an admin views the app as someone else, and the small button that starts it. */
.wt-impersonation {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    margin-top: 0.5rem;
    padding: 0.5rem var(--pico-spacing);
    border-radius: var(--pico-border-radius);
    border-left: 0.25rem solid var(--pico-del-color);
    background: var(--pico-card-background-color);
}

.wt-impersonation p,
.wt-impersonation form,
.wt-impersonation button {
    margin: 0;
}

.wt-inline {
    display: inline;
    margin: 0;
}

button.wt-small {
    width: auto;
    margin: 0 0 0 0.5rem;
    padding: 0.1rem 0.5rem;
    font-size: 0.8em;
}

/* Text for screen readers only (e.g. a legend the heading above already shows). */
.wt-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* The choice block of a competition: radios on one line, compact toggle. */
.wt-keuze fieldset {
    display: flex;
    flex-wrap: wrap;
    gap: 0 1rem;
    margin-bottom: 0.5rem;
    border: 0;
    padding: 0;
}

.wt-keuze-melding {
    color: var(--pico-del-color);
}

/* Kalender: filter chips and one card per competition (stacked, so nothing scrolls sideways on a phone). */
.wt-toolbar {
    display: block;
}

.wt-toolbar ul,
.wt-switches {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 var(--pico-spacing) 0;
    padding: 0;
    list-style: none;
}

.wt-toolbar li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.wt-chip {
    display: inline-block;
    padding: 0.25rem 0.85rem;
    border: 1.5px solid var(--pico-muted-border-color);
    border-radius: 2rem;
    background: var(--pico-card-background-color);
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 600;
}

.wt-chip:hover {
    border-color: var(--pico-primary-background);
}

.wt-chip--active {
    background: var(--pico-primary-background);
    border-color: var(--pico-primary-background);
    color: var(--pico-primary-inverse);
}

.wt-small-link {
    margin-left: 0.25rem;
    font-size: 0.75em;
}

.wt-inline-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: var(--pico-spacing);
}

.wt-inline-form button {
    margin: 0;
}

.wt-card header a {
    overflow-wrap: anywhere;
}

.wt-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
    margin-bottom: calc(var(--pico-spacing) * 0.5);
}

.wt-tag {
    padding: 0.05rem 0.6rem;
    border-radius: 1rem;
    background: var(--wt-tag-background);
    color: var(--wt-tag-color);
    font-size: 0.8em;
    font-weight: 600;
}

.wt-tag--strong {
    background: var(--wt-tag-strong-background);
    color: var(--wt-tag-strong-color);
    font-weight: 800;
}

.wt-tag--warning {
    background: var(--wt-tag-warning-background);
    color: var(--wt-tag-warning-color);
}

a.wt-small {
    width: auto;
    margin: 0;
    padding: 0.2rem 0.75rem;
    font-size: 0.9em;
}

/* Maandweergave: seven columns on a desktop; on a phone coloured dots, and the day list below shows via :target. */
.wt-month-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.wt-month-nav h2 {
    margin: 0;
    font-size: 1.25rem;
    text-transform: capitalize;
}

.wt-month-head,
.wt-week {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 2px;
}

.wt-month-head {
    text-align: center;
    font-size: 0.8em;
    color: var(--pico-muted-color);
}

.wt-week {
    margin-bottom: 2px;
}

.wt-day {
    min-height: 3rem;
    padding: 0.2rem;
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 0.6rem;
    background: var(--pico-card-background-color);
    overflow: hidden;
}

.wt-day--outside {
    opacity: 0.55;
}

.wt-day--today {
    border-color: var(--pico-primary-background);
    border-width: 2px;
}

.wt-day-number {
    font-size: 0.8em;
    text-decoration: none;
}

.wt-day-items {
    margin: 0;
    padding: 0;
    list-style: none;
}

.wt-day-items li {
    margin: 0;
    padding: 0;
    font-size: 0.75em;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.wt-official a {
    font-weight: bold;
    color: var(--pico-primary-inverse);
    background: var(--pico-primary-background);
    display: block;
    padding: 0 0.25rem;
    border-radius: 0.2rem;
}

.wt-proposed a {
    display: block;
    padding: 0 0.25rem;
    border-left: 3px solid var(--wt-proposed);
    border-radius: 0.2rem;
}

.wt-other a {
    color: var(--pico-muted-color);
    font-size: 0.9em;
}

.wt-item-short {
    display: none;
}

.wt-daylist h3 {
    margin-top: var(--pico-spacing);
    font-size: 1.1rem;
    text-transform: capitalize;
}

/* Weekweergave: week per week, only the days that have something; readable on a phone with the full names. */
.wt-weekblock h3 {
    margin: 1.25rem 0 0.4rem;
    font-size: 1rem;
    color: var(--pico-muted-color);
}

.wt-weekblock--current h3 {
    color: var(--pico-primary);
}

.wt-weekblock--empty {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 0.75rem;
}

.wt-weekblock--empty h3 {
    margin-bottom: 0;
}

.wt-week-none {
    margin: 0;
    font-size: 0.9em;
    color: var(--pico-muted-color);
}

.wt-agenda-day {
    display: grid;
    grid-template-columns: 4.25rem minmax(0, 1fr);
    gap: 0.5rem;
    padding-top: 0.4rem;
    border-top: 1px solid var(--pico-muted-border-color);
}

.wt-agenda-date {
    padding-top: 0.35rem;
    font-size: 0.9em;
    color: var(--pico-muted-color);
}

.wt-agenda-day--today .wt-agenda-date {
    font-weight: bold;
    color: var(--pico-primary);
}

.wt-agenda-items {
    margin: 0;
    padding: 0;
    list-style: none;
}

.wt-agenda-items li {
    margin: 0 0 0.4rem;
    list-style: none;
}

.wt-agenda-item a {
    display: block;
    padding: 0.35rem 0.6rem;
    border-left: 4px solid var(--pico-muted-border-color);
    border-radius: 0.5rem;
    background: var(--pico-card-background-color);
    color: var(--pico-color);
    text-decoration: none;
    overflow-wrap: anywhere;
}

.wt-agenda-item strong {
    display: block;
    line-height: 1.25;
}

.wt-agenda-item small {
    display: flex;
    flex-wrap: wrap;
    gap: 0 0.6rem;
    color: var(--pico-muted-color);
}

.wt-agenda-official a {
    border-left-color: var(--pico-primary-background);
}

.wt-agenda-proposed a {
    border-left-color: var(--wt-proposed);
}

.wt-agenda-tag {
    font-weight: 600;
}

.wt-agenda-official .wt-agenda-tag {
    color: var(--pico-primary);
}

.wt-agenda-proposed .wt-agenda-tag {
    color: var(--wt-proposed);
}

.wt-more {
    margin: 1.25rem 0;
    text-align: center;
}

/* On a phone a day box is about 48px wide: each competition is a small coloured label with its hall. */
@media (max-width: 767px) {
    .wt-day {
        padding: 0.15rem 0.1rem;
    }

    .wt-day-number {
        display: block;
        text-align: center;
    }

    .wt-item-full,
    .wt-day-items small {
        display: none;
    }

    .wt-item-short {
        display: block;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .wt-day-items li {
        font-size: 0.62rem;
        line-height: 1.35;
        margin-top: 2px;
        overflow-wrap: normal;
    }

    .wt-day-items a {
        display: block;
        padding: 0 0.15rem;
        border-radius: 0.25rem;
        text-decoration: none;
    }

    .wt-proposed a {
        border-left: 0;
        background: var(--wt-proposed);
        color: #fff;
    }

    .wt-other a {
        font-size: 1em;
        background: var(--pico-muted-border-color);
        color: var(--pico-color);
    }

    .wt-daylist {
        display: none;
    }

    .wt-daylist:target {
        display: block;
    }
}

/* Kalender head: title with the Lijst/Maand switch, then the actions, then the grouped filters. */
.wt-pagehead {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    margin-bottom: 1rem;
}

.wt-pagehead h1 {
    margin: 0;
}

.wt-segment {
    display: inline-flex;
    margin: 0;
    padding: 0.2rem;
    border-radius: 2rem;
    background: var(--wt-tag-background);
}

.wt-segment a {
    padding: 0.25rem 0.9rem;
    border-radius: 2rem;
    color: var(--pico-muted-color);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
}

.wt-segment a.wt-segment--active {
    background: var(--pico-primary-background);
    color: var(--pico-primary-inverse);
}

.wt-actionbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem 1rem;
    margin-bottom: 0.75rem;
}

.wt-actionbar .wt-import {
    flex: 1 1 auto;
    margin: 0;
}

.wt-actionbar a.wt-create {
    margin: 0;
}

.wt-filters {
    margin-bottom: var(--pico-spacing);
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--pico-card-border-color);
    border-radius: 1rem;
    background: var(--pico-card-background-color);
}

/* Pico shows a label after a checkbox inline; this one is only the phone's open/close button. */
.wt-filters .wt-filters-summary {
    display: none;
}

.wt-filter-group {
    display: grid;
    grid-template-columns: 6rem minmax(0, 1fr);
    align-items: baseline;
    gap: 0.5rem;
}

.wt-filter-group + .wt-filter-group {
    margin-top: 0.4rem;
}

.wt-filter-name {
    color: var(--pico-muted-color);
    font-size: 0.85rem;
    font-weight: 700;
}

.wt-filters .wt-chips {
    margin: 0;
    gap: 0.35rem;
}

.wt-filters .wt-chip {
    padding: 0.1rem 0.7rem;
    font-size: 0.85em;
}

.wt-filter-extra {
    margin: 0.4rem 0 0 6.5rem;
}

@media (max-width: 767px) {
    .wt-filters {
        padding: 0;
    }

    .wt-filters .wt-filters-summary {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin: 0;
        padding: 0.55rem 0.9rem;
        cursor: pointer;
    }

    .wt-filters-summary span {
        overflow: hidden;
        color: var(--pico-primary);
        font-size: 0.9rem;
        font-weight: 600;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .wt-filters .wt-filters-summary::after {
        content: "";
        display: block;
        flex: none;
        width: 0.5rem;
        height: 0.5rem;
        margin-left: auto;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: rotate(45deg);
        transition: transform 0.2s ease;
    }

    .wt-filters .wt-filters-toggle:checked + .wt-filters-summary::after {
        transform: translateY(0.15rem) rotate(-135deg);
    }

    .wt-filters-toggle:focus-visible + .wt-filters-summary {
        outline: 2px solid var(--pico-primary-focus);
        border-radius: 1rem;
    }

    .wt-filters-body {
        display: none;
        padding: 0 0.9rem 0.7rem;
    }

    .wt-filters-toggle:checked ~ .wt-filters-body {
        display: block;
    }

    .wt-filter-group {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }

    .wt-filter-group + .wt-filter-group {
        margin-top: 0.6rem;
    }

    .wt-filter-extra {
        margin-left: 0;
    }
}

/* Compact cards: less padding, the coloured header stays. On a wide screen the choice sits on the right. */
.wt-card {
    --pico-block-spacing-vertical: 0.65rem;
    --pico-block-spacing-horizontal: 1rem;
}

.wt-card p,
.wt-card .wt-keuze fieldset {
    margin-bottom: 0.3rem;
}

.wt-card .wt-tags:empty {
    display: none;
}

.wt-card-body > :last-child > :last-child,
.wt-card-keuze .wt-keuze > :last-child {
    margin-bottom: 0;
}

@media (min-width: 768px) {
    .wt-card-body {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0 1.5rem;
        align-items: start;
    }

    .wt-card-keuze {
        min-width: 11rem;
        padding-left: 1rem;
        border-left: 1px solid var(--pico-muted-border-color);
    }

    .wt-card-keuze .wt-keuze fieldset {
        flex-direction: column;
        gap: 0.15rem;
    }

    .wt-card-keuze label {
        margin: 0;
        font-size: 0.9rem;
    }
}

/* "Voor wie" on the competition page: a small inline select. */
.wt-voor-wie {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.75rem;
    margin-bottom: var(--pico-spacing);
}

.wt-voor-wie label {
    margin: 0;
    font-weight: 700;
}

.wt-voor-wie select {
    width: auto;
    margin: 0;
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
}

.wt-actionbar .wt-import {
    flex-wrap: nowrap;
}

.wt-actionbar .wt-import button {
    flex: none;
    width: auto;
    margin: 0;
}

/* ---------------------------------------------------------------- practical info and notes */
.wt-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.wt-notes section + section { margin-top: 1rem; }
.wt-notes-from { font-size: .9rem; margin-bottom: .35rem; color: var(--pico-muted-color); }
.wt-notes ul, .wt-notes ol { padding-left: 1.25rem; }
.wt-notes-field { margin-bottom: var(--pico-spacing); }
.wt-notes-field .tox-tinymce { border-radius: var(--pico-border-radius); margin-bottom: .25rem; }
.wt-notes-field small { display: block; margin-top: 0; }

/* ---------------------------------------------------------------- etto (staff) */
.wt-etto-candidates { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); margin-bottom: 1rem; }
.wt-etto-candidate { border: 1px solid var(--pico-muted-border-color); border-radius: var(--pico-border-radius); padding: .75rem 1rem; }
.wt-etto-candidate h3 { font-size: 1rem; margin-bottom: .5rem; }
.wt-etto-candidate dl { display: grid; grid-template-columns: auto 1fr; gap: .15rem .75rem; margin-bottom: .75rem; font-size: .9rem; }
.wt-etto-candidate dt { color: var(--pico-muted-color); }
.wt-etto-candidate dd { margin: 0; }

/* Rollen: the grid of roles and rights scrolls inside its own container; the page itself never scrolls sideways. */
.wt-rights-grid {
    overflow-x: auto;
    max-width: 100%;
}

.wt-rights-grid th,
.wt-rights-grid td {
    white-space: nowrap;
    text-align: center;
}

.wt-rights-grid th:first-child,
.wt-rights-grid td:first-child {
    text-align: left;
}

.wt-rights-grid details form {
    margin-bottom: 0.5rem;
}

.wt-role-checks label {
    display: inline-block;
    margin-right: 1rem;
    white-space: nowrap;
}

/* ---------------------------------------------------------------- deelname per kind */
.wt-grijs { color: var(--pico-muted-color); }

.wt-kind {
    border: 1px solid var(--pico-muted-border-color);
    border-radius: var(--pico-border-radius);
    padding: .6rem .9rem;
    margin-bottom: .6rem;
}
.wt-kind--grijs { background: transparent; border-style: dashed; }
.wt-kind-kop { margin-bottom: .4rem; }
.wt-kind-kop .wt-stap { margin-left: .5rem; color: var(--pico-muted-color); }
.wt-kind-acties { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.wt-kind-actie { margin: 0; }
.wt-kind-actie button { margin: 0; width: auto; }
.wt-kind details { margin: .4rem 0 0; }
.wt-kind details > summary { font-size: .9rem; color: var(--pico-muted-color); cursor: pointer; }
.wt-kind details .wt-kind-acties { margin-top: .4rem; }
.wt-inschrijflijn { margin: .25rem 0 1rem; }

/* "Wie gaat mee": the group lines and the switch for all groups */
.wt-groep { margin-bottom: .4rem; }
.wt-merk { display: inline-block; margin-left: .6rem; white-space: nowrap; }
.wt-switch {
    display: inline-block;
    padding: .2rem .8rem .2rem 2.4rem;
    margin-bottom: .75rem;
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 999px;
    position: relative;
    text-decoration: none;
    font-size: .9rem;
}
.wt-switch::before {
    content: "";
    position: absolute;
    left: .35rem;
    top: 50%;
    width: 1.5rem;
    height: .9rem;
    margin-top: -.45rem;
    border-radius: 999px;
    background: var(--pico-muted-border-color);
}
.wt-switch::after {
    content: "";
    position: absolute;
    left: .45rem;
    top: 50%;
    width: .7rem;
    height: .7rem;
    margin-top: -.35rem;
    border-radius: 50%;
    background: var(--pico-background-color, #fff);
    transition: transform .15s;
}
.wt-switch[aria-checked="true"]::before { background: var(--pico-primary-background); }
.wt-switch[aria-checked="true"]::after { transform: translateX(.6rem); }

.wt-praktisch { margin-bottom: 1rem; }
.wt-praktisch > summary { font-weight: 600; }
.wt-afgelast > summary { color: var(--pico-del-color, #c62828); }

/* Raster: the competition column stays, the rest scrolls inside the container */
.wt-raster { overflow-x: auto; margin-bottom: var(--pico-spacing); }
.wt-raster table { width: auto; min-width: 100%; margin: 0; border-collapse: separate; border-spacing: 0; }
.wt-raster th, .wt-raster td { padding: .35rem .5rem; text-align: center; white-space: nowrap; font-size: .9rem; }
.wt-raster thead th { border-bottom: 1px solid var(--pico-muted-border-color); }
.wt-raster th.wt-raster-groep { border-left: 1px solid var(--pico-muted-border-color); }
.wt-raster tbody th, .wt-raster thead th:first-child {
    position: sticky; left: 0; z-index: 1; text-align: left; background: var(--pico-background-color);
    border-right: 1px solid var(--pico-muted-border-color);
}
.wt-raster tbody th small { display: block; font-weight: normal; color: var(--pico-muted-color); }
.wt-raster tbody td { border-bottom: 1px solid var(--pico-muted-border-color); }
.wt-raster .wt-raster-telling { text-align: right; color: var(--pico-muted-color); }
.wt-raster button.wt-cel-knop, .wt-raster a.wt-cel-knop {
    margin: 0; padding: .1rem .5rem; width: auto; min-width: 2rem; font-size: 1rem; line-height: 1.4;
    background: transparent; border: 1px solid var(--pico-muted-border-color); color: inherit; text-decoration: none;
    display: inline-block;
}
.wt-raster-paneel { min-height: 1rem; }

/* Staff family list */
.wt-filter {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 0.5rem 1rem;
    align-items: center;
}

tr.wt-gezin-leeg td {
    background: color-mix(in srgb, var(--pico-del-color) 12%, transparent);
}

tr.wt-gezin-leeg td strong {
    color: var(--pico-del-color);
}

.wt-inactief {
    opacity: 0.55;
}

/* ---------------------------------------------------------------- group board (/groepen) */
/* Phone: the columns stack, each a foldable <details open>. Wide screen: side by side, the board scrolls sideways. */
.wt-bord-titel {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0 1rem;
}
.wt-groep-nieuw > summary[role=button] { width: auto; }
.wt-groep-nieuw form { max-width: 24rem; }

.wt-bord {
    display: grid;
    gap: .75rem;
    margin-bottom: var(--pico-spacing);
}
@media (min-width: 768px) {
    .wt-bord {
        grid-auto-flow: column;
        grid-auto-columns: minmax(13rem, 1fr);
        align-items: start;
        overflow-x: auto;
        padding-bottom: .5rem;
    }
}
.wt-kolom {
    margin: 0;
    padding: .6rem .75rem;
    border: 1px solid var(--pico-card-border-color);
    border-radius: var(--pico-border-radius);
    background: var(--pico-card-background-color);
}
.wt-kolom > summary.wt-kolom-kop { font-weight: 600; }
.wt-kolom--doel { outline: 2px dashed var(--pico-primary-background); outline-offset: 2px; }
.wt-groep-aanpassen { margin: .25rem 0 0; }
.wt-groep-aanpassen > summary,
.wt-verplaats > summary { font-size: .85rem; color: var(--pico-muted-color); cursor: pointer; }
.wt-groep-aanpassen form { margin-bottom: .5rem; }

.wt-kaarten {
    margin: .5rem 0 0;
    padding: 0;
    min-height: 2.5rem;
}
.wt-kaart {
    list-style: none;
    margin-bottom: .4rem;
    padding: .35rem .5rem;
    border: 1px solid var(--pico-muted-border-color);
    border-radius: calc(var(--pico-border-radius) / 2);
    background: var(--pico-background-color);
}
.wt-kaart[draggable=true] { cursor: grab; }
.wt-kaart.wt-sleept { opacity: .5; }
.wt-kaart small { margin-left: .35rem; color: var(--pico-muted-color); }
.wt-verplaats { display: inline-block; margin: 0 0 0 .35rem; }
.wt-verplaats > summary::after { display: none; }
.wt-verplaats[open] { display: block; margin: .35rem 0 0; }
.wt-verplaats select,
.wt-verplaats button { margin-bottom: .25rem; }
.wt-niet-actief { margin-top: var(--pico-spacing); }
