/* Server status, dungeon leaderboards, player dungeon details, and name tags.
   Loaded after the current site.css, ui.css, and nav-reference.css. */

.server-strip--compact {
    /* grid-template-columns: 1.25fr repeat(2, minmax(180px, 1fr)); */
}

.server-state {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.server-state.is-offline {
    color: var(--muted);
}

.server-state.is-offline .status-dot {
    background: var(--danger);
    box-shadow: 0 0 10px rgba(255, 140, 140, .65);
}

/* Seven primary leaderboard categories stay readable without forcing a
   single overcrowded row. */
.leaderboard-toolbar--stacked .tab-list {
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
}

.leaderboard-toolbar--stacked .tab-list a,
.leaderboard-toolbar--stacked .tab-list a:first-child,
.leaderboard-toolbar--stacked .tab-list a:nth-child(4),
.leaderboard-toolbar--stacked .tab-list a:nth-child(odd) {
    border-left: 1px solid rgba(215, 170, 85, .18);
}

.leaderboard-toolbar--stacked .tab-list a:first-child {
    border-left: 0;
}

.leaderboard-controls--dungeon {
    align-items: flex-start;
}

.leaderboard-datasets {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.dataset-switch--dungeon {
    flex-wrap: wrap;
}

.dataset-switch--dungeon a,
.dataset-switch--period a {
    white-space: nowrap;
}

.player-avatar {
    overflow: hidden;
}

.player-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.profile-dungeon,
.profile-name-tags {
    grid-column: 1 / -1;
    padding: 24px;
}

.profile-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.profile-dungeon-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.profile-dungeon-card {
    min-width: 0;
    padding: 17px 14px;
    border: 1px solid rgba(215, 170, 85, .22);
    border-radius: 9px;
    background: linear-gradient(180deg, rgba(68, 58, 59, .22), rgba(8, 11, 17, .56));
    text-align: center;
}

.profile-dungeon-card span {
    display: block;
    color: var(--muted);
    font-size: .67rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.profile-dungeon-card strong {
    display: block;
    margin-top: 8px;
    color: var(--gold-light);
    font-family: "Mooli", ui-sans-serif, system-ui, sans-serif;
    font-size: 1.25rem;
    line-height: 1.2;
}

.name-tag-grid {
    display: flex;
	flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0;
}

.name-tag-preview {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border: 1px solid rgba(199, 125, 255, .35);
    border-radius: 6px;
    color: var(--purple-light);
    background: rgba(78, 32, 105, .2);
    font-family: "Mooli", ui-sans-serif, system-ui, sans-serif;
    font-size: .82rem;
    font-weight: 700;
}

.name-tag-card p {
    margin: 7px 0 0;
    font-size: .78rem;
}

.name-tag--gold .name-tag-preview {
    color: #f2d18a;
    border-color: rgba(215, 170, 85, .48);
    background: rgba(110, 72, 20, .22);
}

.name-tag--blue .name-tag-preview {
    color: #a9c6ff;
    border-color: rgba(110, 134, 255, .45);
    background: rgba(39, 61, 133, .22);
}

.profile-empty-message {
    margin: 18px 0 0;
}

@media (max-width: 900px) {
    .server-strip--compact {
        grid-template-columns: repeat(2, 1fr);
    }

    .server-strip--compact > div:first-child {
        grid-column: 1 / -1;
    }

    .leaderboard-controls--dungeon,
    .profile-section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .profile-dungeon-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .server-strip--compact,
    .profile-dungeon-grid {
        grid-template-columns: 1fr;
    }

    .server-strip--compact > div:first-child {
        grid-column: auto;
    }

    .leaderboard-datasets,
    .dataset-switch--dungeon,
    .dataset-switch--period {
        width: 100%;
    }

    .dataset-switch--dungeon {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dataset-switch--period {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dataset-switch--dungeon a,
    .dataset-switch--period a {
        text-align: center;
    }
}
