/*
 * Games (static/pages/games.js): a game's own page, the "New server" chooser and Settings > Games.
 * Built from the shared tokens, so each design gives them its look.
 */

/* ---------- A game's page (the Dashboard for its servers, dashboard.css) ---------- */
.game-unavailable p {
    margin-top: 0;
}

/* ---------- New server: which game, then how ---------- */
.nsc-content {
    max-width: 640px;
}
.nsc-question {
    margin: 0 0 0.85rem;
    color: var(--text-secondary);
}
.nsc-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
    padding: 0.3rem 0.1rem;
    background: none;
    border: 0;
    color: var(--accent-text);
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
}
.nsc-back.hidden {
    display: none;
}
.nsc-choices {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: 0.6rem;
}
.nsc-choice {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.65rem;
    min-width: 0;
    padding: 0.85rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font: inherit;
    text-align: left;
    white-space: normal;
    cursor: pointer;
}
.nsc-choice:hover,
.nsc-choice:focus-visible {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
    outline: none;
}
.nsc-choice .icon {
    flex: none;
    color: var(--accent-text);
}
.nsc-choice-title {
    font-weight: 600;
}

/* ---------- Settings > Games ---------- */
.games-settings {
    display: grid;
    gap: 0.6rem;
    margin-top: 0.75rem;
}
.game-setting {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-card-alt, var(--bg-card));
}
.game-setting.is-coming {
    opacity: 0.75;
}
.game-setting-text p {
    margin: 0;
}
.game-setting-summary {
    margin-top: 0.2rem !important;
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.game-setting .field-hint {
    margin-top: 0.2rem;
}
.game-setting button {
    flex: none;
}
.game-state {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.05rem 0.5rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    vertical-align: 0.1em;
    background: var(--bg-hover);
    color: var(--text-secondary);
}
.game-state-shown {
    background: var(--success-bg);
    color: var(--success-color);
}
:root[data-design="biome"] .game-state {
    border-radius: 0;
}
@media (max-width: 600px) {
    .game-setting {
        flex-direction: column;
        align-items: stretch;
    }
}

/* A tab or setting another game's server does not have (manage.js applyManageGame) */
.game-hidden {
    display: none !important;
}
