/* Leaderboard view filters and compact leaderboard rows. */

#leaderboards > .tabs {
    display: none !important;
}

.leaderboard-panel > .panel-title {
    display: none !important;
}

#leaderboards {
    --leaderboard-silver-rgb: 215, 236, 255;
    --leaderboard-silver: #d7ecff;
    --leaderboard-silver-soft: rgba(215, 236, 255, .085);
}

#leaderboards .support-view-heading,
#leaderboards .leaderboard-panel,
#leaderboards .details-panel {
    border-color: rgba(var(--leaderboard-silver-rgb), .38);
    background:
        radial-gradient(circle at 8% 0%, rgba(var(--leaderboard-silver-rgb), .095), transparent 30%),
        radial-gradient(circle at 88% 8%, rgba(126, 223, 255, .055), transparent 34%),
        linear-gradient(135deg, rgba(var(--leaderboard-silver-rgb), .044), rgba(5, 15, 31, .78) 42%, rgba(5, 15, 31, .90)) !important;
    box-shadow:
        inset 0 0 0 1px rgba(var(--leaderboard-silver-rgb), .040),
        inset 0 1px 0 rgba(234, 247, 255, .052),
        0 0 24px rgba(var(--leaderboard-silver-rgb), .070);
}

#leaderboards .support-view-heading::before,
#leaderboards .leaderboard-panel::before,
#leaderboards .details-panel::before {
    border-color: rgba(var(--leaderboard-silver-rgb), .58);
}

#leaderboards .support-view-heading .eyebrow,
#leaderboards .details-panel > .panel-title {
    color: var(--leaderboard-silver);
    text-shadow: 0 0 10px rgba(var(--leaderboard-silver-rgb), .16);
}

#leaderboards .leaderboard-period-panel .tab {
    border-color: rgba(var(--leaderboard-silver-rgb), .24) !important;
    background: linear-gradient(135deg, rgba(var(--leaderboard-silver-rgb), .050), rgba(5, 15, 31, .62)) !important;
    color: rgba(234, 247, 255, .70) !important;
}

#leaderboards .leaderboard-period-panel .tab.active {
    border-color: rgba(var(--leaderboard-silver-rgb), .72) !important;
    background: linear-gradient(135deg, rgba(var(--leaderboard-silver-rgb), .16), rgba(18, 51, 84, .82)) !important;
    color: #f4fbff !important;
    box-shadow: 0 0 18px rgba(var(--leaderboard-silver-rgb), .16), inset 0 0 12px rgba(var(--leaderboard-silver-rgb), .050) !important;
}

.leaderboard-filter-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    margin: 0 0 10px;
    flex: 0 0 auto !important;
}

.leaderboard-period-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
    flex: 0 0 auto !important;
}

.leaderboard-filter-label,
.leaderboard-filter-note {
    display: none !important;
}

.leaderboard-filter-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 25px;
    padding: 5px 7px;
    border: 1px solid rgba(126, 223, 255, .18);
    border-radius: 999px;
    background: rgba(5, 15, 31, .42);
    color: rgba(234, 247, 255, .62);
    font: inherit;
    font-size: 10.5px;
    font-weight: 950;
    cursor: pointer;
    opacity: .72;
    line-height: 1;
    transition: border-color .16s ease, background .16s ease, color .16s ease, opacity .16s ease, transform .16s ease;
}

.leaderboard-filter-button:hover,
.leaderboard-filter-button:focus-visible {
    opacity: 1;
    border-color: rgba(126, 223, 255, .44);
    color: var(--text);
    transform: translateY(-1px);
    outline: none;
}

.leaderboard-filter-button.active {
    opacity: 1;
    border-color: rgba(var(--leaderboard-silver-rgb), .68);
    background: rgba(var(--leaderboard-silver-rgb), .10);
    color: #f4fbff;
    box-shadow: 0 0 12px rgba(var(--leaderboard-silver-rgb), .12), inset 0 0 8px rgba(var(--leaderboard-silver-rgb), .035);
}

