/* ============================================================
   COMPETITION PAGE – osnovni stilovi
   ============================================================ */

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

/* ============================================================
   HEADER
   ============================================================ */
.competition-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 2vw;
}

.competition-logo img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.competition-title h1 {
    margin: 0;
    font-size: var(--font-h1);
    color: var(--text-main);
}

.competition-country {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: var(--font-h2);
}

.competition-flag {
    height: 20px;
    width: auto;
    object-fit: contain;
}

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

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



/* ============================================================
   FIXTURES – HORIZONTALNI SKROL
   ============================================================ */

.fixtures-scroll-wrapper {
    overflow: hidden;
    position: relative;
    width: 100%;
}

.fixtures-scroll-container {
    display: flex;
    flex-direction: row;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 0 20px 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
}

/* Sakrij scrollbar (ali ostavimo funkcionalnost) */
.fixtures-scroll-container::-webkit-scrollbar {
    height: 6px;
}
.fixtures-scroll-container::-webkit-scrollbar-track {
    background: var(--border-color);
    border-radius: 3px;
}
.fixtures-scroll-container::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

/* Svako kolo – kartica */
.fixtures-round-item {
    flex: 0 0 auto;
    width: 320px;
    min-width: 280px;
    max-width: 400px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    scroll-snap-align: start;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.fixtures-round-item.active {
    opacity: 1;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent);
}

/* Naziv kola – klikabilan */
.fixtures-round-header {
    cursor: pointer;
    padding: 6px 0 10px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 10px;
    text-align: center;
}

.fixtures-round-header:hover .fixtures-round-name {
    color: var(--accent);
}

.fixtures-round-name {
    font-size: clamp(1rem, 0.9rem + 0.3vw, 1.2rem);
    font-weight: 600;
    color: var(--text-main);
    transition: color 0.2s ease;
}

/* Mečevi unutar kola */
.fixtures-round-matches {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 400px;
    overflow-y: auto;
}

.fixtures-round-matches .tipster-match-row {
    padding: 4px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: clamp(0.85rem, 0.75rem + 0.3vw, 1rem);
}

.fixtures-round-matches .tipster-match-row:last-child {
    border-bottom: none;
}

.no-matches {
    color: var(--text-muted);
    font-size: clamp(0.85rem, 0.75rem + 0.3vw, 1rem);
    text-align: center;
    padding: 10px 0;
}







/* ============================================================
   RESPONSIVE – smanji širinu kartica na mobilnom
   ============================================================ */
@media (max-width: 768px) {
    /* Kartice */
    .fixtures-round-item {
        width: 260px;
        min-width: 220px;
        padding: 10px 12px;
    }
    .fixtures-scroll-container {
        gap: 12px;
        padding: 8px 0 16px 0;
    }
    .fixtures-round-matches .tipster-match-row {
        padding: 2px 0;
        font-size: clamp(0.75rem, 0.7rem + 0.3vw, 0.9rem);
    }
    


}

/* ============================================================
   FIXTURES – STRELICE U ISTOM REDU SA TABOVIMA
   ============================================================ */

.fixtures-tabs-wrapper {
    display: flex;
    align-items: center;
    padding: 0;
}

/* Strelica dugmad */
.fixtures-nav-arrow {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.2s ease;
}

.fixtures-nav-arrow:hover:not(.disabled) {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.fixtures-nav-arrow.disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

/* Tabovi */
#fixtures-tabs-container {
    flex: 1;
    display: flex;
    min-width: 0;
    font-size: var(--font-secondary);
}

#fixtures-tabs-container .tipster-tab-btn {
    flex: 1;
    min-width: 0;
    padding: 8px 4px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-main);
}

#fixtures-tabs-container .tipster-tab-btn.active {
    color: var(--text-main);
    border-color: var(--accent);
}

#fixtures-tabs-container .tipster-tab-btn.active .tipster-tab-label,
#fixtures-tabs-container .tipster-tab-btn.active .tipster-tab-date {
    color: var(--text-main);
}

/* Prazni tabovi – placeholder */
.fixtures-tab-empty {
    flex: 1;
    text-align: center;
    padding: 8px 4px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: transparent;
    opacity: 0.4;
    cursor: default;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

#fixtures-tabs-container .tipster-tab-label {
    
    
    white-space: normal;
    
    text-align: center;
}



/* Panel sa mečevima */
.fixtures-panel {
    padding: 0;
}

.fixtures-panel .tipster-matches-list {
    padding: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    /* Sakrij sve tabove osim aktivnog */
    #fixtures-tabs-container .fixtures-tab:not(.active) {
        display: none !important;
    }
    #fixtures-tabs-container .fixtures-tab-empty {
        display: none !important;
    }
    /* Aktivni tab neka bude širi */
    #fixtures-tabs-container .fixtures-tab.active {
        flex: 1;
        min-width: 0;
        border: none;
    }
    #fixtures-tabs-container .tipster-tab-btn.active {
        border: none;
    }
    /* Strelice ostaju vidljive */
    .fixtures-nav-arrow {
        display: inline-flex !important;
    }
}

