.autex-checkbox-filter__title {
    margin: 0 0 8px;
}

.autex-checkbox-filter__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    padding-right: 10px;
    max-height: var(--autex-checkbox-filter-max-height, 10000px);
    overflow-y: auto;
    list-style: none;

    scrollbar-width: thin;

    scrollbar-color: var(--brand-aa-black) var(--brand-aa-opera);

    &::-webkit-scrollbar {
        width: 8px;
    }

    &::-webkit-scrollbar-track {
        background: var(--brand-aa-opera);
    }

    &::-webkit-scrollbar-thumb {
        background: var(--brand-aa-black);
        border-radius: 4px;
    }

    &::-webkit-scrollbar-thumb:hover {
        background: darken(var(--brand-aa-black), 20%);
    }

}

.autex-checkbox-filter__item {
    display: flex;
    order: 1;
}

.autex-checkbox-filter__item.is-disabled {
    order: 2;
}

.autex-checkbox-filter__label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    user-select: none;

}

/* Hide the native checkbox */
.autex-checkbox-filter__checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Custom checkbox indicator */
.autex-checkbox-filter__checkbox-indicator {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid currentColor;
    background-color: transparent;
    transition: background-color 0.15s, border-color 0.15s;
    position: relative;
    margin-bottom: 2px;
    margin-top: 2px;
}

.autex-checkbox-filter__checkbox:checked~.autex-checkbox-filter__checkbox-indicator {}

/* Focus ring for keyboard navigation */
.autex-checkbox-filter__checkbox:focus-visible~.autex-checkbox-filter__checkbox-indicator {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Disabled state (for backfiltering — wired up later) */
.autex-checkbox-filter__item.is-disabled .autex-checkbox-filter__label {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}