/*
 * Filter pill bar. All selectors carry the le-fb- prefix and win over the
 * template CSS through structure, not through !important.
 *
 * Design tokens live here once and are referenced everywhere else. A hard-coded
 * colour inside a component is the start of the drift this file exists to stop.
 */
/*
 * Two tokens sit above the component: the loading state styles #product-list,
 * which is the template's node and never a descendant of .le-fb, so it cannot
 * inherit from there. They are declared once here rather than repeated as a
 * literal in the busy rule - that repetition is the drift this file avoids.
 * Nothing is styled at :root, only named.
 */
:root {
    --le-fb-brand: #8fad07;
    --le-fb-track: #e5e5e5;
}

/*
 * The bar's own box, and the three declarations lead the rule because they are
 * the fix, not a detail of it.
 *
 * Since Task 02e the bar is a direct child of #result-wrapper, and admorris lays
 * that out as `display: flex; flex-direction: column` with `align-items: normal`.
 * A flex item there is sized by its CONTENT, not by the container. Measured at
 * 393 px on 20.09.2026: every sibling of the bar 353 px wide, the bar itself
 * 804 px — so .le-fb__row had scrollWidth === clientWidth === 804, there was
 * nothing left to scroll, and the pills on the right were simply cut off with no
 * way to reach them. Before 02e the bar sat inside #improve_search, an ordinary
 * block, which had capped the width without anyone noticing it was doing so.
 *
 * min-width: 0 is the load-bearing one: a flex item refuses to shrink below its
 * content width until it is told it may. max-width then keeps it inside the
 * container, and width fills it.
 *
 * Outside the media query on purpose. The same three lines are correct on the
 * desktop, where the bar is the container width anyway — and a rule that only
 * exists below a breakpoint is a rule that stops being tested the moment the
 * breakpoint moves.
 */
.le-fb {
    min-width: 0;
    width: 100%;
    max-width: 100%;

    --le-fb-ink: #1d1d1b;
    --le-fb-muted: #6b6b66;
    --le-fb-border: #d8d8d2;
    --le-fb-surface: #fff;
    --le-fb-box: 18px;
    --le-fb-icon: 12px;
    --le-fb-icon-lg: 18px;
    --le-fb-radius: 999px;
    --le-fb-radius-panel: 8px;
    --le-fb-gap: 8px;
    --le-fb-pad-y: 8px;
    --le-fb-pad-x: 14px;
    --le-fb-font: "Lato", -apple-system, "Segoe UI", sans-serif;
    --le-fb-max: 1260px;

    margin: 14px 0 14px;
    font-family: var(--le-fb-font);
    color: var(--le-fb-ink);
}

/*
 * admorris puts an `hr.v-spacing` (1 px line, margin: 25px 0) directly above the
 * bar. Measured on 20.09.2026 at 393 px and 1538 px: line → pills 25 px, pills →
 * first product card 12 px. That asymmetry is the uneven gap from Lukas'
 * screenshot, and above a pill bar the rule itself has nothing left to separate.
 *
 * Hidden through `:has()` so ONLY the line immediately before the bar goes; the
 * same class is used elsewhere on the page and must keep working there. The
 * adjacency survives an AJAX swap because the bar is replaced with replaceWith,
 * which keeps the node in place among its siblings.
 *
 * The bar owns its own outer spacing, 14 px on both sides (above). It started at
 * 0 above, inheriting whatever the preceding `.le-cat-top` brought — measured on
 * 20.09.2026 that left 18 px between the style tiles and the pills against 14 px
 * down to the first product card, and with the rule gone the bar read as part of
 * the category header rather than as the top of the grid. `#result-wrapper` is a
 * flex column, where margins do not collapse, so the value adds to the tiles'
 * own bottom margin and lands at 32 px above against an unchanged 14 px below.
 */
hr.v-spacing:has(+ .le-fb) {
    display: none;
}

/*
 * The reading-width cap from the mockup. It has to come after the unconditional
 * max-width above and may only narrow the bar, never widen it — so it lives in a
 * desktop-only query rather than competing with the rule that keeps the bar
 * inside its container.
 */
@media (min-width: 768px) {
    .le-fb {
        max-width: var(--le-fb-max);
        /* Only where the cap actually bites; the unconditional rule above keeps
           the horizontal margins at 0, which is what a flex child wants. */
        margin-inline: auto;
    }
}

