/* Algemene styling */
.uitslagen-tabel {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    margin-bottom: 2em;
}

.uitslagen-tabel th,
.uitslagen-tabel td {
    padding: 0.5em;
    border-bottom: 1px solid #ddd;
    text-align: left;
    word-wrap: break-word;
}

/* Desktop kolommen */
.uitslagen-tabel th:nth-child(1),
.uitslagen-tabel td:nth-child(1) { width: 15%; } /* Datum */
.uitslagen-tabel th:nth-child(2),
.uitslagen-tabel td:nth-child(2) { width: 15%; } /* Thuis */
.uitslagen-tabel th:nth-child(3),
.uitslagen-tabel td:nth-child(3) { width: 5%; }  /* : */
.uitslagen-tabel th:nth-child(4),
.uitslagen-tabel td:nth-child(4) { width: 15%; } /* Uit */
.uitslagen-tabel th:nth-child(5),
.uitslagen-tabel td:nth-child(5) { width: 15%; } /* Stand */
.uitslagen-tabel th:nth-child(6),
.uitslagen-tabel td:nth-child(6) { width: 35%; } /* Status */

/* Mobiele layout als cards */
.uitslagen-kaarten {
    display: none; /* standaard desktop */
    flex-wrap: wrap;
    gap: 16px;
}

.wedstrijd-card {
    flex: 1 1 calc(33% - 16px); /* 3 kaartjes per rij */
    background: #f9f9f9;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
}

.wedstrijd-card .datum {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 12px;
    width: 100%;
    text-align: center;
    white-space: nowrap;
}

.wedstrijd-card .teams-score {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;   /* voorkomt overlappen bij smalle schermen */
    gap: 4px;
    margin: 8px 0;
}

.wedstrijd-card .teams {
    font-weight: bold;
    flex: 1 1 auto;
    text-align: center;
}

.wedstrijd-card .score {
    font-weight: bold;
    flex: 0 0 auto;
    margin-left: 8px;
    text-align: right;
}

/* Tablet */
@media (max-width: 900px) {
    .uitslagen-tabel { display: none; }
    .uitslagen-kaarten { display: flex; flex-direction: column; }

    .wedstrijd-card {
        flex: 1 1 100%;
        border: 1px solid #ddd;
        padding: 10px;
        margin-bottom: 10px;
        border-radius: 6px;
        background: #f9f9f9;
        text-align: left;
    }

    .wedstrijd-card .datum {
        text-align: left;
        margin-bottom: 5px;
    }

    .wedstrijd-card .teams-score {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 4px;
        margin-bottom: 5px;
    }

    .wedstrijd-card .teams {
        text-align: left;
        flex: 1 1 auto;
    }

    .wedstrijd-card .score {
        text-align: right;
        flex: 0 0 auto;
        margin-left: 10px;
    }

    .wedstrijd-card .status {
        text-align: left;
        color: #555;
        font-size: 0.9em;
    }
}

/* Mobiel */
@media (max-width: 600px) {
    .wedstrijd-card {
        flex: 1 1 100%; /* 1 kaartje per rij */
        max-width: 100%;
    }

    /* Score altijd onder teams */
    .wedstrijd-card .teams-score {
        flex-direction: column;
        align-items: flex-start;
    }

    .wedstrijd-card .score {
        margin-left: 0;
        margin-top: 4px;
        text-align: left;
    }
}

/* Desktop */
@media (min-width: 901px) {
    .uitslagen-kaarten { display: none; }
}


