/* Embed challenge leaderboard — shell, skeletons, layout */

/* —— embedChallengeLeaderboard.hbs shell: 525×972 viewport, centered on larger screens —— */
html {
    min-height: 100vh;
    background: #1a1a1a;
}

body.embedchallengeleaderboard-page {
    margin: 0 auto;
    padding: 0;
    width: 525px;
    height: 972px;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    position: relative;
}

.embedchallengeleaderboard {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: #0B1425;
    color: #e0e0e0;
    font-family: "Metropolis Regular";
    padding: 16px 16px 0 16px;
    position: relative;
}

.embedchallengeleaderboard-main.hide,
.embedchallengeleaderboard-skeleton-layer.hide {
    display: none !important;
}

/* —— Static header: title always visible + game-mode slot (skeleton then pill) —— */
.embedchallengeleaderboard-static-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.embedchallengeleaderboard-header-game-slot {
    margin-left: auto;
    flex-shrink: 0;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.embedchallengeleaderboard-skel-game-pill {
    height: 36px;
    min-width: 120px;
    max-width: 200px;
    width: 140px;
    border-radius: 999px;
    background: linear-gradient(90deg, #243447 0%, #2d4a6a 50%, #243447 100%);
    background-size: 200% 100%;
    animation: embedchallengeleaderboard-skeleton-shine 1.2s ease-in-out infinite;
    border: 1px solid rgba(56, 189, 248, 0.35);
}

/* —— Skeleton layer (filters + list only; title is always real) —— */
.embedchallengeleaderboard-skeleton-layer {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.embedchallengeleaderboard-params-label-static {
    flex-shrink: 0;
    margin-bottom: 8px;
}

.embedchallengeleaderboard-skel-pill-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
}

.embedchallengeleaderboard-skel-pill {
    height: 36px;
    width: 100px;
    border-radius: 999px;
    background: linear-gradient(90deg, #243447 0%, #2d4a6a 50%, #243447 100%);
    background-size: 200% 100%;
    animation: embedchallengeleaderboard-skeleton-shine 1.2s ease-in-out infinite;
}

.embedchallengeleaderboard-skel-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.embedchallengeleaderboard-skel-line {
    height: 70px;
    border-radius: 8px;
    background: linear-gradient(90deg, #243447 0%, #2d4a6a 50%, #243447 100%);
    background-size: 200% 100%;
    animation: embedchallengeleaderboard-skeleton-shine 1.2s ease-in-out infinite;
}

@keyframes embedchallengeleaderboard-skeleton-shine {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* —— Main layout: takes remaining viewport height so list can overflow-y auto —— */
.embedchallengeleaderboard-main {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.embedchallengeleaderboard-title {
    font-family: "Metropolis Semi Bold";
    font-size: 22px;
    color: #fff;
}

.embedchallengeleaderboard-game-wrap.hide {
    display: none;
}

.embedchallengeleaderboard-game-wrap {
    flex-shrink: 0;
}

.embedchallengeleaderboard-list-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    position: relative;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.embedchallengeleaderboard-list-scroll::-webkit-scrollbar {
    display: none;
}

.embedchallengeleaderboard-params {
    flex-shrink: 0;
    margin-bottom: 10px;
}

.embedchallengeleaderboard-params-label {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
    margin-bottom: 8px;
}

.embedchallengeleaderboard-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.embedchallengeleaderboard-list-outer {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
