/* public/settings.css
   The settings form (settings-form.js), shared by the modal on the game page and
   the /settings page. Its own file because the two pages load different base
   stylesheets (style.css and pages.css) and the form must look the same in both. */

.settings-group h2 {
    /* Same rhythm as `.doc h2`, which does not apply inside the form. */
    margin: 32px 0 4px;
    font-size: 20px;
}

.setting {
    display: grid;
    /* Label and control on one line, help text underneath and full width, so a
       long explanation never squeezes the control it belongs to. */
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 4px 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--card-border);
}

.setting-label {
    font-weight: 600;
    grid-column: 1;
}

.setting-field {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.setting-help {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    max-width: 62ch;
}

/* A disabled control still says what it is and what it would do — it is only
   dimmed, so the reason it is unavailable (the switch above it) stays legible. */
.setting.is-disabled .setting-label,
.setting.is-disabled .setting-help {
    opacity: 0.5;
}

/* Lives inside `.setting-field`, beside the slider. As a grid item of its own
   it shared a cell with the control and printed on top of it. Tabular figures
   so the width does not jitter while the slider is dragged. */
.setting-value {
    color: var(--muted);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    min-width: 4ch;
    text-align: right;
}

.setting input[type="text"],
.setting select {
    background: var(--surface-2);
    color: var(--ink);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    font: inherit;
    min-width: 12ch;
}

.setting input[type="range"] {
    width: 180px;
    accent-color: var(--accent);
}

.setting input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--accent);
}

.setting input:focus-visible,
.setting select:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

