/* ========================================
   Demo browser (/admin/demos) — .demos-* prefix.
   Tables, filter bar, badges and buttons reuse server-table-glassy, bans-filter-card,
   ranks-server-btn, action-btn and hall-sort; only the gaps live here.
   Sizing: Bootstrap fs-* / small only — no font-size.
   ======================================== */

/* Server folder chips: a horizontal strip on phones (flex-nowrap + overflow-x-auto), wrapped from md. */
.demos-folder-card {
    flex: 0 0 auto;
    width: 12.5rem;
    padding: 0.6rem 0.85rem;
    color: inherit;
    cursor: pointer;
}

.demos-folder-card:hover {
    transform: translateY(-2px);
}

.demos-folder-card.active {
    border-color: #0dcaf0;
    background: rgba(13, 202, 240, 0.15);
}

.demos-folder-card:focus-visible {
    outline: 2px solid rgba(13, 202, 240, 0.8);
    outline-offset: 2px;
}

/* Long map lists scroll inside the menu. */
.demos-menu-scroll {
    max-height: 20rem;
    overflow-y: auto;
}

.demos-detail-row > td {
    padding: 0 0.5rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* minmax(0, 1fr) gives the nested scoreboard no min-content width, so it scrolls in its
   own wrapper instead of widening the demo table on phones. */
.demos-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

.demos-sb-player {
    max-width: 16rem;
}

.demos-scoreboard > tbody > tr.is-bot > td {
    color: rgba(255, 255, 255, 0.45);
}

/* hall-row-user's tint, restated with !important because .server-table-row forces a transparent background. */
.demos-scoreboard > tbody > tr.hall-row-user {
    background: rgba(13, 202, 240, 0.1) !important;
}

/* Phones scroll the scoreboard sideways; the player column stays put so every row keeps its name.
   Opaque on purpose: any translucency shows the cells scrolling underneath. */
@media (max-width: 767.98px) {
    .demos-sb-player {
        max-width: 9.5rem;
    }

    .demos-scoreboard > thead > tr > th:first-child,
    .demos-scoreboard > tbody > tr > td:first-child {
        position: sticky;
        left: 0;
        z-index: 1;
        background: rgb(17, 24, 35);
        box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.08);
    }

    .demos-scoreboard > thead > tr > th:first-child {
        background: linear-gradient(rgba(13, 202, 240, 0.12), rgba(13, 202, 240, 0.12)), rgb(17, 24, 35);
    }

    .demos-scoreboard > tbody > tr.hall-row-user > td:first-child {
        background: linear-gradient(rgba(13, 202, 240, 0.1), rgba(13, 202, 240, 0.1)), rgb(17, 24, 35);
        box-shadow: inset 3px 0 0 #0dcaf0, inset -1px 0 0 rgba(255, 255, 255, 0.08);
    }
}
