/* ===== Glass Table Styling ===== */
/* Orange-themed styling inspired by player card */

.glass-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.8rem;
}

.glass-table th,
.glass-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(245, 162, 68, 0.15);
}

.glass-table th {
    background: rgba(12, 12, 12, 0.92);
    backdrop-filter: blur(6px);
    z-index: 3;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-orange, #F5A244);
    position: sticky;
    top: 0;
    z-index: 10;
}

.glass-table tbody tr {
    transition: background 0.2s ease;
    cursor: pointer;
}

.glass-table tbody tr:hover {
    background: rgba(245, 162, 68, 0.1);
}

.glass-table tbody tr.selected {
    background: rgba(245, 162, 68, 0.2);
    border-left: 3px solid var(--accent-orange, #F5A244);
}

.glass-table.compact th,
.glass-table.compact td {
    padding: 6px 8px;
    font-size: 0.75rem;
}

/* Rating Cell Styling - Bar Graph Colors */
.glass-table .rating-cell {
    font-weight: 700;
}

.glass-table .rating-high {
    color: var(--accent-orange, #F5A244); /* Orange - High */
}

.glass-table .rating-medium {
    color: var(--accent-secondary, #F7B15F); /* Yellow-Orange - Medium */
}

.glass-table .rating-low {
    color: #2dd4bf; /* Teal - Low */
}

.glass-table .rating-good {
    color: #4ade80; /* Green - Excellent */
}

/* Games Gradient - More games = greener */
.glass-table .games-cell {
    font-weight: 600;
}

.glass-table .games-4 { color: #4ade80; }
.glass-table .games-3 { color: #22c55e; }
.glass-table .games-2 { color: var(--accent-secondary, #F7B15F); }
.glass-table .games-1 { color: var(--accent-orange, #F5A244); }
.glass-table .games-0 { color: #ef4444; }

/* Ownership Gradient */
.glass-table .ownership-high { color: var(--accent-orange, #F5A244); }
.glass-table .ownership-medium { color: var(--accent-secondary, #F7B15F); }
.glass-table .ownership-low { color: #2dd4bf; }

/* Team Logo in Table */
.glass-table .team-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.glass-table .team-logo-small {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* Position Badge */
.glass-table .position-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
}

.glass-table .position-badge.C { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.glass-table .position-badge.L { background: rgba(74, 222, 128, 0.2); color: #4ade80; }
.glass-table .position-badge.R { background: rgba(245, 162, 68, 0.2); color: var(--accent-orange, #F5A244); }
.glass-table .position-badge.D { background: rgba(168, 85, 247, 0.2); color: #a855f7; }
.glass-table .position-badge.G { background: rgba(45, 212, 191, 0.2); color: #2dd4bf; }

/* Trend Indicators */
.glass-table .trend-up {
    color: #4ade80;
}

.glass-table .trend-up::before {
    content: '▲ ';
    font-size: 0.65rem;
}

.glass-table .trend-down {
    color: #ef4444;
}

.glass-table .trend-down::before {
    content: '▼ ';
    font-size: 0.65rem;
}

.glass-table .trend-neutral {
    color: var(--text-muted, #666);
}

/* Sortable Headers */
.glass-table th.sortable {
    cursor: pointer;
    user-select: none;
}

.glass-table th.sortable:hover {
    background: rgba(245, 162, 68, 0.15);
}

.glass-table th.sortable::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 6px;
    vertical-align: middle;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid var(--text-muted, #666);
    opacity: 0.5;
}

.glass-table th.sortable.asc::after {
    border-top: none;
    border-bottom: 4px solid var(--accent-orange, #F5A244);
    opacity: 1;
}

.glass-table th.sortable.desc::after {
    border-top: 4px solid var(--accent-orange, #F5A244);
    opacity: 1;
}

/* Empty State */
.glass-table-empty {
    padding: 32px;
    text-align: center;
    color: var(--text-muted, #666);
}

.glass-table-empty svg {
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* Loading State */
.glass-table-loading {
    position: relative;
    min-height: 150px;
}

.glass-table-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, 
        transparent,
        rgba(255, 107, 0, 0.1),
        transparent
    );
    animation: table-shimmer 1.5s infinite;
}

@keyframes table-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .glass-table {
        font-size: 0.72rem;
    }

    .glass-table th,
    .glass-table td {
        padding: 4px 5px;
    }

    .glass-table th:not(:first-child),
    .glass-table td:not(:first-child) {
        min-width: 36px;
        max-width: 44px;
        white-space: nowrap;
    }

    .glass-table .team-cell {
        max-width: 140px;
    }

    .glass-table .team-cell span {
        display: inline-block;
        max-width: 110px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        vertical-align: middle;
    }
}