/*
 * Soft launch: with hide-toolbar = 0 both the stock toolbar and the template's
 * active-filter block stay visible; the bar is then purely additive.
 *
 * The state is read from an attribute the plugin puts on body, NOT from where
 * our bar sits. The earlier rules used a sibling combinator and `:has(> …)`, so
 * they described a position rather than a setting - and the AJAX layer moves
 * positions. A re-inserted region landed outside the relation and the setting
 * stopped applying without anything reporting it. An attribute survives every
 * node move.
 *
 * Consequence to know: this hides EVERY toolbar and chip row on the page, where
 * the sibling rule only ever hid the one next to the bar. On a listing with a
 * second toolbar below the grid that is the intended reading of the setting.
 */
body[data-le-fb-hide-toolbar="1"] .result-options,
body[data-le-fb-hide-toolbar="1"] .active-filters {
    display: none;
}

.le-fb__row {
    display: flex;
    align-items: center;
    gap: var(--le-fb-gap);
}

.le-fb__left {
    display: flex;
    align-items: center;
    gap: var(--le-fb-gap);
}

.le-fb__right {
    display: flex;
    align-items: center;
    gap: var(--le-fb-gap);
    margin-left: auto;
}

.le-fb__pill-wrap {
    position: relative;
}

.le-fb__pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: var(--le-fb-pad-y) var(--le-fb-pad-x);
    border: 1px solid var(--le-fb-border);
    border-radius: var(--le-fb-radius);
    background: var(--le-fb-surface);
    color: inherit;
    font: inherit;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.le-fb__pill:hover {
    border-color: var(--le-fb-muted);
}

.le-fb__pill.is-active {
    border-color: var(--le-fb-brand);
    box-shadow: inset 0 0 0 1px var(--le-fb-brand);
}

.le-fb__badge {
    display: inline-block;
    min-width: 18px;
    padding: 0 5px;
    border-radius: var(--le-fb-radius);
    background: var(--le-fb-brand);
    color: #fff;
    font-size: 12px;
    text-align: center;
}

.le-fb__dropdown {
    position: absolute;
    z-index: 30;
    top: calc(100% + 6px);
    right: 0;
    min-width: 260px;
    max-width: 340px;
    padding: 12px;
    border: 1px solid var(--le-fb-border);
    border-radius: var(--le-fb-radius-panel);
    background: var(--le-fb-surface);
    box-shadow: 0 6px 24px rgba(0, 0, 0, .12);

    /*
     * The closed state, and therefore also the state a closing panel travels
     * back to. `display` is not animatable, so `hidden` only decides whether the
     * panel is in the layout at all and the visible state is the class below —
     * the script un-hides first and adds the class a frame later, so there is a
     * value to leave from. The duration here is the CLOSING one (the rule that
     * is in force while the panel returns to it); opening is the slower half.
     *
     * pointer-events go with it: for the length of the transition an invisible
     * panel is still on top of the pills, and a click landing in it would be
     * swallowed by something the user cannot see.
     */
    transform: translateY(-6px);
    transform-origin: top right;
    opacity: 0;
    pointer-events: none;
    transition: opacity 120ms cubic-bezier(.2, 0, 0, 1), transform 120ms cubic-bezier(.2, 0, 0, 1);
}

.le-fb__dropdown.is-open {
    transform: none;
    opacity: 1;
    pointer-events: auto;
    transition-duration: 160ms;
}

.le-fb__dropdown[hidden] {
    display: none;
}

.le-fb__dropdown-head {
    display: flex;
    align-items: center;
    gap: var(--le-fb-gap);
    margin-bottom: 8px;
}

/* The title takes the slack, so reset and close stay at the right edge. */
.le-fb__dropdown-title {
    flex: 1;
    font-weight: 700;
}

