.tb-results-filter {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: config('colors.grey-lightest');
}

.tb-results-filter__collapse-button {
    font-weight: 700;
    margin-bottom: 1rem;
    width: 100%;

    span {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .c-icon {
        font-size: 1.5rem;
        top: 0;
        right: -.25rem;
    }

    .c-icon--toggle-up {
        display: none;
    }

    &[aria-expanded=true] {
        .c-icon--toggle-up {
            display: inline;
        }

        .c-icon--toggle-down {
            display: none;
        }
    }
}

.tb-results-filter__facet {
    display: none;

    [aria-expanded=true] + & {
        display: block;
    }
}

.tb-results-filter__facet-list {
    padding: 0;
    list-style: none;
    display: block;
    overflow: hidden;
    max-height: 9rem;
    transition: max-height .3s;

    &.is-target {
        max-height: 100rem;
    }

    li {
        margin-bottom: .5rem;
    }
}

.tb-results-filter__label {
    font-size: config('textSizes.sm');
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tb-results-filter__checkbox {
    margin-right: 1ch;
}

.tb-results-filter__label-text {
    margin-right: auto;
}

.tb-results-filter__label-amount {
    margin-left: auto;
}

.tb-results-filter__toggle-more-facets {
    margin: config('margin.4') 0 config('margin.2');
    color: config('colors.secondary');

    span {
        display: inline-block;
        transition: .3s;
    }

    .c-icon {
        font-size: 1.25rem;
        left: -.25rem;
    }

    .c-icon--toggle-up {
        display: none;
    }

    &[aria-expanded=true] {
        .c-icon--toggle-up {
            display: inline;
        }

        .c-icon--toggle-down {
            display: none;
        }
    }
}