/* ============================================================
   FIXTURES – GRUPISANJE PO DATUMIMA
   ============================================================ */

.fixtures-matches-by-date {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0;
    border-bottom: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-card);
}

.fixtures-date-group {
    overflow: hidden;

}

.fixtures-date-heading {
    padding: 2vw;
}

.fixtures-date-matches {
    padding: 4px 10px;
}

.fixtures-date-matches a:last-child {
    border-bottom: none;
}

/* ============================================================
   RESPONSIVE – samo skaliranje, bez promene rasporeda
   ============================================================ */

@media (max-width: 768px) {
    /* Header – i dalje flex row, samo manji */
    .competition-header {
        gap: 12px;
        padding: 12px 15px;
    }

    .competition-logo img {
        width: 50px;
        height: 50px;
    }

    .competition-title h1 {
        font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.6rem);
    }

    .competition-country {
        font-size: clamp(0.8rem, 0.7rem + 0.3vw, 0.95rem);
    }

    .competition-flag {
        height: 16px;
    }

    /* Tabovi – i dalje flex row, bez prelaska u kolonu */
   

    .competition-tab-btn {
        flex: 1 0 auto;
        padding: 8px 12px;
        white-space: nowrap;
        border-right: 1px solid var(--border-color);
        border-bottom: none;
        text-align: center;
    }

    .competition-tab-btn:last-child {
        border-right: none;
    }

    /* Tab paneli – bez promene */
    .competition-tab-panel {
        padding: 0 2vw;
    }
}

/* ============================================================
   TABLE TAB – STANDINGS (sa formom)
   ============================================================ */

.standings-group {
    padding-top: 2vw;
}

.standings-group-title {
    font-size: clamp(1.2rem, 1rem + 0.4vw, 1.6rem);
    font-weight: 600;
    color: var(--text-main);
}

.standings-table {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    background: var(--bg-card);
}

.standings-row {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    gap: 4px;
}

.standings-row:last-child {
    border-bottom: none;
}

.standings-header {
    background: var(--bg-header);
    font-weight: 600;
    color: var(--text-muted);
    font-size: var(--font-main);
}

/* Kolone – širine su fiksne ili fleksibilne */
.col-pos {
    width: 30px;
    text-align: center;
    flex-shrink: 0;
}

.col-team {
    flex: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.col-stat {
    width: 30px;
    text-align: center;
    flex-shrink: 0;
}

.col-pts {
    width: 35px;
    text-align: center;
    font-weight: 700;
    flex-shrink: 0;
}

/* Forma */
.col-form {
    width: 100px;
    text-align: center;
    flex-shrink: 0;
    display: flex;
    gap: 4px;
    justify-content: center;
    align-items: center;
}

.form-circle {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.form-win {
    background: #2e7d32; /* zelena */
    border-color: #2e7d32;
}

.form-draw {
    background: #fbc02d; /* žuta/siva */
    border-color: #fbc02d;
}

.form-loss {
    background: #d32f2f; /* crvena */
    border-color: #d32f2f;
}

.form-unknown {
    background: var(--text-muted);
    border-color: var(--text-muted);
    opacity: 0.3;
}

.form-empty {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.team-logo-small {
    height: var(--font-main);
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.standings-row .col-team a {
    color: var(--text-main);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.standings-row .col-team a:hover {
    color: var(--accent);
}

/* ============================================================
   MOBILNI (≤600px) – sakrij GF, GA i Form
   ============================================================ */
@media (max-width: 600px) {
    .standings-row {
        padding: 6px 8px;
        font-size: clamp(0.75rem, 0.65rem + 0.3vw, 0.85rem);
    }

    /* Sakrij GF (7. child), GA (8. child) i Form (11. child) */
    .standings-row .col-stat:nth-child(7),
    .standings-row .col-stat:nth-child(8),
    .standings-row .col-form {
        display: none !important;
    }

    /* GD (9. child) ostaje kao 7. vidljiva */
    .col-pos { width: 25px; }
    .col-team { flex: 3; }
    .col-stat { width: 25px; }
    .col-pts { width: 30px; }
}

/* ============================================================
   MOBILNI MINI (≤400px) – sakrij W, D, L
   ============================================================ */
@media (max-width: 400px) {
    /* Sakrij W (4. child), D (5. child), L (6. child) */
    .standings-row .col-stat:nth-child(4),
    .standings-row .col-stat:nth-child(5),
    .standings-row .col-stat:nth-child(6) {
        display: none !important;
    }

    .col-stat { width: 25px; }
    .col-pts { width: 30px; }
}