.tb-results-filter__facet { }

.tb-results-filter__facet:first-child .tb-results-filter__heading {
    display: none;
}

// Facet List
.tb-results-filter__facet-list {
    list-style: none;
    display: block;
    transition: max-height .3s;

    li {
        margin-bottom: $spacing-2;
        padding-bottom: $spacing-2;

        &:not(:last-child) {
            border-bottom: 1px solid config('colors.grey-lighter');
        }
    }

    @media screen and (min-width: $mediaquery-lg) {
        overflow: auto;
        max-height: 9rem;
        padding: 0 $spacing-base;

        &:only-of-type {
            max-height: 18rem;
        }
    }
}

.tb-results-filter__heading {
    font-size: $text-lg;
    margin: 0 0 1.25rem;

    @media screen and (min-width: $mediaquery-lg) {
        margin: $spacing-6 $spacing-base 1.25rem;
    }
}

.tb-results-filter__label {
    position: relative;
    cursor: pointer;
    color: config('colors.grey-darker');
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: $spacing-1 0;
    transition: color $transition-fast;

    &:hover {
        color: config('colors.grey-darkest');
    }

    &:focus {
        .tb-results-filter__label-text {
            outline: 1px dotted config('colors.primary-darkest');
        }
    }

    @media screen and (min-width: $mediaquery-lg) {
        padding: 0;
    }
}

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

.tb-results-filter__icon {
    display: none;
    color: config('colors.primary');
}

.tb-results-filter__checkbox {
    &:focus {
        outline: 1px dotted config('colors.primary-darkest');
    }
}
// Facet Checkbox is visually hidden (helper class)..
.tb-results-filter__checkbox:checked {
    ~ .tb-results-filter__label-text {
        color: config('colors.primary');
        font-weight: 700;
    }

    ~ .tb-results-filter__icon {
        display: inline;
    }

    &:hover,
    &:focus {
        ~ .tb-results-filter__label-text {
            color: config('colors.primary-dark');
        }

        ~ .tb-results-filter__icon {
            color: config('colors.primary-dark');
        }
    }
}
