/* stylelint-disable */
.tb-results-filter__toggle {
    .tb-icon {
        font-size: $text-xs;
    }

    .tb-icon--close {
        display: none;
    }

    &[aria-expanded=true] {
        position: fixed;
        top: $spacing-base;
        left: $spacing-base;
        z-index: 2;

        .tb-results-filter__navigation--offer & {
            left: auto;
            right: $spacing-base;
        }

        .tb-icon--close {
            display: block;
        }

        .tb-icon--filter {
            display: none;
        }
    }

    @media screen and (max-width: $mediaquery-lg-max) {
        &.is-collapsed {
            top: -$spacing-8;
        }
    }

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

@media screen and (max-width: $mediaquery-lg-max) {
    html.is-target {
        overflow: hidden;
    }
}

.tb-results-filter__list {
    list-style: none;
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    order: 3;
    background: config('colors.white');

    @media screen and (max-width: $mediaquery-lg-max) {
        &.filter-list-is-target {
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            z-index: 1;
            padding: $spacing-10 $spacing-base $spacing-base;
            height: 100vh;
            width: 100%;
            background: config('colors.white');
        }
    }

    @media screen and (min-width: $mediaquery-lg) {
        position: static;
        order: initial;
        display: flex;
        flex-direction: row;
        justify-content: initial;
    }
}

.tb-results-filter__list-item {
    order: 1;

    &:not(:last-child) {
        border-bottom: 1px solid config('colors.grey-lightest');
        margin-bottom: $spacing-base;
        padding-bottom: $spacing-base;

        @media screen and (min-width: $mediaquery-lg) {
            border: 0;
            margin-bottom: 0;
            margin-right: $spacing-base;
            padding-bottom: 0;
        }
    }
}

.tb-results-filter__list-item--hidden {
    display: none;
}


@media screen and (max-width: $mediaquery-lg-max) {
    .tb-results-filter__list-item--button {
        order: 0;
        padding-left: $spacing-base;
    }
}

// Wraps each button.
.tb-filter-wrapper {
    @media screen and (max-width: 991px) {
        > .tb-button {
            font-weight: 700;
            border: 0;
            width: 100%;

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

            .tb-icon {
                font-size: $text-sm;
                top: 0;
            }

            .tb-icon--left {
                display: none;
            }

            &[aria-expanded=true] {
                position: fixed;
                top: $spacing-base;
                left: $spacing-base;
                z-index: 2;
                padding-left: 0;
                width: auto;

                .tb-icon--left {
                    display: block;
                    margin-right: $spacing-2;
                }

                .tb-icon--right {
                    display: none;
                }
            }
        }

        > .tb-button--call-to-action {
            background: transparent;
            color: config('colors.primary');

            &:hover,
            &:focus {
                background: transparent;
                color: config('colors.primary-darker');
            }
        }
    }

    @media screen and (min-width: $mediaquery-lg) {
        position: relative;

        > .tb-button {
            .tb-icon {
                display: none;
            }

            .tb-icon--calendar {
                font-size: $text-sm;
                display: inline;
            }
        }
    }
}
/* stylelint-enable */
