/* =========================================================
   SPEELSCHEMA
========================================================= */

.schedule-page {
    padding: 38px 0 60px;
}


/* =========================================================
   HERO
========================================================= */

.schedule-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;

    margin-bottom: 28px;
    padding: 26px 28px;

    border-radius: 24px;

    background:
        linear-gradient(
            180deg,
            rgba(255,255,255,0.05),
            rgba(255,255,255,0.03)
        );

    border: 1px solid rgba(255,255,255,0.08);

    box-shadow:
        0 14px 34px rgba(0, 0, 0, 0.16);
}


.schedule-hero__content h1 {
    margin: 8px 0 10px;

    font-size: clamp(2rem, 3vw, 2.5rem);
    line-height: 1.1;
}


.schedule-hero__content p {
    margin: 0;

    max-width: 760px;

    color: var(--muted);

    line-height: 1.7;
}


.schedule-hero__actions {
    display: flex;

    gap: 12px;

    flex-wrap: wrap;
}


/* =========================================================
   SECTIES
========================================================= */

.schedule-section {
    margin-bottom: 26px;

    padding: 24px;

    border-radius: 22px;

    background: rgba(255,255,255,0.04);

    border: 1px solid rgba(255,255,255,0.08);

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.14);
}


.schedule-section--league-meta {
    padding: 20px 24px;
}


.schedule-section--weeks {
    overflow: hidden;
}


.schedule-section__header {
    display: flex;

    justify-content: space-between;
    align-items: flex-end;

    gap: 16px;

    margin-bottom: 18px;
}


.schedule-section__eyebrow {
    display: inline-block;

    margin-bottom: 8px;

    font-size: 0.78rem;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 0.08em;

    color: var(--accent);
}


.schedule-section h2 {
    margin: 0;

    font-size: 1.45rem;
    line-height: 1.2;
}


/* =========================================================
   FILTER
========================================================= */

.schedule-filter-form {
    display: grid;

    grid-template-columns: minmax(260px, 420px);

    gap: 18px;
}


.schedule-filter-field label {
    display: block;

    margin-bottom: 8px;

    color: var(--text);

    font-weight: 700;
}


.schedule-filter-field select {
    width: 100%;

    min-height: 52px;

    padding: 0 14px;

    border-radius: 14px;

    border: 1px solid rgba(255,255,255,0.08);

    background: rgba(255,255,255,0.03);

    color: var(--text);

    font-size: 1rem;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}


.schedule-filter-field select:hover {
    background: rgba(255,255,255,0.045);
}


.schedule-filter-field select:focus {
    outline: none;

    border-color: rgba(91, 140, 255, 0.6);

    box-shadow:
        0 0 0 3px rgba(91, 140, 255, 0.15);
}


/* =========================================================
   LEAGUE INFO
========================================================= */

.league-meta-grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(180px, 1fr));

    gap: 16px;
}


.league-meta-card {
    padding: 16px 18px;

    border-radius: 18px;

    background: rgba(255,255,255,0.03);

    border: 1px solid rgba(255,255,255,0.06);
}


.league-meta-card__label {
    display: block;

    margin-bottom: 8px;

    color: var(--muted);

    font-size: 0.88rem;
}


.league-meta-card__value {
    color: var(--text);

    font-size: 1.05rem;

    line-height: 1.3;
}


/* =========================================================
   EMPTY STATE
========================================================= */

.schedule-empty {
    color: var(--muted);

    line-height: 1.7;
}


.schedule-empty p {
    margin: 0;
}


/* =========================================================
   WEEK LIJST
========================================================= */

.schedule-week-list {
    display: grid;

    gap: 12px;
}


/* =========================================================
   WEEK / ACCORDION
========================================================= */

.week-card {
    overflow: hidden;

    margin: 0;

    border-radius: 18px;

    border: 1px solid rgba(255,255,255,0.07);

    background:
        linear-gradient(
            180deg,
            rgba(255,255,255,0.035),
            rgba(255,255,255,0.02)
        );

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}


/*
Native details-marker verwijderen
*/
.week-card > summary {
    list-style: none;
}


.week-card > summary::-webkit-details-marker {
    display: none;
}


/* =========================================================
   WEEK HEADER
========================================================= */

.week-card__header {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 18px;

    min-height: 68px;

    padding: 15px 17px;

    cursor: pointer;

    user-select: none;

    transition:
        background 0.2s ease;
}


