/* Fortissimo KNKV: programma, uitslagen en standen */

.fkp-day {
    margin: 1.2em 0 0.4em;
    font-size: 1.05rem;
    font-weight: 700;
}

.fkp-day:first-child {
    margin-top: 0;
}

.fkp-pool {
    font-weight: 400;
    font-size: 0.85em;
    color: #777;
}

.fkp-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.fkp-match {
    padding: 7px 0;
    border-bottom: 1px solid #eee;
}

.fkp-time {
    font-weight: 600;
}

.fkp-location a {
    color: inherit;
    text-decoration: underline;
}

.fkp-vs {
    color: #999;
}

/* Program: like the results. Day headings larger and red, matches indented,
   one line per match in the columns Tijd | Wedstrijd | Locatie | Scheidsrechter.
   All days share one grid (subgrid), so the columns line up over the whole list. */
.fkp-program {
    display: grid;
    grid-template-columns: max-content auto auto auto;
    column-gap: 24px;
}

.fkp-program:not(.fkp--team) {
    justify-content: center;
}

.fkp-program.fkp--team {
    justify-content: start;
}

.fkp-program .fkp-head,
.fkp-program .fkp-match {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
    align-items: baseline;
}

.fkp-program .fkp-head {
    padding-bottom: 4px;
    margin-bottom: 0.6em;
    border-bottom: 2px solid #ccc;
    font-size: 0.8em;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #777;
}

.fkp-program .fkp-list {
    display: contents;
}

.fkp-program .fkp-head > :first-child,
.fkp-program .fkp-time {
    padding-left: 1.5em; /* matches indented under the day heading */
}

.fkp-locatie,
.fkp-program .fkp-ref {
    font-size: 0.9em;
    color: #555;
}

.fkp-program .fkp-label {
    display: none; /* the column heading says it; shown again on phones */
}

/* Results: day in a larger font; the score in its own left-aligned column
   right after the matches. All days share one grid (lists use display:
   contents, rows a subgrid), so the scores line up over the whole list. */
.fkp-results {
    display: grid;
    grid-template-columns: max-content max-content;
    column-gap: 24px;
}

.fkp-results .fkp-day,
.fkp-program .fkp-day {
    grid-column: 1 / -1;
    font-size: 1.35rem;
    margin-top: 1.4em;
    color: var(--e-global-color-accent, #e30613); /* club red from the Elementor site settings */
}

.fkp-program .fkp-head + .fkp-day {
    margin-top: 0;
}

/* The matches of a day indented, so every day reads as a block */
.fkp-results .fkp-teams {
    padding-left: 1.5em;
}

/* Page "Uitslagen" (not on a team page): the whole list centred */
.fkp-results:not(.fkp--team) {
    justify-content: center;
}

/* Team page: one line per result, three aligned columns dag | wedstrijd | uitslag, left-aligned */
.fkp-results.fkp--team {
    grid-template-columns: max-content max-content max-content;
    justify-content: start;
    list-style: none;
    margin: 0;
    padding: 0;
}

.fkp-results.fkp--team .fkp-teams {
    padding-left: 0;
}

.fkp-date {
    white-space: nowrap;
    color: #555;
}

.fkp-date-short {
    display: none;
}

.fkp-results .fkp-day:first-child {
    margin-top: 0;
}

.fkp-results .fkp-list {
    display: contents;
}

.fkp-results .fkp-match {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
    align-items: center;
}

.fkp-score {
    font-weight: 700;
    white-space: nowrap;
    text-align: left;
    padding-left: 10px;
    border-left: 3px solid #ccc;
}

.fkp-gewonnen .fkp-score { border-color: #2e7d32; }
.fkp-verloren .fkp-score { border-color: #c62828; }
.fkp-gelijk .fkp-score   { border-color: #f9a825; }

.fkp-pen {
    font-weight: 400;
    font-size: 0.85em;
    color: #666;
}

/* Standings */
.fkp-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0.5em;
    font-size: 0.95em;
}

.fkp-table th,
.fkp-table td {
    padding: 5px 8px;
    border: 0;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.fkp-table thead th {
    background: #f0f0f0;
    border-bottom: 2px solid #ccc;
}

.fkp-table .fkp-num {
    text-align: center;
    width: 3em;
}

.fkp-table tr.fkp-own td {
    background: #fff3f3;
    font-weight: 700;
}

.fkp-note,
.fkp-empty {
    color: #777;
    font-size: 0.9em;
}

@media (max-width: 600px) {
    /* Narrow screens: team names may wrap, the score stays next to them */
    .fkp-results {
        grid-template-columns: minmax(0, 1fr) max-content;
        column-gap: 12px;
    }

    .fkp-results.fkp--team {
        grid-template-columns: max-content minmax(0, 1fr) max-content;
        column-gap: 10px;
    }

    /* Program on phones: time + match on one line, location and referee below it */
    .fkp-program {
        grid-template-columns: max-content minmax(0, 1fr);
        column-gap: 12px;
    }

    .fkp-program .fkp-head {
        display: none;
    }

    .fkp-program .fkp-time {
        padding-left: 0.75em;
    }

    .fkp-program .fkp-locatie,
    .fkp-program .fkp-ref {
        grid-column: 2;
    }

    .fkp-program .fkp-label {
        display: inline;
    }

    .fkp-program .fkp-ref:empty {
        display: none;
    }

    /* Phones: short date ("za 10 okt") so a result stays on one line */
    .fkp-date-long {
        display: none;
    }

    .fkp-date-short {
        display: inline;
    }

    .fkp-table th:nth-child(4),
    .fkp-table td:nth-child(4),
    .fkp-table th:nth-child(5),
    .fkp-table td:nth-child(5),
    .fkp-table th:nth-child(6),
    .fkp-table td:nth-child(6) {
        display: none;
    }
}