.leaderboard-filter-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 0;
    height: 13px;
    border: 0;
    background: transparent;
    overflow: visible;
    opacity: .78;
    line-height: 1;
    font-size: 12px;
    font-weight: 950;
}

.leaderboard-filter-icon img {
    width: 12px;
    height: 12px;
    object-fit: contain;
    display: block;
}

.leaderboard-filter-button.active .leaderboard-filter-icon {
    opacity: 1;
}

.leaderboard-filter-button.twitch.active { border-color: rgba(145, 91, 255, .72); background: rgba(145, 91, 255, .16); color: #d7c2ff; }
.leaderboard-filter-button.youtube.active { border-color: rgba(255, 76, 94, .72); background: rgba(255, 76, 94, .14); color: #ffb8c4; }
.leaderboard-filter-button.kick.active { border-color: rgba(83, 255, 112, .66); background: rgba(83, 255, 112, .14); color: #b9ffa8; }
.leaderboard-filter-button.rumble.active { border-color: rgba(159, 255, 88, .66); background: rgba(159, 255, 88, .16); color: #dbffad; }
.leaderboard-filter-button.facebook.active { border-color: rgba(88, 153, 255, .72); background: rgba(88, 153, 255, .16); color: #bdd8ff; }
.leaderboard-filter-button.streamlabs.active,
.leaderboard-filter-button.tip.active { border-color: rgba(129, 255, 195, .42); background: rgba(129, 255, 195, .08); color: var(--success); }
.leaderboard-filter-button.achievements.active { border-color: rgba(255, 211, 126, .58); background: rgba(255, 211, 126, .09); color: var(--warning); }

.leaderboard-filtered-score-label {
    display: block;
    color: var(--soft);
    font-size: 10px;
    font-weight: 800;
    text-align: right;
    margin-top: 2px;
}

#leaderboards.support-view-active .layout {
    align-items: stretch !important;
}

#leaderboards.support-view-active .leaderboard-panel,
#leaderboards.support-view-active .details-panel {
    align-self: stretch !important;
}

#leaderboards.support-view-active .leaderboard-panel {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    align-content: stretch !important;
}

#leaderboards.support-view-active .leaderboard-period-panel,
#leaderboards.support-view-active .leaderboard-filter-panel {
    flex: 0 0 auto !important;
}

#leaderboards.support-view-active #leaderboard-list {
    width: 100% !important;
    flex: 1 1 auto !important;
    align-self: stretch !important;
    align-content: start !important;
    justify-content: stretch !important;
    justify-items: stretch !important;
}

#leaderboards.support-view-active #leaderboard-list .row {
    width: 100% !important;
    max-width: none !important;
    justify-self: stretch !important;
    box-sizing: border-box !important;
}

#leaderboards.support-view-active #leaderboard-list .empty {
    width: 100% !important;
    align-self: start !important;
    justify-self: stretch !important;
    margin-top: 0 !important;
    box-sizing: border-box !important;
}

.leaderboard-period-panel .tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 8px 16px;
    border-radius: 999px;
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease, color .16s ease !important;
}

.leaderboard-period-panel .tab:hover,
.leaderboard-period-panel .tab:focus-visible {
    border-color: rgba(var(--leaderboard-silver-rgb), .66) !important;
    background: linear-gradient(135deg, rgba(var(--leaderboard-silver-rgb), .12), rgba(6, 19, 38, .70)) !important;
    box-shadow: 0 0 16px rgba(var(--leaderboard-silver-rgb), .14), inset 0 0 14px rgba(var(--leaderboard-silver-rgb), .05) !important;
    color: var(--text) !important;
    transform: translateY(-1px) !important;
    outline: none !important;
}

