/*
 * DEVMC - 2026.10.17 - feature #feature-filters# "T3: catalog sidebar blocks for the filterable
 * product feature fields (odd/tasks/feature-filters.md). The blocks reuse the native sidebar
 * markup (h2.saider-bar-title + .brands list, .price-filter-fields for ranges), so the theme and
 * its mobile sheet rules already style them; this sheet only adds what they lack: the
 * collapsible title, the count colour outside .check-box-list and a cap for long text lists.
 * Loaded by productCategory.blade.php with manual ?v=N (same pattern as coupons-page.css)."
 */

.catalog-feature-filter__title {
    padding-bottom: 0;
}

.catalog-feature-filter__toggle {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 0 5px;
    border: 0;
    background: transparent;
    box-shadow: none;
    outline: none;
    color: inherit;
    font: inherit;
    text-align: left;
    text-transform: inherit;
    cursor: pointer;
}

.catalog-feature-filter__toggle:focus-visible {
    outline: 2px solid var(--header-menu-top-color);
    outline-offset: 2px;
}

.catalog-feature-filter__name {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}

.catalog-feature-filter__chevron {
    flex: 0 0 auto;
    transition: transform .2s ease;
}

.catalog-feature-filter.is-collapsed .catalog-feature-filter__chevron {
    transform: rotate(-90deg);
}

.catalog-feature-filter.is-collapsed .catalog-feature-filter__body {
    display: none;
}

.catalog-feature-filter .count {
    color: #a4a4a4;
    margin-left: 2px;
}

.catalog-feature-filter .feature-checkbox:focus-visible + label {
    outline: 2px solid var(--header-menu-top-color);
    outline-offset: 2px;
}

.catalog-feature-filter .feature-range-input:focus-visible {
    outline: 2px solid var(--header-menu-top-color);
    outline-offset: 2px;
}

/* A text field can offer dozens of distinct values: cap the list on desktop. In the mobile sheet
   the whole panel already scrolls, and a nested scroll area there traps the finger. */
@media (min-width: 768px) {
    .catalog-feature-filter__options {
        max-height: 240px;
        overflow-y: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .catalog-feature-filter__chevron {
        transition: none;
    }
}
