/* ============================================================
   TEAM PAGE – OSLOVNI STILOVI
   ============================================================ */

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

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

.team-logo img {
    height: 5vw;
    width: auto;
    object-fit: contain;
}

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

.team-country {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: clamp(0.9rem, 0.8rem + 0.3vw, 1.1rem);
}

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

/* ============================================================
   TABOVI (glavni)
   ============================================================ */
.team-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02), 0 2px 5px rgba(0, 0, 0, 0.01);
    overflow: hidden;
}

.team-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;
}

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

.team-tab-btn:hover {
    background: var(--bg-highlight);
    color: var(--text-muted);
}

.team-tab-btn.active {
    background: var(--bg-header);
    color: var(--text-main);
}

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

.team-tab-panel.active {
    display: block;
}

/* ============================================================
   INFO TAB
   ============================================================ */
.team-info-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    align-items: baseline;
    gap: 16px;
}

.info-label {
    font-weight: 600;
    min-width: 100px;
    color: var(--text-muted);
}

.info-value {
    color: var(--text-main);
}

.venue-image-wrapper {
    margin-top: 16px;
}

.venue-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

/* ============================================================
   TEAM FIXTURES – DESKTOP (dve kolone)
   ============================================================ */
.team-fixtures-desktop {
    display: flex;
    flex-direction: row;
    gap: 2vw;
    margin-top: 2vw;
    align-items: flex-start; /* sprečava rastezanje kolona */
}

.team-fixtures-column {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.team-fixtures-title {
    font-size: clamp(1.1rem, 1rem + 0.3vw, 1.3rem);
    font-weight: 600;
    color: var(--text-main);
    margin: 0 0 12px 0;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--border-color);
}

.team-fixtures-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 4px;
}

.team-fixtures-list:last-child
 {
    border-bottom: none;
}

.team-fixtures-empty {
    color: var(--text-muted);
    font-style: italic;
    padding: 10px 0;
}

/* ============================================================
   MOBILNI – subtabovi (Upcoming / Results)
   ============================================================ */
.team-fixtures-mobile {
    display: none;
    margin-top: 10px;
}

.team-fixtures-subtabs {
    display: flex;
    gap: 0;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.team-fixtures-subtab {
    flex: 1;
    padding: 10px 15px;
    text-align: center;
    background: transparent;
    border: none;
    border-right: 1px solid var(--border-color);
    font-weight: 600;
    font-size: clamp(0.9rem, 0.8rem + 0.3vw, 1rem);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.team-fixtures-subtab:last-child {
    border-right: none;
}

.team-fixtures-subtab.active {
    background: var(--accent);
    color: #fff;
}

.team-fixtures-subtab-panel {
    display: none;
}

.team-fixtures-subtab-panel.active {
    display: block;
}

/* ============================================================
   SLIM MOD – prilagodba unutar tima
   ============================================================ */
.team-fixtures-list .tipster-match-row-wrapper {
    padding: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.35s ease, padding 0.3s ease, margin 0.3s ease;
}

.team-fixtures-list .tipster-match-row-wrapper:last-child {
    border-bottom: none;
}

/* ============================================================
   HIDDEN / EXPANDING / COLLAPSING – ANIMACIJA
   ============================================================ */

/* Sakriveno stanje – bez animacije (inicijalno) */
.team-fixtures-list .tipster-match-row-wrapper.hidden-result {
    display: none;
}

/* Stanje PRE nego što se prikaže – priprema za animaciju */
.team-fixtures-list .tipster-match-row-wrapper.expanding {
    display: block !important;
    max-height: 0 !important;
    opacity: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.35s ease, padding 0.3s ease, margin 0.3s ease;
}

/* Stanje TOKOM prikazivanja – klizi i pojavljuje se */
.team-fixtures-list .tipster-match-row-wrapper.expanding.active {
    max-height: 200px !important;  /* dovoljno za jedan red */
    opacity: 1 !important;
    padding: 4px 0 !important;
    border-bottom: 1px solid var(--border-color) !important;
}

/* Stanje pre nego što se sakrije – priprema za skupljanje */
.team-fixtures-list .tipster-match-row-wrapper.collapsing {
    max-height: 0 !important;
    opacity: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.3s ease, padding 0.3s ease, margin 0.3s ease;
}

/* Nakon skupljanja – potpuno sakriveno */
.team-fixtures-list .tipster-match-row-wrapper.collapsing.hidden-result {
    display: none !important;
}

/* ============================================================
   LOAD MORE / SHOW LESS DUGME
   ============================================================ */
.team-fixtures-load-more {
    display: inline-block !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 12px auto 0 !important;
    padding: 8px 24px !important;
    background: var(--accent) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 4px !important;
    font-size: clamp(0.9rem, 0.8rem + 0.3vw, 1.1rem) !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-align: center !important;
    line-height: 1.4 !important;
    box-shadow: none !important;
    text-decoration: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

.team-fixtures-load-more:hover {
    background: #a07a1a;
    opacity: 0.9;
}

.team-fixtures-load-more:active {
    transform: scale(0.98);
}

/* Kada je u "Show Less" modu – malo drugačija boja */
.team-fixtures-load-more.show-less {
    background: #6c757d;
}

.team-fixtures-load-more.show-less:hover {
    background: #5a6268;
}

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

/* Mobilni – sakrij desktop, prikaži mobilni */
@media (max-width: 768px) {
    .team-fixtures-desktop {
        display: none;
    }
    .team-fixtures-mobile {
        display: block;
    }
}

/* Desktop – sakrij mobilni */
@media (min-width: 769px) {
    .team-fixtures-mobile {
        display: none;
    }
}

/* Mobilni – smanji padding za dugme */
@media (max-width: 768px) {
    .team-header {
        padding: 0;
    }

    .team-logo img {
        width: 60px;
        height: 60px;
    }

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

    .team-tab-btn {
        flex: 1 0 auto;
        padding: 10px 15px;
        white-space: nowrap;
        border-right: 1px solid var(--border-color);
    }

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

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

    .info-item {
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
    }

    .info-label {
        min-width: auto;
    }

    .team-fixtures-load-more {
        padding: 10px 16px;
        font-size: clamp(0.85rem, 0.75rem + 0.3vw, 1rem);
    }
}