/*
 * WK Poule 2026 - vlaggen layout voor groepsfase + knockoutfase
 * Desktop: vlag + volledige landnaam.
 * Mobiel: vlag + 3-letter FIFA-code.
 */

.match-card-v2,
.knockout-card-v2 {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: .9rem !important;
    align-items: center !important;
    width: 100% !important;
    padding: 1rem !important;
}

.match-card-v2 .match-meta-row,
.knockout-card-v2 .match-meta-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: .75rem;
    width: 100%;
}

.match-card-v2 .match-date-time,
.knockout-card-v2 .match-date-time {
    font-weight: 900;
    color: var(--muted, #c6b08e);
    line-height: 1.15;
    text-align: left;
}

.match-card-v2 .match-meta-row .save-led,
.knockout-card-v2 .match-meta-row .save-led {
    justify-self: end;
    margin-top: .15rem;
}

.match-card-v2 .match-score-row,
.knockout-card-v2 .match-score-row {
    display: grid;
    grid-template-columns: minmax(9rem, 1fr) 4.6rem 1.25rem 4.6rem minmax(9rem, 1fr);
    align-items: center;
    justify-items: center;
    gap: .7rem;
    width: 100%;
}

.team-label {
    width: 100%;
    font-weight: 1000;
    line-height: 1.1;
}

.team-label-home {
    text-align: right;
}

.team-label-away {
    text-align: left;
}

.team-flag-wrap {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    width: 100%;
}

.team-flag {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    border: 2px solid rgba(255, 243, 200, .55);
    box-shadow:
        0 0 0 2px rgba(0, 0, 0, .35),
        0 8px 18px rgba(0, 0, 0, .35);
    background: rgba(255,255,255,.08);
}

.team-full {
    display: inline;
    max-width: 100%;
    font-weight: 1000;
    overflow: hidden;
    text-overflow: ellipsis;
}

.team-code-mobile {
    display: none !important;
    font-weight: 1000;
    letter-spacing: .06em;
}

.match-card-v2 .score-input,
.knockout-card-v2 .score-input {
    width: 4.6rem !important;
    height: 3.2rem !important;
    padding: .35rem !important;
    text-align: center !important;
    font-size: 1.45rem !important;
    font-weight: 1000 !important;
    border-radius: .85rem !important;
}

.match-card-v2 .score-separator,
.knockout-card-v2 .score-separator {
    display: grid !important;
    place-items: center !important;
    width: 100%;
    height: 100%;
    font-size: 1.35rem;
    font-weight: 1000;
    line-height: 1;
    text-align: center;
}

/* Mobiel: rij 1 datum/tijd + led, rij 2 vlag-code-score-score-vlag-code */
@media (max-width: 700px) {
    .match-card-v2,
    .knockout-card-v2 {
        padding: 1rem .85rem !important;
        border-radius: 1.15rem !important;
        gap: .85rem !important;
    }

    .match-card-v2 .match-date-time,
    .knockout-card-v2 .match-date-time {
        font-size: .86rem;
    }

    .match-card-v2 .match-score-row,
    .knockout-card-v2 .match-score-row {
        grid-template-columns: 4.2rem minmax(3.25rem, 1fr) .85rem minmax(3.25rem, 1fr) 4.2rem !important;
        gap: .34rem !important;
        align-items: center !important;
        justify-items: center !important;
    }

    .team-label,
    .team-label-home,
    .team-label-away {
        text-align: center !important;
        width: 100%;
    }

    .team-full {
        display: none !important;
    }

    .team-code-mobile {
        display: inline !important;
        font-size: .95rem;
        line-height: 1;
        text-align: center;
    }

    .team-flag {
        width: 52px;
        height: 52px;
    }

    .match-card-v2 .score-input,
    .knockout-card-v2 .score-input {
        width: 100% !important;
        max-width: 4.35rem !important;
        height: 3.35rem !important;
        font-size: 1.5rem !important;
        padding: .2rem !important;
    }

    .match-card-v2 .score-separator,
    .knockout-card-v2 .score-separator {
        font-size: 1.15rem;
    }
}

/* Heel smal: net iets compacter */
@media (max-width: 380px) {
    .match-card-v2 .match-score-row,
    .knockout-card-v2 .match-score-row {
        grid-template-columns: 3.7rem minmax(3rem, 1fr) .7rem minmax(3rem, 1fr) 3.7rem !important;
        gap: .24rem !important;
    }

    .team-flag {
        width: 44px;
        height: 44px;
    }

    .team-code-mobile {
        font-size: .82rem;
    }

    .match-card-v2 .score-input,
    .knockout-card-v2 .score-input {
        height: 3.05rem !important;
        font-size: 1.32rem !important;
    }
}

.fifa-match-number {
    display: block;
    width: 100%;
    text-align: center;
    margin: -.2rem 0 .15rem;
    font-size: .78rem;
    font-weight: 1000;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--gold, #ffc43b);
    opacity: .95;
}