.week-card__header:hover {
    background: rgba(255,255,255,0.035);
}


.week-card__header-main {
    display: flex;

    align-items: center;

    gap: 13px;

    min-width: 0;
}


/* =========================================================
   PIJLTJE
========================================================= */

.week-card__chevron {
    display: flex;

    flex: 0 0 auto;

    align-items: center;
    justify-content: center;

    width: 30px;
    height: 30px;

    border-radius: 9px;

    background: rgba(255,255,255,0.05);

    color: var(--muted);

    transition:
        transform 0.25s ease,
        background 0.2s ease,
        color 0.2s ease;
}


.week-card__chevron svg {
    width: 16px;
    height: 16px;
}


.week-card[open] .week-card__chevron {
    transform: rotate(90deg);

    background: rgba(91,140,255,0.14);

    color: #dce7ff;
}


/* =========================================================
   TITEL
========================================================= */

.week-card__title-wrap {
    display: flex;

    align-items: center;

    gap: 12px;

    flex-wrap: wrap;

    min-width: 0;
}


.week-card__header h3 {
    margin: 0;

    color: var(--text);

    font-size: 1.08rem;
    font-weight: 800;

    line-height: 1.25;
}


.week-card__count {
    color: var(--muted);

    font-size: 0.84rem;
    font-weight: 600;

    white-space: nowrap;
}


/* =========================================================
   BADGE
========================================================= */

.week-card__badge {
    display: inline-flex;

    flex: 0 0 auto;

    align-items: center;
    justify-content: center;

    min-width: 96px;

    padding: 7px 12px;

    border-radius: 999px;

    background: rgba(255,255,255,0.06);

    color: var(--muted);

    font-size: 0.78rem;
    font-weight: 750;

    white-space: nowrap;
}


/* =========================================================
   GESPEELDE WEEK
========================================================= */

.week-card--played {
    border-color: rgba(255,255,255,0.065);

    background:
        linear-gradient(
            180deg,
            rgba(255,255,255,0.025),
            rgba(255,255,255,0.018)
        );
}


/*
Niet meer extreem dimmen zoals voorheen.
De week moet duidelijk klikbaar blijven.
*/
.week-card--played .week-card__badge {
    background: rgba(255,255,255,0.055);

    color: var(--muted);
}


/* =========================================================
   EERSTVOLGENDE WEEK
========================================================= */

.week-card--current {
    border-color: rgba(91,140,255,0.48);

    background:
        linear-gradient(
            180deg,
            rgba(91,140,255,0.115),
            rgba(255,255,255,0.028)
        );

    box-shadow:
        0 10px 28px rgba(91,140,255,0.10);
}


.week-card--current .week-card__badge {
    background: rgba(91,140,255,0.18);

    color: #e6eeff;
}


.week-card--current .week-card__chevron {
    background: rgba(91,140,255,0.16);

    color: #dfe8ff;
}


/* =========================================================
   GEDEELTELIJK GESPEELD
========================================================= */

.week-card--partial {
    border-color: rgba(255,255,255,0.10);
}


.week-card--partial .week-card__badge {
    background: rgba(255,255,255,0.08);

    color: var(--text);
}


/* =========================================================
   OPEN WEEK
========================================================= */

.week-card[open] {
    border-color: rgba(255,255,255,0.11);
}


.week-card--current[open] {
    border-color: rgba(91,140,255,0.50);
}


.week-card__body {
    padding:
        0
        14px
        14px;

    animation:
        weekOpen 0.18s ease;
}


@keyframes weekOpen {

    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}


/* =========================================================
   WEDSTRIJDEN
========================================================= */

.week-card__matches {
    display: grid;

    gap: 10px;

    padding-top: 3px;
}


.match-row {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        auto;

    gap: 18px;

    align-items: center;

    padding: 14px 16px;

    border-radius: 14px;

    background: rgba(255,255,255,0.028);

    border: 1px solid rgba(255,255,255,0.055);

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}


.match-row:hover {
    background: rgba(255,255,255,0.045);

    border-color: rgba(255,255,255,0.09);
}


/*
Gespeelde wedstrijd niet meer volledig grijs maken.
*/
.match-row--played {
    opacity: 1;
}


/* =========================================================
   TEAMNAMEN
========================================================= */

.match-row__main {
    min-width: 0;
}


