/* Tabletop-only dashboard theming and game sidebar components. */
body.theme-tabletop {
    --dashboard-bg: #11191f;
    --dashboard-surface: #1b252c;
    --dashboard-surface-raised: #25323b;
    --dashboard-sidebar: #121b21;
    --dashboard-accent: #3e3ce9;
    --dashboard-accent-2: #c8c7ec;
}

.dashboard-tabletop-view {
    padding-block: 12px 4px;
}

.dashboard-tabletop-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding: 0 2px;
    color: var(--dashboard-text);
    font-size: 0.9rem;
    font-weight: 850;
}

.dashboard-tabletop-heading-mark {
    color: var(--dashboard-accent);
    font-size: 0.65rem;
}

.dashboard-tabletop-empty {
    margin: 8px 2px 2px;
    color: var(--dashboard-muted);
    font-size: 0.73rem;
    line-height: 1.45;
}

.dashboard-tabletop-admin-view [data-dashboard-admin-panel] {
    min-width: 0;
}

.dashboard-tabletop-admin-view .admin-panel {
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.dashboard-tabletop-admin-view .admin-panel > h2 {
    margin: 2px 0 10px;
    color: var(--dashboard-text);
    font-size: 1rem;
}

.dashboard-tabletop-admin-view .admin-tab-list {
    grid-template-columns: 1fr;
    margin: 8px 0;
}

.dashboard-tabletop-admin-view .admin-section {
    margin: 8px 0;
    padding: 8px;
}

.dashboard-tabletop-admin-view .admin-section-heading {
    display: block;
}

.dashboard-tabletop-admin-view .admin-current-selection {
    display: block;
    max-width: 100%;
    margin-bottom: 8px;
}

.dashboard-tabletop-admin-view .admin-library-tile-grid {
    grid-template-columns: repeat(auto-fill, minmax(116px, 160px));
    justify-content: start;
    align-items: start;
}

.dashboard-active-players-list {
    display: grid;
    gap: 2px;
}

.dashboard-active-player-card {
    padding: 7px 0;
    border-bottom: 1px solid var(--dashboard-border);
}

.dashboard-active-player-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.dashboard-active-player-row img {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    border-radius: 50%;
    object-fit: cover;
}

.dashboard-active-player-row span {
    overflow: hidden;
    color: var(--dashboard-text);
    font-size: 0.77rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-shell.is-sidebar-admin-open:not(.is-sidebar-collapsed) {
    --dashboard-sidebar-width: min(430px, 42vw);
    grid-template-columns: var(--dashboard-sidebar-width) minmax(0, 1fr);
}

.dashboard-shell.is-sidebar-admin-open:not(.is-sidebar-collapsed) .dashboard-sidebar {
    width: var(--dashboard-sidebar-width);
}

.tabletop-profile-switcher {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--dashboard-border);
    border-radius: 14px;
    background: color-mix(in srgb, var(--dashboard-accent) 8%, transparent);
    color: var(--dashboard-text);
    text-align: left;
}

.tabletop-profile-selector { display: grid; gap: 7px; margin-bottom: 12px; color: var(--dashboard-text); font-size: 0.9rem; font-weight: 750; }
.tabletop-profile-selector select { width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid var(--dashboard-border); border-radius: 10px; background: var(--dashboard-surface); color: var(--dashboard-text); font: inherit; }
.tabletop-profile-selector select:focus-visible { border-color: var(--dashboard-accent); outline: 2px solid color-mix(in srgb, var(--dashboard-accent) 45%, transparent); outline-offset: 2px; }
.tabletop-profile-switcher img { width: 58px; height: 58px; flex: 0 0 auto; border: 2px solid var(--dashboard-accent); border-radius: 50%; object-fit: cover; }
.tabletop-profile-switcher > span { display: grid; min-width: 0; gap: 3px; }
.tabletop-profile-switcher strong,
.tabletop-profile-switcher small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabletop-profile-switcher small,
.tabletop-profile-help,
.tabletop-profile-status { color: var(--dashboard-muted); }
.tabletop-profile-form { display: grid; gap: 12px; margin-top: 18px; }
.tabletop-profile-form > label { display: flex; min-height: 44px; align-items: center; justify-content: space-between; gap: 12px; font-size: 0.9rem; font-weight: 750; }
.tabletop-profile-form input[type="color"] { width: 56px; height: 40px; padding: 3px; border: 1px solid var(--dashboard-border); border-radius: 9px; background: transparent; cursor: pointer; }
.tabletop-profile-range { display: grid !important; grid-template-columns: 1fr auto; }
.tabletop-profile-range output { color: var(--dashboard-accent); font-variant-numeric: tabular-nums; }
.tabletop-profile-range input[type="range"] { grid-column: 1 / -1; width: 100%; accent-color: var(--dashboard-accent); }
.tabletop-profile-toggle { justify-content: flex-start !important; }
.tabletop-profile-toggle input { width: 20px; height: 20px; accent-color: var(--dashboard-accent); }
.tabletop-profile-pointer-state { margin: 0; color: var(--dashboard-muted); font-size: 0.8rem; }
.tabletop-profile-status,
.tabletop-profile-help { margin: 0; font-size: 0.8rem; line-height: 1.5; }
.tabletop-profile-status.is-error { color: #fca5a5; }
.tabletop-profile-help { margin-top: 16px; font-size: 0.875rem; }
