/**
 * Stats Pages Specific Styles
 * Shared across QB, RB, WR, TE stats pages
 */

.main-content {
    flex: 1;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    min-height: calc(100vh - 100px);
}

.page-header {
    text-align: center;
    margin-bottom: 30px;
}

.page-title {
    font-size: 36px;
    font-weight: 300;
    margin-bottom: 10px;
}

.page-subtitle {
    font-size: 18px;
    color: #aaa;
    margin-bottom: 20px;
}

.position-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.position-btn {
    padding: 10px 20px;
    background-color: #444;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.position-btn:hover {
    background-color: #555;
}

.position-btn.active {
    background-color: #b8efc0;
    color: #2a2a2a;
}

.stats-table {
    background-color: #333;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.table-header {
    background-color: #b8efc0;
    color: #2a2a2a;
    padding: 15px;
    display: grid;
    grid-template-columns: 65px 1.4fr 0.9fr repeat(var(--stat-columns, 5), minmax(90px, 1fr));
    gap: 15px;
    font-weight: 600;
}

.table-row {
    padding: 15px;
    display: grid;
    grid-template-columns: 65px 1.4fr 0.9fr repeat(var(--stat-columns, 5), minmax(90px, 1fr));
    gap: 15px;
    border-bottom: 1px solid #444;
    transition: background-color 0.2s ease;
}

.table-row:hover {
    background-color: #3a3a3a;
}

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

.rank {
    font-weight: 600;
    color: #b8efc0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.player-image {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #444;
    border: 2px solid #555;
}

.player-image.error {
    display: none;
}

.player-image-default {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #666;
}

.player-image-default svg {
    width: 18px;
    height: 18px;
    fill: #888;
}

.player-name {
    font-weight: 500;
}

.team {
    color: #aaa;
    font-size: 14px;
}

.stat-value {
    font-weight: 500;
    color: #fff;
}

.sortable-header {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sortable-header .sort-arrow {
    margin-left: auto;
    font-size: 12px;
    opacity: 0.8;
}

.sortable-header.active .sort-arrow {
    opacity: 1;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #aaa;
}

.error {
    text-align: center;
    padding: 40px;
    color: #f44336;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 10px 16px;
    background-color: #444;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    background-color: #555;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn.active {
    background-color: #b8efc0;
    color: #2a2a2a;
}

.pagination-info {
    color: #aaa;
    font-size: 14px;
}

@media (max-width: 768px) {
    .main-content {
        padding: 15px;
        min-height: calc(100vh - 200px);
    }

    .page-title {
        font-size: 28px;
    }

    .stats-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table-header,
    .table-row {
        display: grid;
        grid-template-columns: 60px 150px 65px repeat(var(--stat-columns, 5), 85px);
        gap: 10px;
        font-size: 13px;
        padding: 12px 10px;
        white-space: nowrap;
        min-width: fit-content;
    }

    .player-image {
        width: 28px;
        height: 28px;
    }

    .player-image-default {
        width: 28px;
        height: 28px;
    }

    .player-image-default svg {
        width: 16px;
        height: 16px;
    }

    .table-header > *,
    .table-row > * {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .position-nav {
        gap: 10px;
    }

    .position-btn {
        padding: 8px 16px;
        font-size: 14px;
    }
}