.match-row__teams {
    display: flex;

    flex-wrap: wrap;

    align-items: center;

    gap: 10px;

    margin-bottom: 6px;
}


.match-team {
    color: var(--text);

    font-size: 0.97rem;
    font-weight: 800;

    line-height: 1.35;
}


.match-vs {
    color: var(--muted);

    font-size: 0.82rem;
    font-weight: 700;
}


.match-team--blind {
    color: var(--accent);
}


/* =========================================================
   BAAN
========================================================= */

.match-row__lane {
    color: var(--muted);

    font-size: 0.83rem;

    line-height: 1.5;
}


/* =========================================================
   RECHTERKANT WEDSTRIJD
========================================================= */

.match-row__side {
    display: flex;

    align-items: center;
    justify-content: flex-end;

    min-width: 118px;
}


/* =========================================================
   KOMENDE WEDSTRIJD
========================================================= */

.match-status {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 7px 12px;

    border-radius: 999px;

    background: rgba(255,255,255,0.055);

    color: var(--text);

    font-size: 0.78rem;
    font-weight: 750;

    white-space: nowrap;
}


/* =========================================================
   BEKIJK UITSLAG
========================================================= */

.match-result-link {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 7px;

    padding: 8px 12px;

    border-radius: 999px;

    background: rgba(91,140,255,0.14);

    border: 1px solid rgba(91,140,255,0.20);

    color: #e5edff;

    font-size: 0.78rem;
    font-weight: 800;

    line-height: 1;

    text-decoration: none;

    white-space: nowrap;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}


.match-result-link svg {
    width: 14px;
    height: 14px;

    flex: 0 0 auto;

    transition:
        transform 0.2s ease;
}


.match-result-link:hover {
    background: rgba(91,140,255,0.23);

    border-color: rgba(91,140,255,0.34);

    transform: translateY(-1px);
}


.match-result-link:hover svg {
    transform: translateX(2px);
}


.match-result-link:focus-visible {
    outline: none;

    box-shadow:
        0 0 0 3px rgba(91,140,255,0.22);
}


/* =========================================================
   DESKTOP / TABLET
========================================================= */

@media (max-width: 980px) {

    .schedule-hero {
        flex-direction: column;

        align-items: flex-start;
    }


    .schedule-filter-form {
        grid-template-columns: 1fr;
    }

}


/* =========================================================
   MOBIEL
========================================================= */

@media (max-width: 700px) {

    .schedule-page {
        padding: 28px 0 48px;
    }


    .schedule-hero,
    .schedule-section {
        padding: 18px;

        border-radius: 18px;
    }


    .schedule-section--league-meta {
        padding: 18px;
    }


    .schedule-week-list {
        gap: 10px;
    }


    .week-card {
        border-radius: 15px;
    }


    .week-card__header {
        gap: 10px;

        min-height: 62px;

        padding: 13px;
    }


    .week-card__header-main {
        gap: 9px;

        min-width: 0;
    }


    .week-card__chevron {
        width: 27px;
        height: 27px;

        border-radius: 8px;
    }


    .week-card__chevron svg {
        width: 14px;
        height: 14px;
    }


    .week-card__title-wrap {
        gap: 5px 9px;
    }


    .week-card__header h3 {
        font-size: 0.98rem;
    }


    .week-card__count {
        font-size: 0.76rem;
    }


    .week-card__badge {
        min-width: auto;

        padding: 6px 9px;

        font-size: 0.70rem;
    }


    .week-card__body {
        padding:
            0
            10px
            10px;
    }


    .match-row {
        grid-template-columns: 1fr;

        gap: 12px;

        padding: 13px;

        border-radius: 12px;
    }


    .match-row__teams {
        gap: 7px;

        margin-bottom: 5px;
    }


    .match-team {
        font-size: 0.92rem;
    }


    .match-vs {
        font-size: 0.76rem;
    }


    .match-row__lane {
        font-size: 0.79rem;
    }


    .match-row__side {
        justify-content: flex-start;

        min-width: 0;
    }


    .match-result-link,
    .match-status {
        width: auto;

        padding: 7px 10px;
    }

}


/* =========================================================
   ZEER KLEIN MOBIEL
========================================================= */

@media (max-width: 430px) {

    .week-card__header {
        align-items: flex-start;
    }


    .week-card__badge {
        margin-top: 2px;
    }


    .week-card__count {
        width: 100%;
    }

}