/* ========================================================================
   TEMPLATE-MATCH-ROW – Stilovi za sve modove prikaza meča
   ======================================================================== */

/* ========================================================================
   COMPACT MOD – Header meča (najveći prikaz)
   ======================================================================== */

.match-row--compact {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- Liga + Država + Kolo --- */

.match-row__league {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.match-row__league-img {
    height: 4vw;
    width: auto;
    display: block;
    object-fit: contain;
}

.match-row__league-link {
    font-size: var(--font-h3);
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
}

.match-row__league-link:hover {
    text-decoration: none;
    color: var(--accent);
}

.match-row__country {
    display: flex;
    align-items: center;
    font-size: var(--font-h4);
    color: var(--text-muted);
}

.match-row__flag {
    height: var(--font-h4);
    width: auto;
    object-fit: contain;
}

.match-row__round {
    font-size: var(--font-main);
    color: var(--text-muted);
}

/* --- Timovi i rezultat --- */

.match-row__teams {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 4vw;
}

.match-row__team {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.match-row__team--home {
    justify-content: flex-end;
    text-align: right;
}

.match-row__team--away {
    justify-content: flex-start;
    text-align: left;
}

.match-row__team-logo {
    height: var(--font-jumbo);
    max-width: calc(var(--font-jumbo) * 1.5);
    width: auto;
    flex-shrink: 0;
    object-fit: contain;
}

.match-row__team-link {
    font-size: var(--font-h1);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.match-row__team-link:hover {
    color: var(--accent);
}

/* --- Status / Elapsed --- */

.match-row__status-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 4px 0;
}

.match-row__elapsed {
    font-size: 14px;
    font-weight: 700;
    color: #d32f2f;
    background: #ffebee;
    padding: 2px 10px;
    border-radius: 4px;
}

.match-row__live-badge {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: #d32f2f;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    animation: pulse-live 2s ease-in-out infinite;
}

.match-row__status-badge {
    font-size: 11px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
}

/* --- Rezultat / Vreme --- */

.match-row__score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.match-row__score-value {
    font-size: var(--font-h1);
    font-weight: 900;
    color: var(--text-muted);
}

.match-row__score--live {
    animation: pulse-live 2s ease-in-out infinite;
}

.match-row__score--ft {
    font-size: var(--font-h1);
    font-weight: 900;
    color: var(--text-muted);
}

.match-row__score-time {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a1a;
}

.match-row__score-status {
    font-size: 16px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
}

.match-row__score-sep {
    display: none;
}

/* --- Status ispod rezultata --- */

.match-row__status {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.match-row__status--live {
    color: #d32f2f;
}

.match-row__status--ht {
    color: #e65100;
}

/* --- Meta: datum, stadion, vreme --- */

.match-row__meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: var(--font-secondary);
}

.match-row__date {
    font-weight: 500;
}

.match-row__venue {
    display: flex;
    align-items: center;
    gap: 4px;
}

.match-row__weather {
    display: flex;
    align-items: center;
    gap: 6px;
}

.weather-emoji {
    font-size: 16px;
}

.weather-temp {
    font-weight: 700;
    color: #1a1a1a;
}

.weather-desc {
    color: #666;
}

/* ========================================================================
   STANDARD MOD – H2H i prethodni/budući mečevi
   ======================================================================== */

.match-row--standard {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}

.match-row--standard:hover {
    background: #f9f9f9;
}

/* Datum – dva reda */
.match-row--standard .match-row__date {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
    min-width: 45px;
}

.match-row--standard .match-row__date-day {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.match-row--standard .match-row__date-year {
    font-size: 11px;
    color: #888;
}

/* Zastava / Logo lige */
.match-row--standard .match-row__league-col {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 28px;
}

.match-row--standard .match-row__league-icon {
    width: 20px;
    height: 20px;
    border-radius: 2px;
    object-fit: contain;
}

.match-row--standard .match-row__league-code {
    font-size: 10px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    line-height: 1;
}

/* Timovi + rezultat */
.match-row--standard .match-row__teams--standard {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    overflow: hidden;
}

.match-row--standard .match-row__team-name {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    font-size: var(--font-main);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.match-row--standard .match-row__team-name--home {
    justify-content: flex-end;
}

.match-row--standard .match-row__team-name--away {
    justify-content: flex-start;
}

.match-row--standard .match-row__team-logo {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    border-radius: 50%;
    object-fit: contain;
}

.match-row__team-name-text {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.match-row--standard .match-row__score {
    flex-shrink: 0;
    font-weight: 700;
    font-size: var(--font-main);
    min-width: 45px;
    text-align: center;
}

.match-row--standard .match-row__score--live {
    font-size: var(--font-main);
    color: #d32f2f;
}

.match-row--standard .match-row__score--ft {
    font-size: var(--font-main);
    color: var(--text-muted);;
}

.match-row--standard .match-row__score-time {
    font-size: var(--font-main);
    color: var(--text-muted);
    font-weight: 500;
}

@media (max-width: 480px) {
    .match-row--standard .match-row__date {
        min-width: 38px;
    }
}

/* ========================================================================
   MATCHES MOD – Lista mečeva /matches/
   ======================================================================== */

.match-row--matches {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}

.match-row--matches:hover {
    background: #f9f9f9;
}

.match-row__col--time,
.match-row__col--league,
.match-row__col--result {
    flex-shrink: 0;
    text-align: center;
    min-width: 40px;
}

.match-row__col--teams {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.match-row__team-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.matches-mode__team-logo {
    height: var(--logo-icon);
    width: var(--logo-icon);
    flex-shrink: 0;
    object-fit: contain;
    background: transparent;
}

.match-row__team-name {
    font-size: var(--font-h4);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.match-row__col--result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: var(--font-h4);
}

.match-row__result-row {
    line-height: 1.3;
}

.match-row__league-icon {
    display: block;
    margin: 0 auto 2px;
}

.match-row__league-code {
    font-size: 11px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
}

.match-row__elapsed--live {
    color: #d32f2f;
    font-weight: 700;
    font-size: 13px;
}

/* ========================================================================
   SLIM MOD – Raspored lige (najmanji)
   ======================================================================== */

.match-row--slim {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5vw;
}

.match-row--slim .match-row__team {
    flex: 1;
    display: flex;
}

.match-row--slim .match-row__team--home {
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    width: 100%;
}

.match-row--slim .match-row__score {
    color: var(--text-muted);
}

.match-row--slim .match-row__team--away {
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.match-row--slim .match-row__score-time {
    font-size: var(--font-main);
}

.match-row--slim .match-row__score .match-row__score-value{ 
    font-size: var(--font-main);
}

/* ========================================================================
   COMPACT-16-9 MOD – Compact prikaz za 16:9 karticu
   ======================================================================== */

.match-row--compact-16-9 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2px 4px;
    gap: 1px;
    height: 100%;
    min-height: 0;
    width: 100%;
}

/* --- Liga + Država + Kolo --- */
.match-row__league-16-9 {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 9px;
}

.match-row__league-img-16-9 {
    height: 14px;
    width: auto;
    object-fit: contain;
}

.match-row__league-link-16-9 {
    font-size: 10px;
    font-weight: 700;
    color: #1a1a1a;
    text-decoration: none;
}

.match-row__league-link-16-9:hover {
    color: #1a73e8;
}

.match-row__country-16-9 {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 8px;
    color: #666;
}

.match-row__flag-16-9 {
    height: 10px;
    width: auto;
    object-fit: contain;
}

.match-row__round-16-9 {
    font-size: 8px;
    color: #666;
    font-weight: 600;
}

/* --- Timovi i rezultat --- */
.match-row__teams-16-9 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
}

.match-row__team-16-9 {
    display: flex;
    align-items: center;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.match-row__team-16-9--home {
    justify-content: flex-end;
    text-align: right;
}

.match-row__team-16-9--away {
    justify-content: flex-start;
    text-align: left;
}

.match-row__team-logo-16-9 {
    height: 16px;
    max-width: 16px;
    width: auto;
    flex-shrink: 0;
    object-fit: contain;
}

.match-row__team-link-16-9 {
    font-size: 10px;
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60px;
}

.match-row__team-link-16-9:hover {
    color: #1a73e8;
}

.match-row__score-16-9 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}

.match-row__score-value-16-9 {
    font-size: 12px;
    font-weight: 700;
    color: #1a1a1a;
}

.match-row__score-time-16-9 {
    font-size: 10px;
    font-weight: 600;
    color: #888;
}

.match-row__score-status-16-9 {
    font-size: 9px;
    font-weight: 700;
    color: #e65100;
    text-transform: uppercase;
}

/* --- Status --- */
.match-row__status-16-9 {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    color: #d32f2f;
}

.match-row__elapsed-16-9 {
    background: #ffebee;
    padding: 0 4px;
    border-radius: 2px;
    font-size: 8px;
}

.match-row__live-badge-16-9 {
    background: #d32f2f;
    color: #fff;
    padding: 0 4px;
    border-radius: 2px;
    font-size: 8px;
    animation: pulse-live 2s ease-in-out infinite;
}

/* --- Meta: datum, stadion --- */
.match-row__meta-16-9 {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 8px;
    color: #888;
}

.match-row__date-16-9 {
    font-size: 8px;
    color: #888;
}

.match-row__venue-16-9 {
    font-size: 8px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

/* ========================================================================
   ZAJEDNIČKE ANIMACIJE
   ======================================================================== */

@keyframes pulse-live {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ========================================================================
   RESPONSIVE
   ======================================================================== */

@media (max-width: 768px) {
    .match-row--compact .match-row__league-img {
        height: 8vw;
    }

    .match-row--compact .match-row__teams {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0;
    }

    .match-row--compact .match-row__team--home {
        display: flex;
        flex-direction: column;
        flex-direction: column-reverse;
    }

    .match-row--compact .match-row__score {
        flex: 0 0 auto;
    }

    .match-row--compact .match-row__team--away {
        display: flex;
        flex-direction: column;
    }

    .match-row--compact .match-row__team-link {
        font-size: 14px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .match-row--compact .match-row__score-value {
        font-size: 22px;
    }

    .match-row--compact .match-row__score-time {
        font-size: 20px;
    }

    /* compact-16-9 responsive */
    .match-row__team-link-16-9 {
        font-size: 9px;
        max-width: 45px;
    }
    
    .match-row__team-logo-16-9 {
        height: 14px;
        max-width: 14px;
    }
    
    .match-row__score-value-16-9 {
        font-size: 11px;
    }
    
    .match-row__league-link-16-9 {
        font-size: 9px;
    }
    
    .match-row__league-img-16-9 {
        height: 12px;
    }
    
    .match-row__meta-16-9 {
        font-size: 7px;
        gap: 3px;
    }
    
    .match-row__venue-16-9 {
        max-width: 60px;
    }
}

@media (max-width: 480px) {
    /* compact-16-9 responsive */
    .match-row--compact-16-9 {
        padding: 1px 2px;
        gap: 0px;
    }
    
    .match-row__team-link-16-9 {
        font-size: 8px;
        max-width: 30px;
    }
    
    .match-row__team-logo-16-9 {
        height: 12px;
        max-width: 12px;
    }
    
    .match-row__score-value-16-9 {
        font-size: 10px;
    }
    
    .match-row__score-time-16-9 {
        font-size: 9px;
    }
    
    .match-row__league-link-16-9 {
        font-size: 8px;
    }
    
    .match-row__league-img-16-9 {
        height: 10px;
    }
    
    .match-row__country-16-9 {
        font-size: 7px;
    }
    
    .match-row__round-16-9 {
        font-size: 7px;
    }
    
    .match-row__meta-16-9 {
        font-size: 6px;
        gap: 2px;
    }
    
    .match-row__venue-16-9 {
        max-width: 40px;
    }
    
    .match-row__date-16-9 {
        font-size: 6px;
    }
}