/**
 * Nevobo Competitie - Frontend styles
 * Version: 1.0.0
 */

/* =========================================================
   Algemene tabellen
   ========================================================= */

.nvcmp-table-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 1.5rem 0;
    overflow-x: auto;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

.nvcmp-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    box-sizing: border-box;
}

.nvcmp-table th,
.nvcmp-table td {
    padding: 0.75rem 0.9rem;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
    box-sizing: border-box;
}

.nvcmp-table thead th {
    background: #c8102e;
    color: #fff;
    font-weight: 600;
    white-space: nowrap;
}

.nvcmp-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.nvcmp-table tbody tr:hover {
    background: #f3f4f6;
}

.nvcmp-table td {
    white-space: normal;
    overflow-wrap: break-word;
}

/* Datum en tijd compact houden */

.nvcmp-programma td:first-child,
.nvcmp-results-table td:first-child {
    white-space: nowrap;
}

.nvcmp-programma td:nth-child(2),
.nvcmp-results-table td:nth-child(2) {
    white-space: nowrap;
}

/* Uitslag */

.nvcmp-score {
    font-weight: 700;
    white-space: nowrap;
}

/* =========================================================
   Stand
   ========================================================= */

.nvcmp-standings-table th:first-child,
.nvcmp-standings-table td:first-child {
    width: 55px;
}

.nvcmp-standings-table th:nth-child(3),
.nvcmp-standings-table td:nth-child(3),
.nvcmp-standings-table th:nth-child(4),
.nvcmp-standings-table td:nth-child(4) {
    width: 55px;
    text-align: center;
}

.nvcmp-standings-table th:last-child,
.nvcmp-standings-table td:last-child {
    width: 90px;
    white-space: nowrap;
}

/* =========================================================
   Meldingen
   ========================================================= */

.nvcmp-notice {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    width: 100%;
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    border-left: 5px solid #c8102e;
    background: #f8fafc;
    box-sizing: border-box;
}

.nvcmp-notice__icon {
    flex: 0 0 auto;
    font-size: 1.5rem;
    line-height: 1;
}

.nvcmp-notice__content {
    flex: 1;
    min-width: 0;
}

.nvcmp-notice__title {
    margin-bottom: 0.35rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.nvcmp-notice__text {
    color: #4b5563;
    line-height: 1.6;
}

.nvcmp-notice--info {
    border-left-color: #2563eb;
    background: #eff6ff;
}

.nvcmp-notice--success {
    border-left-color: #16a34a;
    background: #f0fdf4;
}

.nvcmp-notice--warning {
    border-left-color: #d97706;
    background: #fffbeb;
}

.nvcmp-notice--error {
    border-left-color: #dc2626;
    background: #fef2f2;
}

/* =========================================================
   Mobiel
   ========================================================= */

@media (max-width: 768px) {

    .nvcmp-table-wrapper {
        margin: 1rem 0;
        overflow-x: visible;
    }

    .nvcmp-table {
        width: 100%;
        min-width: 0;
        table-layout: fixed;
        font-size: 0.78rem;
        line-height: 1.35;
    }

    .nvcmp-table th,
    .nvcmp-table td {
        padding: 0.5rem 0.35rem;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    /*
     * Programma:
     * datum en tijd compact,
     * teams krijgen de meeste ruimte,
     * locatie blijft goed leesbaar.
     */

    .nvcmp-programma th:nth-child(1),
    .nvcmp-programma td:nth-child(1) {
        width: 16%;
    }

    .nvcmp-programma th:nth-child(2),
    .nvcmp-programma td:nth-child(2) {
        width: 10%;
    }

    .nvcmp-programma th:nth-child(3),
    .nvcmp-programma td:nth-child(3) {
        width: 27%;
    }

    .nvcmp-programma th:nth-child(4),
    .nvcmp-programma td:nth-child(4) {
        width: 27%;
    }

    .nvcmp-programma th:nth-child(5),
    .nvcmp-programma td:nth-child(5) {
        width: 20%;
    }

    /*
     * Uitslagen
     */

    .nvcmp-results-table th:nth-child(1),
    .nvcmp-results-table td:nth-child(1) {
        width: 17%;
    }

    .nvcmp-results-table th:nth-child(2),
    .nvcmp-results-table td:nth-child(2) {
        width: 11%;
    }

    .nvcmp-results-table th:nth-child(3),
    .nvcmp-results-table td:nth-child(3),
    .nvcmp-results-table th:nth-child(4),
    .nvcmp-results-table td:nth-child(4) {
        width: 29%;
    }

    .nvcmp-results-table th:nth-child(5),
    .nvcmp-results-table td:nth-child(5) {
        width: 14%;
    }

    /*
     * Stand
     */

    .nvcmp-standings-table th,
    .nvcmp-standings-table td {
        padding-left: 0.3rem;
        padding-right: 0.3rem;
    }

    .nvcmp-standings-table th:first-child,
    .nvcmp-standings-table td:first-child {
        width: 10%;
    }

    .nvcmp-standings-table th:nth-child(2),
    .nvcmp-standings-table td:nth-child(2) {
        width: 50%;
    }

    .nvcmp-standings-table th:nth-child(3),
    .nvcmp-standings-table td:nth-child(3),
    .nvcmp-standings-table th:nth-child(4),
    .nvcmp-standings-table td:nth-child(4) {
        width: 10%;
    }

    .nvcmp-standings-table th:last-child,
    .nvcmp-standings-table td:last-child {
        width: 20%;
    }

    .nvcmp-notice {
        padding: 0.9rem 1rem;
    }

    .nvcmp-notice__title {
        font-size: 1rem;
    }
}

/* Extra kleine telefoons */

@media (max-width: 480px) {

    .nvcmp-table {
        font-size: 0.72rem;
    }

    .nvcmp-table th,
    .nvcmp-table td {
        padding: 0.45rem 0.25rem;
    }
}