
table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse !important;
    font-size: 1rem;
}

#player-table-wrapper,
#team-table-wrapper {
    overflow-x: auto;
    white-space: nowrap;
    min-height: 50vh;
    margin-top: 24px;
}

th, td {
    /* padding: 0px 5px; */
    text-align: center;
    text-wrap: wrap;
}

thead {
    font-weight: bold;
}

thead tr {
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
    background-color: #fff;
}

tbody tr {
    border-bottom: 1px solid #ccc;
}

tbody tr:nth-child(odd) {
    background-color: #fafafa; 
}


table img {
    width: 50px;
    height: auto;
    border-radius: 50%;
}

.thead-tr, .tbody-tr {
    height: 64px;
    padding-left: 10px;
}

.left-column {
    padding-left: 10px;
}



/* SCHEDULE TABLES */

.matchup-vs {
    font-size: 2rem;
}
     

.schedule-table {
    border-top: none;
}

.schedule-header {
    height: 60px;
}

.matchup-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.matchup-info-container {
    display: flex;
    height: 35px;
    justify-content: center;
    align-items: center;
}

.matchup-info {
    font-size: 0.9rem;
}

.matchup-teams {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 20px 1fr;
    margin-bottom: 8px;
    justify-content: center;
    align-items: center;
}

.matchup-vs {
    align-content: center;
}

.home-team {
    margin-right: 0;
    margin-left: auto;
}

.away-team {
    margin-right: auto;
    margin-left: 0;
}

.team-img-container {
    margin: 0 14px;
}

.game-header {
    display: flex;
    flex-direction: column;
    margin: 16px;
    justify-content: center;
    align-items: center;
}

.game-footer {
    margin-top: -2px;
    margin-bottom: 16px;
}

.game-result {
    height: fit-content;
    font-size: 0.9rem;
}

.team-container {
    display: flex;
    align-items: center;
}

@media (max-width: 600px) {
    .matchup-container svg {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 400px) {
    .matchup-container svg {
        width: 35px;
        height: 35px;
    }
}

.division-title {
    font-weight: bold;
    margin-top: 24px;
    margin-bottom: 10px;
    /* margin-left: 20px; */
}

.leaderboard-filter button {
    width: 128px;
}




/* LEADERBOARD TABLE */

.team-container {
    display: flex;
    align-items: center;
    justify-content: start;
}

.team-column {
    text-align: start;
}


/* PLAYER AND STATS TABLES */

.player-container {
    display: flex;
    align-items: center;
    justify-content: start;
}

.player-img-container {
    display: flex;
    align-content: center;
    padding-right: 14px;
}

.players-th {
    text-align: center;
}

#sort-name {
    text-align: left;
    padding-left: 10px;
}

#section-leaderboard .team-img-container {
    margin-left: 0;
}



/* DROPDOWN MENU FOR PLAYERS.HTML */
.filter-controls {
    position: relative;
}

#main-filter-btn {
    width: 140px;
}

.filter-actions button {
    width: 90px;
}

#main-filter-panel {
    display: none; 
    position: absolute; 
    top: 100%; 
    left: 0; 
    background: white; 
    color: black; 
    border: 1px solid #ccc; 
    padding: 15px; 
    z-index: 200; 
    max-width: 270px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); 
}

@media (min-width: 768px) {
    #main-filter-panel {
        max-width: 400px;
    }
    
}

#main-filter-panel.open { 
    display: flex !important; /* Added !important to debug specificity issues */
    flex-wrap: wrap; 
    gap: 20px;
}
.filter-group h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    text-transform: uppercase;
    border-bottom: 1px solid #eee;
    padding-bottom: 3px;
}

.filter-group label {
    display: block;
    margin-bottom: 3px;
    font-size: 14px;
    cursor: pointer;
}

.filter-group input {
    accent-color: rgba(0, 0, 0, 0.75);;
}

.sortable-th {
    cursor: pointer;
    padding: 8px 4px;
    text-align: center;
    vertical-align: middle;
}

.sortable-th:hover {
    background-color: #f1f1f1;
}
    

.sort-indicator {
    display: block;
    transition: transform 0.3s ease;
    height: 0.8rem;
    font-size: 0.6rem;
    line-height: 1;
}

.sort-indicator.desc {
    transform: rotate(180deg);
}

#sort-name .sort-indicator {
    margin-left: 22px;
    max-width: fit-content;
}

/* Highlight the Header[cite: 24, 25] */
.sortable-th.active-sort {
    background-color: rgba(92, 207, 252, 0.308) !important;
    /* border-bottom: 2px solid #ffffff; */
}

.active-sort-cell .sort-indicator {
    visibility: visible;
    opacity: 1;
    color: rgb(37, 193, 255) !important; /* Optional: make the active arrow pop */
}

/* Highlight the Body Cells[cite: 26] */
.active-sort-cell {
    background-color: rgba(92, 207, 252, 0.308) !important;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;  
    justify-content: center;
    min-height: 40px;    
}

.player-table th, 
.leaderboard-table th {
    background-color: #ffffff; /* Force headers back to white */
}

#sort-player-name,
#sort-team-team_name {
    text-align: left;
    padding-left: 8px;
}

#sort-player-name .sort-indicator,
#sort-team-team_name .sort-indicator {
    width: fit-content;
    margin-left: 22px;
}