.le-fb__reset,
.le-fb__apply {
    border: 0;
    background: none;
    color: var(--le-fb-muted);
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.le-fb__apply {
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    border-radius: var(--le-fb-radius-panel);
    background: var(--le-fb-brand);
    color: #fff;
    text-decoration: none;
}

.le-fb__search {
    width: 100%;
    margin-bottom: 8px;
    padding: 8px 10px;
    border: 1px solid var(--le-fb-border);
    border-radius: var(--le-fb-radius-panel);
    font: inherit;
}

.le-fb__list {
    max-height: 260px;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    list-style: none;
}

.le-fb__item[hidden] {
    display: none;
}

.le-fb__option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 2px;
    color: inherit;
    text-decoration: none;
}

/*
 * Checkbox and its tick. The tick is a rotated two-sided border, the same shape
 * the approved mockup uses — drawn rather than shipped as an icon font or SVG so
 * it inherits the brand colour token and needs no second asset.
 */
.le-fb__check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--le-fb-box);
    height: var(--le-fb-box);
    border: 2px solid var(--le-fb-border);
    border-radius: 3px;
    flex: 0 0 auto;
}

.le-fb__option[data-le-fb-selected="1"] .le-fb__check {
    border-color: var(--le-fb-brand);
    background: var(--le-fb-brand);
}

/* content:'' — an empty string, not `none`: `none` suppresses the box entirely. */
.le-fb__option[data-le-fb-selected="1"] .le-fb__check::after {
    content: "";
    width: 4px;
    height: 9px;
    margin-top: -2px;
    border: solid var(--le-fb-surface);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Sorting is single choice, so its control is a radio, not a checkbox. */
.le-fb__option--radio .le-fb__check {
    border-radius: 50%;
}

.le-fb__option--radio[data-le-fb-selected="1"] .le-fb__check::after {
    width: 3px;
    height: 7px;
    border-width: 0 2px 2px 0;
}

.le-fb__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

/*
 * Chips are the state, pills are the controls, and the two must not look alike.
 * A chip therefore drops the border a pill has and takes a filled grey ground
 * instead; a pill keeps white plus border. Reported by Lukas on 20.09.2026: with
 * both wearing a border, the row below the bar read as a second row of filters.
 */
.le-fb__chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 6px 0 12px;
    border: 0;
    border-radius: var(--le-fb-radius);
    background: #f1f1f1;
    color: var(--le-fb-ink);
    font-size: 14px;
    line-height: 1;
    text-decoration: none;
}

.le-fb__chip-group {
    color: #888;
    font-weight: 400;
}

.le-fb__chip-value {
    margin-left: 4px;
    font-weight: 700;
}

.le-fb__chip-x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    color: #555;
    font-size: 16px;
    line-height: 1;
}

.le-fb__chip:hover .le-fb__chip-x {
    background: #ddd;
}

.le-fb__clear {
    align-self: center;
    border: 0;
    padding: 4px 6px;
    background: none;
    color: #555;
    font: inherit;
    font-size: 14px;
    text-decoration: underline;
    cursor: pointer;
}

/*
 * Zero results. Sits inside the bar, below the chips, so the reader sees what is
 * filtering before being told that nothing matches it.
 */
.le-fb__empty {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-top: 16px;
    padding: 24px;
    border-radius: var(--le-fb-radius-panel);
    background: #f1f1f1;
}

.le-fb__empty-text {
    margin: 0;
    color: var(--le-fb-ink);
    font-size: 16px;
}

.le-fb__empty-reset {
    padding: var(--le-fb-pad-y) var(--le-fb-pad-x);
    border-radius: var(--le-fb-radius);
    background: var(--le-fb-brand);
    color: #fff;
    text-decoration: none;
}

/*
 * Price range.
 *
 * Two native range inputs are stacked on one rail. They carry no track and no
 * background of their own - the rail and the coloured fill below them are
 * ordinary spans, driven by the two custom properties the script writes. Only
 * the THUMBS accept pointer events; without that the upper input would cover the
 * whole rail and swallow every gesture meant for the lower one.
 */
.le-fb__price-slider {
    position: relative;
    height: 28px;
    margin: 4px 6px 10px;
}

.le-fb__price-rail,
.le-fb__price-fill {
    position: absolute;
    top: 50%;
    height: 4px;
    margin-top: -2px;
    border-radius: 2px;
}

.le-fb__price-rail {
    left: 0;
    right: 0;
    background: var(--le-fb-track);
}

.le-fb__price-fill {
    left: var(--le-fb-price-from, 0%);
    right: calc(100% - var(--le-fb-price-to, 100%));
    background: var(--le-fb-brand);
}

