/**
 * Core Leaderboard Styling - Dual Table System
 * Used by both fixed-partner and individual modes
 */

/* Main leaderboard wrapper */
.redesigned-leaderboard {
    position: relative;
    background-color: var(--bs-card-bg);
    border-radius: 0.75rem;
    border: 1px solid var(--bs-card-border);
    overflow: hidden;
    width: 100%;
}

/* Gradient fade on right side for scroll hint - stays fixed, doesn't scroll */
.redesigned-leaderboard::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 50px;
    background: linear-gradient(to right, transparent, rgba(26, 32, 44, 0.9));
    pointer-events: none;
    z-index: 12;
    transition: opacity 0.3s ease;
}

/* Hide gradient when scrolled to the right */
.redesigned-leaderboard.scrolled-right::after {
    opacity: 0;
}

/* Fixed columns section - sticky left columns */
.fixed-columns {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    background-color: var(--bs-card-bg);
}

/* Scrollable content section */
.scrollable-content {
    margin-left: 0 !important;
    overflow-x: auto !important;
    width: 100% !important;
    position: relative;
}

/* Fixed table styling */
.fixed-table {
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    background-color: var(--bs-card-bg);
}

/* Scrollable table styling */
.scrollable-table {
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    background-color: var(--bs-card-bg);
}

/* Empty spacer columns - must match fixed column padding for perfect alignment */
.scrollable-table th.empty-spacer-col,
.scrollable-table td.empty-spacer-col {
    border: none !important;
    background-color: var(--bs-card-bg) !important;
}

/* Row height consistency */
.fixed-table th,
.fixed-table td,
.scrollable-table th,
.scrollable-table td {
    height: 30px !important;
    max-height: 30px !important;
    min-height: 30px !important;
    line-height: 1.2 !important;
    padding: 4px 8px !important;
    vertical-align: middle;
    border-bottom: none !important;
    color: var(--bs-body-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Header styling */
.fixed-table thead th,
.scrollable-table thead th {
    background-color: var(--bs-card-header, var(--bs-card-bg));
    font-weight: 600;
    border-bottom: none !important;
}

/* Row hover effects */
.fixed-table tbody tr:hover,
.scrollable-table tbody tr:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
}

/* Links styling */
.fixed-table a,
.scrollable-table a {
    color: var(--bs-body-color);
    text-decoration: none;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.fixed-table a:hover,
.scrollable-table a:hover {
    color: var(--bs-primary);
    text-decoration: underline;
}

/* Badge styling for substitutes */
.sub-badge {
    font-size: 0.7em;
    padding: 2px 4px;
    display: inline-block;
    margin-left: 4px;
}

/* Button groups in action columns */
.scrollable-table .btn-group {
    display: flex;
    gap: 2px;
}

.scrollable-table .btn-sm {
    padding: 2px 6px !important;
    font-size: 0.75rem !important;
    line-height: 1.2 !important;
    height: auto !important;
}

/* Remove all vertical dividers between columns */
.redesigned-leaderboard .fixed-table th,
.redesigned-leaderboard .fixed-table td,
.redesigned-leaderboard .scrollable-table th,
.redesigned-leaderboard .scrollable-table td {
    border-right: none !important;
    border-left: none !important;
}

/* Scroll hint indicator - ">>" */
.leaderboard-scroll-hint {
    position: absolute;
    top: 50%;
    right: 5px;
    transform: translateY(-50%);
    z-index: 15;
    font-size: 0.85rem;
    font-weight: 400;
    color: #ff9933;
    pointer-events: none;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
}

.leaderboard-scroll-hint.hidden {
    opacity: 0;
}
