/* ============================================================
   MATCH PAGE – osnovni stilovi
   ============================================================ */

.tipster-match-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* ============================================================
   HEADER
   ============================================================ */
.match-header {
    padding: 2vw;
    border: 1px solid var(--border-color);
}

.match-league {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    text-align: center;
    margin-bottom: 20px;
}

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

.match-league-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

.match-league-name:hover {
    color: var(--accent);
}

.match-league-country {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--font-h4);
    color: var(--text-muted);
}

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

/* Runda */
.match-league-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
}

.match-round {
    font-size: var(--font-main);
    color: var(--text-muted);
    background: var(--bg-highlight);
    padding: 2px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}


/* Timovi i rezultat */
.match-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    gap: 20px;
}

.match-team-home,
.match-team-away {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.match-team-home {
    justify-content: flex-end;
}

.match-team-away {
    justify-content: flex-start;
}

.match-team-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.match-team-name {
    font-size: var(--font-h1);
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
}

.match-team-name:hover {
    color: var(--accent);
}

.match-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0 20px;
    min-width: 100px;
}

.match-score-value {
    font-size: var(--font-h1);
    font-weight: 900 !important;
}

@keyframes pulse-score {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

/* Minut (treperi) */
.match-score-minute {
    font-size: clamp(1rem, 0.9rem + 0.3vw, 1.2rem);
    font-weight: 700;
    color: var(--accent);
    animation: pulse-live 1.5s ease-in-out infinite;
}

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

/* Meta podaci */
.match-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    font-size: var(--font-secondary);
    text-align: center;
    margin-bottom: 20px;
}

.venue-separator {
    display: inline-block;
    width: 0.4em;
    height: 0.4em;
    margin: 0 0.5em;
    border: 1px solid var(--text-muted);
    border-radius: 50%;
    background: transparent;
    vertical-align: middle;
}

/* Vremenska prognoza */
.match-weather {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: var(--font-secondary);
}

.weather-temp {
    font-weight: 600;
    color: var(--text-main);
}

.weather-desc {
    font-style: italic;
}

/* ============================================================
   TABOVI
   ============================================================ */
.match-tabs {
    font-size: var(--font-h4);
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.match-tab-btn {
    flex: 1;
    padding: 12px 20px;
    text-align: center;
    text-decoration: none;
    color: var(--text-light);
    background: transparent;
    border: none;
    border-right: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
}
.match-tab-btn:last-child {
    border-right: none;
}
.match-tab-btn:hover {
    background: var(--bg-highlight);
    color: var(--text-muted);
}
.match-tab-btn.active {
    background: var(--bg-header);
    color: var(--text-main);
}

/* ============================================================
   TAB PANELI
   ============================================================ */
.match-tab-panel {
    display: none;
    padding: 0 2vw;
}
.match-tab-panel.active {
    display: block;
}

/* ============================================================
   RESTRICTED CONTENT
   ============================================================ */
.match-restricted {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-muted);
}
.match-restricted p {
    margin: 8px 0;
}
.match-restricted a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}
.match-restricted a:hover {
    text-decoration: underline;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .match-league-logo {
        height: 8vw;
    }

    .match-teams {
        flex-direction: row;
        justify-content: space-around;
    }

    .match-team-home,
    .match-team-away {
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-width: 0; /* KLJUČNO: dozvoljava skupljanje */
        width: 100%; /* ili max-width: 100% */
    }

    .match-team-logo {
        height: 30px;
        order: 0;
    }

    .match-team-name {
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
        min-width: 0;
        order: 1;
    }

    .match-score {
        padding: 8px 10px;
        min-width: 70px;
    }


    .match-score-minute {
        font-size: clamp(0.9rem, 0.8rem + 0.3vw, 1rem);
    }

    .match-tabs {
        flex-direction: row;
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .match-tab-btn {
        flex: 1 0 auto;
        padding: 10px 15px;
        white-space: nowrap;
    }

    .match-tab-panel {
        padding: 15px;
    }

    .match-meta {
        flex-direction: column;
        align-items: center;
        gap: 4px;
    }
}




