/* =============================================================
   WK Poule – Wedstrijdoverzicht  |  style.css
   Alle selectors zijn geprefixed met .wkp- voor isolatie
   ============================================================= */

/* ── Reset & wrap ─────────────────────────────────────────── */
.wkp-wrap *,
.wkp-wrap *::before,
.wkp-wrap *::after {
    box-sizing: border-box;
}

.wkp-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1e293b;
    line-height: 1.4;
}

/* ── Sectie & datum-header ────────────────────────────────── */
.wkp-section {
    margin-bottom: 2.5rem;
}

.wkp-date-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.wkp-date-line {
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.wkp-section--dutch .wkp-date-line {
    background: #fed7aa;
}

.wkp-date-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #64748b;
    white-space: nowrap;
}

.wkp-section--dutch .wkp-date-label {
    color: #c2410c;
}

/* ── Grid ─────────────────────────────────────────────────── */
.wkp-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.wkp-grid > .wkp-card {
    flex: 0 0 calc(33.33333333% - 1rem);
    width: calc(33.33333333% - 1rem);
}

/* ── Match card ───────────────────────────────────────────── */
.wkp-card {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 0.875rem;
    overflow: hidden;
    transition: box-shadow 0.15s, border-color 0.15s;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.wkp-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.10);
}

/* Gespeeld */
.wkp-card--played {
    border-color: #bbf7d0;
}

/* Gepland */
.wkp-card--scheduled {
    border-color: #e2e8f0;
}

/* Live */
.wkp-card--live {
    border-color: #fca5a5;
    animation: wkp-live-pulse 2s ease-in-out infinite;
}

@keyframes wkp-live-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,.25); }
    50%       { box-shadow: 0 0 0 6px rgba(239,68,68,.0); }
}

/* Nederland */
.wkp-card--dutch {
    border-color: #fdba74;
    background: #fff7ed;
}

.wkp-card--dutch.wkp-card--played {
    border-color: #f97316;
}

/* ── Status-balk (bovenaan kaart) ─────────────────────────── */
.wkp-card__status-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
}

.wkp-card--dutch .wkp-card__status-bar {
    background: #fff7ed;
    border-bottom-color: #fed7aa;
}

/* ── Badges ───────────────────────────────────────────────── */
.wkp-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.wkp-badge--scheduled {
    background: #f1f5f9;
    color: #64748b;
}

.wkp-badge--played {
    background: #dcfce7;
    color: #166534;
}

.wkp-badge--live {
    background: #fee2e2;
    color: #b91c1c;
}

.wkp-badge--group {
    background: #eff6ff;
    color: #1d4ed8;
    margin-left: auto;
}

/* Live-knipperend bolletje */
.wkp-live-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ef4444;
    animation: wkp-dot-blink 1s step-start infinite;
}

@keyframes wkp-dot-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* ── Teams & score-sectie ─────────────────────────────────── */
.wkp-card__teams {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 1.25rem 1.25rem;
}

/* ── Vlag ─────────────────────────────────────────────────── */
.wkp-flag {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

/* ── Team ─────────────────────────────────────────────────── */
.wkp-team {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    text-align: center;
}

.wkp-team__name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.wkp-team--winner .wkp-team__name {
    color: #166534;
    font-weight: 700;
}

.wkp-team--winner .wkp-flag {
    box-shadow: 0 0 0 3px #4ade80;
}

/* ── Score / Tijd ─────────────────────────────────────────── */
.wkp-score {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    min-width: 5.5rem;
}

/* Gespeelde wedstrijd: groot scorebord */
.wkp-score__board {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wkp-score__num {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1e293b;
    min-width: 1.8rem;
    text-align: center;
    line-height: 1;
}

.wkp-score__num--win {
    color: #16a34a;
}

.wkp-score__sep {
    font-size: 1.4rem;
    font-weight: 700;
    color: #94a3b8;
    line-height: 1;
}

.wkp-score__label {
    font-size: 0.65rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.wkp-score__label--live {
    color: #ef4444;
    animation: wkp-dot-blink 1s step-start infinite;
}

/* Geplande wedstrijd: tijd */
.wkp-score__time {
    font-size: 1.5rem;
    font-weight: 800;
    color: #334155;
    letter-spacing: -0.02em;
    line-height: 1;
}

.wkp-score__date {
    font-size: 0.68rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: lowercase;
}

/* ── Meta-balk (onderkant kaart) ──────────────────────────── */
.wkp-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem 0.5rem;
    padding: 0.65rem 1rem;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
    font-size: 0.72rem;
    color: #94a3b8;
}

.wkp-card--dutch .wkp-card__meta {
    background: #fff7ed;
    border-top-color: #fed7aa;
    color: #c2410c;
}

.wkp-meta-sep {
    color: #cbd5e1;
}

/* ── Geen matches melding ─────────────────────────────────── */
.wkp-no-matches {
    padding: 2rem;
    text-align: center;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
    .wkp-grid > .wkp-card {
        flex: 0 0 calc(50% - 0.75rem);
        width: calc(50% - 0.75rem);
    }
}

@media (max-width: 560px) {
    .wkp-grid > .wkp-card {
        flex: 0 0 100%;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .wkp-flag {
        width: 2rem;
        height: 2rem;
    }

    .wkp-score__num {
        font-size: 1.4rem;
    }

    .wkp-score__time {
        font-size: 1.2rem;
    }

    .wkp-team__name {
        font-size: 0.7rem;
    }
}