.le-fb__price-handle {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 28px;
    margin: 0;
    padding: 0;
    background: none;
    pointer-events: none;
    appearance: none;
    -webkit-appearance: none;
}

.le-fb__price-handle::-webkit-slider-thumb {
    width: var(--le-fb-box);
    height: var(--le-fb-box);
    border: 2px solid var(--le-fb-brand);
    border-radius: 50%;
    background: var(--le-fb-surface);
    pointer-events: auto;
    cursor: grab;
    appearance: none;
    -webkit-appearance: none;
}

.le-fb__price-handle::-moz-range-thumb {
    width: var(--le-fb-box);
    height: var(--le-fb-box);
    border: 2px solid var(--le-fb-brand);
    border-radius: 50%;
    background: var(--le-fb-surface);
    pointer-events: auto;
    cursor: grab;
}

.le-fb__price-handle:focus-visible::-webkit-slider-thumb {
    box-shadow: 0 0 0 3px rgba(143, 173, 7, 0.35);
}

.le-fb__price-handle:focus-visible::-moz-range-thumb {
    box-shadow: 0 0 0 3px rgba(143, 173, 7, 0.35);
}

.le-fb__price-fields {
    display: flex;
    gap: var(--le-fb-gap);
}

.le-fb__price-field {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    font-weight: 400;
}

.le-fb__price-caption {
    color: var(--le-fb-muted);
    font-size: 13px;
}

.le-fb__price-box {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 10px;
    border: 1px solid var(--le-fb-border);
    border-radius: var(--le-fb-radius-panel);
}

.le-fb__price-input {
    width: 100%;
    min-width: 0;
    border: 0;
    padding: 0;
    background: none;
    color: inherit;
    font: inherit;
}

.le-fb__price-input:focus {
    outline: none;
}

.le-fb__price-unit {
    color: var(--le-fb-muted);
}

/*
 * Mobile hybrid. The sheet, its scrim, the drag handle and the sheet's close
 * button are laid out here but only revealed below the breakpoint - on the
 * desktop a dropdown closes with Escape or a click beside it.
 */
.le-fb__pill--sheet,
.le-fb__handle,
.le-fb__close,
.le-fb__sheet,
.le-fb__scrim {
    display: none;
}

.le-fb__acc {
    border-bottom: 1px solid var(--le-fb-border);
}

.le-fb__acc-head {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 14px 2px;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.le-fb__acc-name {
    font-weight: 700;
}

.le-fb__acc-value {
    flex: 1 1 auto;
    overflow: hidden;
    color: var(--le-fb-muted);
    font-size: 14px;
    text-align: right;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.le-fb__acc-body[hidden] {
    display: none;
}

.le-fb__acc-body {
    padding-bottom: 10px;
}

/*
 * Inline SVG icons. They inherit currentColor, so a pill that changes colour
 * takes its icon with it and no second asset is requested. The chevron flips on
 * aria-expanded rather than on a JS-set class: the attribute is already the
 * source of truth for screen readers, so there is only one state to keep right.
 */
.le-fb__chevron,
.le-fb__sliders {
    stroke: currentColor;
    fill: none;
    flex: 0 0 auto;
}

.le-fb__chevron {
    width: var(--le-fb-icon);
    height: var(--le-fb-icon);
    stroke-width: 2.2;
    transition: transform .15s;
}

.le-fb__sliders {
    width: var(--le-fb-icon-lg);
    height: var(--le-fb-icon-lg);
    stroke-width: 2;
}

[aria-expanded="true"] > .le-fb__chevron {
    transform: rotate(180deg);
}

/*
 * "More filters" is a text action in the mockup, not a pill: no border, bold,
 * icon leading. It keeps the pill class for layout and overrides the skin.
 */
.le-fb__more {
    border-color: transparent;
    background: none;
    padding-left: 8px;
    padding-right: 0;
    font-weight: 700;
}

.le-fb__more:hover {
    border-color: transparent;
    text-decoration: underline;
}

.le-fb__option--radio .le-fb__check {
    border-radius: 50%;
}

/*
 * Availability pill. It used to carry the admorris avf classes so the template
 * SCSS would style it - measured on 20.09.2026 that SCSS made it uppercase, 47px
 * tall and gave it a foreign box. It is a plugin pill now and is styled here;
 * only the data-le-avf attribute stays, because the admorris element keys on it.
 * (The old class names are deliberately not spelled out: a gate greps for them.)
 */
.le-fb__avf {
    text-transform: none;
}

.le-fb__avf-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--le-fb-box);
    height: var(--le-fb-box);
    border: 2px solid var(--le-fb-border);
    border-radius: 3px;
    flex: 0 0 auto;
}