.leaderboard-list .row {
    grid-template-columns: 52px minmax(0, 1fr) auto;
    min-height: 56px;
    height: auto;
    padding: 8px 12px;
    align-items: center;
    overflow: visible;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.leaderboard-list .row:hover {
    border-color: rgba(var(--leaderboard-silver-rgb), .58);
    background: linear-gradient(135deg, rgba(var(--leaderboard-silver-rgb), .10), rgba(18, 51, 84, .84));
    box-shadow: 0 0 20px rgba(var(--leaderboard-silver-rgb), .14);
    transform: translateY(-1px);
}

.leaderboard-list .row.selected {
    border-color: rgba(var(--leaderboard-silver-rgb), .88) !important;
    background: linear-gradient(135deg, rgba(var(--leaderboard-silver-rgb), .18), rgba(18, 51, 84, .90)) !important;
    box-shadow: 0 0 28px rgba(var(--leaderboard-silver-rgb), .24), inset 4px 0 0 rgba(var(--leaderboard-silver-rgb), .92) !important;
}

.leaderboard-list .row.selected .name {
    color: #f4fbff !important;
    text-shadow: 0 0 12px rgba(var(--leaderboard-silver-rgb), .24);
}

.leaderboard-list .rank {
    font-size: 17px;
    display: grid;
    place-items: center;
}

.leaderboard-medal {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 999px;
    overflow: hidden;
    padding: 0;
}

.leaderboard-medal img {
    display: block;
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.leaderboard-identity-line {
    display: flex;
    align-items: center;
    align-content: center;
    gap: 5px 7px;
    min-width: 0;
    min-height: 0;
    flex-wrap: wrap;
}

.leaderboard-identity-line .name {
    display: inline-block;
    flex: 0 1 auto;
    min-width: 0;
    max-width: min(420px, 42vw);
    margin: 0;
    line-height: 1.1;
    transition: color .16s ease, text-shadow .16s ease;
}

.leaderboard-rank-badge,
.leaderboard-list .sticky-search-sub-badge {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    min-width: 22px;
    flex: 0 0 22px;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
}

.leaderboard-rank-badge img,
.leaderboard-list .sticky-search-sub-badge img {
    display: block !important;
    width: 22px !important;
    height: 22px !important;
    max-width: 22px !important;
    max-height: 22px !important;
    object-fit: contain !important;
}

.leaderboard-rank-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 4px 8px;
    border: 1px solid rgba(176, 154, 255, .28);
    border-radius: 999px;
    background: rgba(176, 154, 255, .08);
    color: #d8ceff;
    font-size: 10.5px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.leaderboard-list .sticky-platform-icon-strip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
}

.leaderboard-list .sticky-platform-icon-pill {
    width: 20px;
    height: 20px;
}

.leaderboard-list .sticky-platform-icon-pill img {
    width: 12px;
    height: 12px;
}

.leaderboard-list .score {
    display: block;
    text-align: right;
    line-height: 1.08;
    white-space: nowrap;
}

.leaderboard-list .score .leaderboard-filtered-score-label {
    display: none !important;
}

.leaderboard-list .row.leaderboard-podium-1 {
    border-color: rgba(255, 211, 126, .72);
    background: linear-gradient(135deg, rgba(255, 211, 126, .12), rgba(18, 51, 84, .82));
    box-shadow: 0 0 26px rgba(255, 211, 126, .14), inset 0 0 18px rgba(255, 211, 126, .05);
}

.leaderboard-list .row.leaderboard-podium-1:hover {
    border-color: rgba(255, 224, 148, .92);
    background: linear-gradient(135deg, rgba(255, 211, 126, .18), rgba(22, 62, 94, .92));
    box-shadow: 0 0 34px rgba(255, 211, 126, .24), 0 0 20px rgba(55, 187, 255, .14), inset 0 0 22px rgba(255, 211, 126, .06);
}

.leaderboard-list .row.leaderboard-podium-2 {
    border-color: rgba(190, 225, 255, .48);
    background: linear-gradient(135deg, rgba(190, 225, 255, .08), rgba(8, 24, 45, .72));
    box-shadow: inset 0 0 16px rgba(190, 225, 255, .04);
}

.leaderboard-list .row.leaderboard-podium-2:hover {
    border-color: rgba(190, 225, 255, .68);
    background: linear-gradient(135deg, rgba(190, 225, 255, .12), rgba(18, 51, 84, .84));
}

.leaderboard-list .row.leaderboard-podium-3 {
    border-color: rgba(255, 170, 105, .38);
    background: linear-gradient(135deg, rgba(255, 170, 105, .065), rgba(8, 24, 45, .70));
}

.leaderboard-list .row.leaderboard-podium-3:hover {
    border-color: rgba(255, 170, 105, .58);
    background: linear-gradient(135deg, rgba(255, 170, 105, .10), rgba(18, 51, 84, .82));
}

.leaderboard-list .row.leaderboard-podium-1 .rank,
.leaderboard-list .row.leaderboard-podium-1 .score {
    color: var(--warning);
}

.leaderboard-list .row.selected.leaderboard-podium-1 {
    border-color: rgba(255, 224, 148, .96) !important;
    background: linear-gradient(135deg, rgba(255, 211, 126, .24), rgba(18, 51, 84, .90)) !important;
    box-shadow: 0 0 34px rgba(255, 211, 126, .34), inset 4px 0 0 rgba(255, 211, 126, .98), inset 0 0 22px rgba(255, 211, 126, .08) !important;
}

.leaderboard-list .row.selected.leaderboard-podium-1 .name {
    color: #ffe2a1 !important;
    text-shadow: 0 0 14px rgba(255, 211, 126, .30);
}

.leaderboard-list .row.selected.leaderboard-podium-2 {
    border-color: rgba(205, 235, 255, .92) !important;
    background: linear-gradient(135deg, rgba(190, 225, 255, .18), rgba(18, 51, 84, .88)) !important;
    box-shadow: 0 0 30px rgba(190, 225, 255, .22), inset 4px 0 0 rgba(205, 235, 255, .90), inset 0 0 20px rgba(190, 225, 255, .07) !important;
}

.leaderboard-list .row.selected.leaderboard-podium-2 .name {
    color: #dff3ff !important;
    text-shadow: 0 0 14px rgba(190, 225, 255, .25);
}

.leaderboard-list .row.selected.leaderboard-podium-3 {
    border-color: rgba(255, 180, 118, .86) !important;
    background: linear-gradient(135deg, rgba(255, 170, 105, .16), rgba(18, 51, 84, .86)) !important;
    box-shadow: 0 0 28px rgba(255, 170, 105, .20), inset 4px 0 0 rgba(255, 170, 105, .86), inset 0 0 18px rgba(255, 170, 105, .06) !important;
}

.leaderboard-list .row.selected.leaderboard-podium-3 .name {
    color: #ffc69a !important;
    text-shadow: 0 0 12px rgba(255, 170, 105, .24);
}

#leaderboards.support-view-active .leaderboard-panel {
    container-type: inline-size;
    container-name: leaderboard-panel;
}

