/* Team Detail Page Styles */

/* =============================================================================
   LAYOUT COMPONENTS
   ============================================================================= */

.team-breadcrumb {
    margin-bottom: 20px;
}

.team-breadcrumb__link {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
}

.team-breadcrumb__season {
    float: right;
    color: var(--text-light);
    font-size: 1.1em;
    font-weight: 600;
}

.team-breadcrumb__clearfix {
    clear: both;
}

/* =============================================================================
   STATISTICS GRID
   ============================================================================= */

.team-statistics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.stats-card {
    background: var(--white);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 24px;
}

.stats-card__title {
    color: var(--secondary);
    font-weight: 700;
    margin-bottom: 20px;
    font-size: 1.3em;
}

.team-performance-grid {
    display: grid;
    grid-template-columns: auto auto auto auto 1fr;
    gap: 16px;
    align-items: center;
}

.stat-item {
    text-align: center;
}

.stat-item__label {
    color: var(--text-light);
    font-size: 0.9em;
    margin-bottom: 4px;
}

.stat-item__value {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--primary);
}

.stat-item__value--secondary {
    color: var(--secondary);
}

.team-group-link {
    text-align: right;
}

.team-group-link__button {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.3em;
}

/* Match Statistics Table */
.match-stats-table {
    width: 100%;
    font-size: 0.95em;
}

.match-stats-table__header {
    border-bottom: 2px solid var(--table-header);
}

.match-stats-table__th {
    text-align: left;
    padding: 8px 0;
    color: var(--secondary);
    font-weight: 700;
}

.match-stats-table__th--center {
    text-align: center;
    padding: 8px 4px;
}

.match-stats-table__td {
    padding: 8px 0;
    font-weight: 700;
    color: var(--secondary);
}

.match-stats-table__td--center {
    text-align: center;
    padding: 8px 4px;
}

.match-stats-table__row--alt {
    background: var(--table-row-alt);
}

/* =============================================================================
   TAB SYSTEM
   ============================================================================= */

.results-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 12px;
}

.tab-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.95em;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    justify-content: center;
}

.tab-button:hover {
    background: rgba(243, 146, 0, 0.1);
    color: var(--primary);
}

.tab-button.active {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(243, 146, 0, 0.3);
}

.tab-icon {
    font-size: 1.1em;
}

/* Tab Panels */
.tab-panel {
    display: none;
}

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

.tab-content-area {
    background: var(--white);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 32px;
    margin-top: 30px;
}

/* =============================================================================
   PLAYER TABLES
   ============================================================================= */

.player-section__title {
    color: var(--secondary);
    font-weight: 700;
    margin-bottom: 24px;
}

.player-section__title--spaced {
    margin: 40px 0 24px 0;
}

.player-table-container {
    overflow-x: auto;
    width: 100%;
    margin-bottom: 24px;
}

.player-table {
    width: 100% !important;
    table-layout: fixed !important;
    border-collapse: separate;
    border-spacing: 0;
}

/* Player table column widths - CRITICAL for same width tables */
.player-table colgroup col:nth-child(1) { width: 30% !important; }
.player-table colgroup col:nth-child(2) { width: 10% !important; }
.player-table colgroup col:nth-child(3) { width: 12% !important; }
.player-table colgroup col:nth-child(4) { width: 8% !important; }
.player-table colgroup col:nth-child(5) { width: 12% !important; }
.player-table colgroup col:nth-child(6) { width: 8% !important; }
.player-table colgroup col:nth-child(7) { width: 20% !important; }

