/* Leaderboards tweaks requested by user */
.ladder-search {
    max-width: none;
    min-width: 260px
}

#search-leaderboard {
    min-width: 260px
}

.ladder-controls label,
.ladder-controls select {
    font-size: 12px;
    color: #bbb
}

#rankings td:first-child {
    font-size: 0.9rem
}

.leaderboard-results thead th button {
    font-size: 0.95rem
}

.ladder-title h1 {
    font-size: 22px;
    margin: 0 0 8px 0
}

/* Make selects a bit larger so the 'Legitimate' text is readable but not huge */
select.live-search-box {
    min-width: 140px
}

/* Darkmode selects */
select.live-search-box,
select#rowsPerPage,
select#orderSelect,
select#filterSelect {
    /* match search input background */
    background-color: rgba(0, 0, 0, 0.1);
    color: #eee;
    border: 1px solid #2f2f2f;
    padding: 8px 36px 8px 10px;
    /* room for chevron */
    border-radius: 6px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24'%3E%3Cpath fill='%23bbbbbb' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

/* Ensure option text is readable on dark selects */
select.live-search-box option,
select#rowsPerPage option,
select#orderSelect option,
select#filterSelect option {
    background: #161616;
    color: #eee;
}

/* Top stat badges inline */
/* .top-stat-badges {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-left: 6px
} */

.top-stat-badge {
    width: 18px;
    height: 18px;
    display: inline-block
}

.top-stat-badge[src] {
    width: 18px;
    height: 18px
}

/* Make stat cells layout horizontally so text and badges sit side-by-side */
.stat-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.stat-cell .stat-text {
    display: inline-block;
}

.stat-cell-inner {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.stat-cell-inner .stat-text {
    display: inline-block;
}

/* Ensure text stays on one line and badges remain to the right */
.stat-cell .stat-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1 1 auto;
}

.top-stat-badges {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-left: 6px;
    flex: 0 0 auto;
}

.top-stat-badges img,
.top-stat-badge {
    width: 18px;
    height: 18px;
    display: block;
}

.leaderboard-results tbody tr {
    transition: transform 180ms ease, opacity 180ms ease;
    will-change: transform, opacity;
}

.leaderboard-results tbody tr.row-enter {
    transform: translateY(6px);
    opacity: 0;
}

.leaderboard-results tbody tr.empty-row td.empty-cell {
    background: transparent;
    color: rgba(255, 255, 255, 0.06);
    height: 48px;
}

/* Admin override button styling */
/* Admin tools removed - overrides cleared */

/* Smooth loading state */
.leaderboard-results tbody tr td {
    transition: background-color 200ms ease, color 200ms ease;
}

/* Prestige color overrides */
.prestige-absolute-text {
    color: #ff4d4d;
}

.prestige-ultimate-text {
    color: #00e5ff;
}

/* Top rank color treatments */
/* Color only the stat text when it's a top stat (per-metric) */
.top-stat-1 {
    color: #c6be95 !important;
}

/* gold */
.top-stat-2 {
    color: #baccce !important;
}

/* silver */
.top-stat-3 {
    color: #a78563 !important;
}

/* bronze */

.stat-text {
    color: #c4c4c4;
    font-weight: 300;
}