@container leaderboard-panel (max-width: 720px) {
    .leaderboard-identity-line .name {
        flex: 1 1 100%;
        min-width: 0;
        max-width: 100%;
    }

    .leaderboard-rank-pill {
        display: none;
    }

    .leaderboard-list .sticky-platform-icon-strip {
        max-width: 128px;
        overflow: hidden;
    }
}

@media (max-width: 760px) {
    #leaderboards.support-view-active .leaderboard-panel {
        padding: 10px;
    }

    .leaderboard-period-panel {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 5px;
        margin-bottom: 7px;
        overflow: visible;
        padding-bottom: 0;
    }

    .leaderboard-period-panel .tab {
        width: 100%;
        min-width: 0;
        min-height: 30px;
        padding: 6px 4px;
        font-size: 10.5px;
        line-height: 1;
        white-space: nowrap;
    }

    .leaderboard-filter-panel {
        display: grid;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 4px;
        margin-bottom: 8px;
        overflow: visible;
        padding-bottom: 0;
    }

    .leaderboard-filter-label,
    .leaderboard-filter-button {
        white-space: nowrap;
    }

    .leaderboard-filter-button {
        width: 100%;
        min-width: 0;
        min-height: 25px;
        padding: 5px 3px;
        gap: 2px;
        font-size: 8.5px;
        letter-spacing: -0.01em;
    }

    .leaderboard-filter-icon {
        height: 10px;
        font-size: 10px;
    }

    .leaderboard-filter-icon img {
        width: 9px;
        height: 9px;
    }

    .leaderboard-list {
        gap: 6px;
    }

    .leaderboard-list .row {
        grid-template-columns: 34px minmax(0, 1fr) minmax(86px, max-content);
        gap: 7px;
        align-items: center;
        min-height: 52px;
        padding: 7px 9px;
        border-radius: 13px;
    }

    .leaderboard-list .rank {
        grid-column: 1;
        font-size: 15px;
    }

    .leaderboard-medal {
        width: 27px;
        height: 27px;
        min-width: 27px;
    }

    .leaderboard-medal img {
        width: 27px;
        height: 27px;
    }

    .leaderboard-identity-line {
        grid-column: 2;
        gap: 4px;
        flex-wrap: nowrap;
        overflow: hidden;
        align-items: center;
    }

    .leaderboard-identity-line .name {
        flex: 1 1 auto;
        min-width: 0;
        max-width: none;
        font-size: 14.5px;
        line-height: 1.05;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .leaderboard-rank-badge,
    .leaderboard-list .sticky-search-sub-badge {
        width: 18px;
        height: 18px;
        min-width: 18px;
        flex-basis: 18px;
    }

    .leaderboard-rank-badge img,
    .leaderboard-list .sticky-search-sub-badge img {
        width: 18px !important;
        height: 18px !important;
        max-width: 18px !important;
        max-height: 18px !important;
    }

    .leaderboard-list .sticky-platform-icon-strip {
        flex: 0 0 auto;
        gap: 2px;
        max-width: 82px;
        overflow: hidden;
    }

    .leaderboard-list .sticky-platform-icon-pill {
        width: 16px;
        height: 16px;
        min-width: 16px;
    }

    .leaderboard-list .sticky-platform-icon-pill img {
        width: 9px;
        height: 9px;
    }

    .leaderboard-list .sticky-platform-icon-strip:has(.sticky-platform-icon-pill:nth-of-type(4))::after {
        flex: 0 0 16px;
        width: 16px;
        height: 16px;
        font-size: 7px;
    }

    .leaderboard-rank-pill {
        display: none;
    }

    .leaderboard-list .score {
        grid-column: 3;
        justify-self: end;
        align-self: center;
        min-width: 0;
        max-width: 92px;
        text-align: right;
        font-size: 12.5px;
        line-height: 1.05;
        white-space: normal;
    }

    .leaderboard-identity-line .name {
        max-width: 100%;
    }

    .leaderboard-mobile-show-more {
        width: 100%;
        min-height: 34px;
        margin-top: 2px;
        border-color: rgba(var(--leaderboard-silver-rgb), .34);
        background: rgba(var(--leaderboard-silver-rgb), .075);
        color: rgba(234, 247, 255, .78);
        font-size: 9px;
        letter-spacing: .12em;
        text-transform: uppercase;
    }
}

@media (max-width: 390px) {
    .leaderboard-filter-panel {
        overflow-x: auto;
        grid-template-columns: repeat(6, minmax(54px, 1fr));
        padding-bottom: 2px;
    }

    .leaderboard-list .row {
        grid-template-columns: 30px minmax(0, 1fr) minmax(72px, max-content);
        gap: 6px;
        padding-inline: 7px;
    }

    .leaderboard-identity-line .name {
        font-size: 13px;
    }

    .leaderboard-list .score {
        max-width: 78px;
        font-size: 11.5px;
    }
}

@media (max-width: 1180px) and (orientation: landscape) {
    .leaderboard-mobile-show-more {
        width: 100%;
        min-height: 34px;
        margin-top: 2px;
        border-color: rgba(var(--leaderboard-silver-rgb), .34);
        background: rgba(var(--leaderboard-silver-rgb), .075);
        color: rgba(234, 247, 255, .78);
        font-size: 9px;
        letter-spacing: .12em;
        text-transform: uppercase;
    }
}