/* Player table headers */
.player-table__th {
    background: var(--table-header);
    color: var(--white);
    font-weight: 700;
    padding: 12px 16px;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.player-table__th:last-child {
    border-right: none;
}

.player-table__th--left {
    text-align: left;
    border-top-left-radius: 10px;
}

.player-table__th--right {
    border-top-right-radius: 10px;
}

.player-table__th--icon {
    padding: 12px 8px;
}

/* Player table cells */
.player-table__td {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

.player-table__td--center {
    text-align: center;
    padding: 12px 8px;
}

.player-table__td--icon {
    padding: 12px 8px;
    text-align: center;
}

.player-table__td--stats {
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
}

.player-table__td--meta {
    color: var(--text-light);
    font-size: 0.9em;
}

/* Player name styling */
.player-name-link {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 700;
}

.player-shirt-number {
    color: var(--text-light);
    font-size: 0.9em;
}

.player-previous-season {
    color: var(--text-light);
    font-size: 0.85em;
    font-style: italic;
}

.player-team-link {
    color: var(--primary);
    text-decoration: none;
}

.player-stats-other {
    color: var(--text-light);
    font-style: italic;
}

/* Player role icons */
.player-role-icon {
    width: 20px;
}

.player-role-icon--with-margin {
    margin-right: 4px;
}

/* =============================================================================
   MATCH SECTION
   ============================================================================= */

.match-section__title {
    color: var(--secondary);
    font-weight: 700;
    margin-bottom: 24px;
}

.match-loading {
    text-align: center;
    padding: 40px;
}

.match-loading__icon {
    width: 60px;
}

/* =============================================================================
   ACTION SECTION
   ============================================================================= */

.action-section {
    text-align: center;
    margin-top: 40px;
}

.fcf-link-button {
    background: var(--primary);
    border: none;
    color: var(--white);
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    text-decoration: none;
    display: inline-block;
    font-size: 0.9em;
}

.fcf-link-button:hover {
    background: var(--secondary);
    transform: translateY(-1px);
    color: var(--white);
}

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

@media (max-width: 768px) {
    .team-statistics-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .team-performance-grid {
        grid-template-columns: auto auto;
        gap: 12px;
        text-align: center;
    }
    
    .team-group-link {
        text-align: center;
        grid-column: 1 / -1;
        margin-top: 16px;
    }
    
    /* Improve mobile container spacing */
    .tab-content-area {
        padding: 20px;
        margin: 20px 0;
    }
    
    /* Better mobile table layout */
    .player-table-container {
        margin: 0 0 24px 0; /* Use full container width */
        overflow-x: auto;
        padding: 0;
    }
    
    .player-table {
        font-size: 0.85em;
        width: 100% !important; /* Use full width on mobile */
        min-width: 100%;
    }
    
    /* Redistribute column widths for mobile (6 visible columns) */
    .player-table colgroup col:nth-child(1) { width: 33% !important; }
    .player-table colgroup col:nth-child(2) { width: 13% !important; }
    .player-table colgroup col:nth-child(3) { width: 16% !important; }
    .player-table colgroup col:nth-child(4) { width: 11% !important; }
    .player-table colgroup col:nth-child(5) { width: 16% !important; }
    .player-table colgroup col:nth-child(6) { width: 11% !important; }
    .player-table colgroup col:nth-child(7) { width: 0% !important; } /* Hide completely */
    
    /* More generous mobile padding */
    .player-table__th,
    .player-table__td {
        padding: 10px 6px;
        white-space: nowrap;
    }
    
    .player-table__th--left,
    .player-table__td:first-child {
        padding: 10px 12px 10px 8px;
        max-width: 140px; /* Limit name column on mobile */
        white-space: normal;
        word-wrap: break-word;
    }
    
    /* Improved tab layout for mobile */
    .results-tabs {
        margin: 20px 0;
        border-radius: 12px;
        padding: 8px;
    }
    
    .tab-button {
        flex: 1;
        padding: 12px 8px;
        font-size: 0.9em;
    }
    
    /* When last column is hidden on tablet/mobile, make the 6th column look like the last column */
    .player-table thead tr th:nth-child(6) {
        border-top-right-radius: 10px !important;
        border-right: none !important; /* Remove border from new last visible column */
    }
}

@media (max-width: 480px) {
    .team-breadcrumb__season {
        float: none;
        text-align: center;
        margin-top: 8px;
    }
    
    .stats-card {
        padding: 16px;
    }
    
    /* Even tighter spacing for very small screens */
    .tab-content-area {
        padding: 16px;
    }
    
    .player-table-container {
        margin: 0 0 24px 0; /* Use full container width */
        padding: 0;
    }
    
    .player-table {
        font-size: 0.8em;
        width: 100% !important; /* Use full width on small mobile */
    }
    
    /* Redistribute column widths for small mobile (6 visible columns) */
    .player-table colgroup col:nth-child(1) { width: 33% !important; }
    .player-table colgroup col:nth-child(2) { width: 13% !important; }
    .player-table colgroup col:nth-child(3) { width: 16% !important; }
    .player-table colgroup col:nth-child(4) { width: 11% !important; }
    .player-table colgroup col:nth-child(5) { width: 16% !important; }
    .player-table colgroup col:nth-child(6) { width: 11% !important; }
    .player-table colgroup col:nth-child(7) { width: 0% !important; } /* Hide completely */
    
    .player-table__th,
    .player-table__td {
        padding: 8px 4px;
    }
    
    .player-table__th--left,
    .player-table__td:first-child {
        padding: 8px 6px;
        max-width: 120px; /* Even smaller on tiny screens */
        min-width: 100px;
    }
    
    /* Adjust tab spacing for very small screens */
    .results-tabs {
        margin: 16px 0;
        padding: 6px 8px;
    }
    
    .tab-button {
        padding: 10px 6px;
        font-size: 0.85em;
    }
    
    /* Hide the last column on very small screens */
    .player-table .d-none.d-md-table-cell {
        display: none !important;
    }
    
    /* When last column is hidden, make the 6th column look like the last column */
    .player-table thead tr th:nth-child(6) {
        border-top-right-radius: 10px !important;
        border-right: none !important; /* Remove border from new last visible column */
    }
    
    .stat-item__value {
        font-size: 1.2em;
    }
} 