.le-fb__avf.is-active .le-fb__avf-box {
    border-color: var(--le-fb-brand);
    background: var(--le-fb-brand);
}

.le-fb__avf.is-active .le-fb__avf-box::after {
    content: "";
    width: 4px;
    height: 8px;
    margin-top: -2px;
    border: solid var(--le-fb-surface);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.le-fb__switch {
    position: relative;
    width: 38px;
    height: 22px;
    margin-left: auto;
    border-radius: var(--le-fb-radius);
    background: var(--le-fb-border);
    flex: 0 0 auto;
}

.le-fb__switch::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--le-fb-surface);
    transition: left .15s;
}

.le-fb__acc-head[data-le-fb-selected="1"] .le-fb__switch {
    background: var(--le-fb-brand);
}

.le-fb__acc-head[data-le-fb-selected="1"] .le-fb__switch::after {
    left: 18px;
}

/* Mobile: one horizontally scrolling row. Breakpoint is a single named value. */
@media (max-width: 767px) {
    .le-fb__row {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .le-fb__row::-webkit-scrollbar {
        display: none;
    }

    .le-fb__right {
        margin-left: 0;
    }

    .le-fb__sort,
    .le-fb__more {
        display: none;
    }

    /* Single pill becomes a bottom sheet: scrim, handle, list, apply. */
    .le-fb__dropdown {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        top: auto;
        z-index: 1052;
        max-width: none;
        max-height: 70vh;
        overflow-y: auto;
        border-radius: var(--le-fb-radius-panel) var(--le-fb-radius-panel) 0 0;

        /*
         * Same two states as on the desktop, different gesture: down here the
         * panel IS a bottom sheet, so it arrives from below its own edge instead
         * of fading down from the pill. Full opacity throughout — a sheet that
         * also faded would read as two separate things happening.
         */
        transform: translateY(100%);
        opacity: 1;
        transition: transform 200ms ease-in;
    }

    .le-fb__dropdown.is-open {
        transform: none;
        transition: transform 240ms cubic-bezier(.2, 0, 0, 1);
    }

    /*
     * A dragged sheet has to sit exactly under the finger, so for the length of
     * the drag there is no transition to lag behind it. The script takes the
     * class off before it lets go of the inline offset, which is what turns the
     * release back into a movement — up if the drag is abandoned, on down if it
     * dismissed.
     */
    .le-fb__dropdown.is-dragging,
    .le-fb__sheet.is-dragging {
        transition: none;
    }

    /*
     * The handle is a grip, not a decoration: the visible line is 40x4, but the
     * element itself spans the sheet's full width and is tall enough to be hit
     * without aiming. touch-action keeps the browser from claiming the vertical
     * gesture for a scroll before the drag listener sees it.
     */
    .le-fb__handle {
        display: block;
        position: relative;
        height: 22px;
        margin: -4px 0 6px;
        touch-action: none;
        cursor: grab;
    }

    .le-fb__handle::after {
        content: "";
        position: absolute;
        top: 8px;
        left: 50%;
        width: 40px;
        height: 4px;
        margin-left: -20px;
        border-radius: var(--le-fb-radius);
        background: var(--le-fb-border);
    }

    /* 44x44 tap target, per the mockup and the usual minimum. */
    .le-fb__close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        margin: -12px -12px -12px 0;
        border: 0;
        background: none;
        color: var(--le-fb-ink);
        font-size: 24px;
        line-height: 1;
        cursor: pointer;
    }

    .le-fb__pill--sheet {
        display: inline-flex;
        order: -1;
        border-color: var(--le-fb-ink);
    }

    .le-fb__scrim {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1050;
        background: rgba(0, 0, 0, .45);

        /* Fades alongside the sheet it belongs to, on the same two durations. */
        opacity: 0;
        transition: opacity 200ms ease-in;
    }

    .le-fb__scrim.is-open {
        opacity: 1;
        transition-duration: 240ms;
    }

    .le-fb__scrim[hidden] {
        display: none;
    }

    /* Full-screen sheet: header, scrolling accordion body, sticky footer. */
    .le-fb__sheet {
        display: flex;
        position: fixed;
        inset: 0;
        z-index: 1055;
        flex-direction: column;
        background: var(--le-fb-surface);

        /* Same slide as a single-filter sheet, a touch slower for the full height. */
        transform: translateY(100%);
        transition: transform 200ms ease-in;
    }

    .le-fb__sheet.is-open {
        transform: none;
        transition: transform 260ms cubic-bezier(.2, 0, 0, 1);
    }

    .le-fb__sheet[hidden] {
        display: none;
    }

    .le-fb__sheet-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 16px;
        border-bottom: 1px solid var(--le-fb-border);
        font-weight: 700;
    }

    .le-fb__sheet-close {
        border: 0;
        background: none;
        color: inherit;
        font-size: 24px;
        line-height: 1;
        cursor: pointer;
    }

    .le-fb__sheet-body {
        flex: 1 1 auto;
        padding: 0 16px;
        overflow-y: auto;
    }

    .le-fb__sheet-body .le-fb__list {
        max-height: none;
    }

    .le-fb__sheet-foot {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
        border-top: 1px solid var(--le-fb-border);
    }

    .le-fb__sheet-reset {
        border: 1px solid var(--le-fb-border);
        border-radius: var(--le-fb-radius-panel);
        padding: 12px 16px;
        background: none;
        color: inherit;
        font: inherit;
        cursor: pointer;
    }

    .le-fb__sheet-apply {
        flex: 1 1 auto;
        border: 0;
        border-radius: var(--le-fb-radius-panel);
        padding: 12px 16px;
        background: var(--le-fb-brand);
        color: #fff;
        font: inherit;
        cursor: pointer;
    }
}

