/* ============================================================================
 * Slider — a range input. ONE definition, product-wide.
 *
 * ⚠️ **THE COMPONENT IS THREE FILES:**
 *
 *   frontend/server_web/templates/components/forms/slider.html
 *       The macro: the only way a template makes a range input.
 *   frontend/server_web/static/css/design-system/slider.css
 *       This file. Everything visual.
 *   tests/unit/components/test_slider_component.py
 *       The guard: no hand-written range input in a template, and one built
 *       in script carries this class.
 *
 * ⚠️ **It is the browser's own slider, in the brand's colour. Do not turn the
 * native drawing off.** Until 2026-12-01 two of the product's three sliders
 * (the gateway Terrain tab's Relief, the policy editor's slider fields) set
 * ``appearance: none`` and then styled only the groove. With the native
 * drawing off, ``accent-color`` has nothing to colour, so the handle fell back
 * to the browser's default blue; and the input was 8px tall under a 16px
 * handle, which spilled over the text beside it. The third slider, the
 * positioning map's range knob, left the native control alone and was the one
 * that looked right. This is that one, named.
 *
 * A custom-drawn handle would need ``::-webkit-slider-thumb`` and
 * ``::-moz-range-thumb`` kept in step, a focus ring redrawn by hand, and a
 * fill that script has to paint. The native control gives all three.
 * ==========================================================================*/

.slider {
    /* Compact: beside a label in a toolbar. */
    width: 7.5rem;
    margin: 0;
    accent-color: var(--color-brand-green);
    cursor: pointer;
    vertical-align: middle;
}

/* Full width: a form field on its own line. */
.slider--block {
    display: block;
    width: 100%;
}

.slider:disabled {
    cursor: not-allowed;
}