/* Set while a sheet is open so the page behind it cannot scroll away. */
body.le-fb-locked {
    overflow: hidden;
}

/*
 * Loading state of an in-place filter change (phase 2).
 *
 * The class sits on body, not on the grid: the grid node is replaced during the
 * swap, so a state stored on it would be carried away half-way through and the
 * clean-up would have nothing left to clear. Values taken from the approved
 * mockup (opacity .35, 38 px ring, brand arc on a grey track).
 */
body.le-fb-busy {
    --le-fb-spinner: 38px;
    --le-fb-spinner-top: 120px;
}

body.le-fb-busy #product-list {
    position: relative;
    opacity: .35;
    pointer-events: none;
    transition: opacity .15s;
}

body.le-fb-busy #product-list::after {
    content: "";
    position: absolute;
    z-index: 5;
    top: var(--le-fb-spinner-top);
    left: 50%;
    width: var(--le-fb-spinner);
    height: var(--le-fb-spinner);
    margin-left: calc(var(--le-fb-spinner) / -2);
    border: 4px solid var(--le-fb-track);
    border-top-color: var(--le-fb-brand);
    border-radius: 50%;
    animation: le-fb-spin .7s linear infinite;
}

@keyframes le-fb-spin {
    to { transform: rotate(360deg); }
}

/*
 * A spinner that cannot spin still has to read as "busy", hence the dimming.
 *
 * The surfaces below keep both of their states — a panel still arrives at
 * opacity 1 and offset 0 — and lose only the travel between them. Every selector
 * that declares a duration above is repeated here, in both its states, because
 * `transition-duration` on the closed rule does not reach the open one and the
 * open one would otherwise still animate. The script agrees on its own side: it
 * asks the same media query and, when it matches, sets the classes at once
 * instead of waiting a frame and then a transition that will not come.
 */
@media (prefers-reduced-motion: reduce) {
    body.le-fb-busy #product-list::after {
        animation: none;
    }

    .le-fb__dropdown,
    .le-fb__dropdown.is-open,
    .le-fb__sheet,
    .le-fb__sheet.is-open,
    .le-fb__scrim,
    .le-fb__scrim.is-open,
    body.le-fb-busy #product-list {
        transition-duration: 0s;
    }
}
