.filter-list {
  &__container {
    display: block;

    @include media-breakpoint-up(sm) {
      border: 1px solid #dedede;
      display: flex;
      margin: 0;
      height: auto;

      > * .dropdown-content__label:after {
        content: "";
        position: absolute;
        top: 0px;
        right: 6px;
        transform: translateY(9px);
        width: 5px;
        border: 1px solid #fff;
        height: 28px;
        border-radius: 10px;
        background-color: #fff;
      }
    }

    .dropdown-content {
      width: 100%;
      padding-bottom: 18px;

      @include media-breakpoint-up(sm) {
        width: 16.66%;
      }

      &:last-child .dropdown-content__label:after {
        display: none;
      }

      &__label {
        font-size: 18px;
        font-weight: 400;
        margin: 10px 0px 5px;

        @include media-breakpoint-up(sm) {
          background-color: #dedede;
          width: 100%;
          padding: 10px 20px;
          font-weight: 500;
          position: relative;
          margin: 0;

          &:after {
            content: "";
            position: absolute;
            top: 0px;
            right: 6px;
            transform: translateY(9px);
            width: 5px;
            border: 1px solid #fff;
            height: 28px;
            border-radius: 10px;
            background-color: #fff;
          }
        }

        label {
          margin-bottom: 0;
        }
      }

      &__list {
        .dropdown-toggle {
          width: 100%;
          height: 40px;
          text-align: left;
          font-size: 16px;
          border: 1px solid #dedede;
          padding: 0px 15px;

          &:after {
            float: right;
            position: absolute;
            right: 15px;
            transform: translateY(10px);
            border-top: 0.4em solid;
          }
        }

        .dropdown-menu {
          width: 100%;
          position: relative !important;
          transform: none !important;

          @include media-breakpoint-up(sm) {
            position: relative !important;
            display: block;
            height: 200px;
            overflow: auto;
            list-style-type: none;
            padding-left: 5px;
            font-weight: 500;
            border: none;
            transform: none !important;
          }

          li {
            padding-left: 15px;

            &.active {
              background-color: #dedede;
            }

            &:hover {
              background-color: #dedede;
            }

            @include media-breakpoint-up(sm) {
              padding: 0px 15px;
              cursor: pointer;

              &:not(:last-child) {
                margin-bottom: 8px;
              }
            }
          }
        }
      }
    }
  }
}

// Filter
.filter {
  $self: &;
  $breakpoint: "sm";
  background: #fff;
  height: 100%;
  overflow: auto;
  position: fixed;
  left: 0;
  top: 0;
  transform: translateX(-100%);
  transition: 0.25s ease-in-out;
  width: $header-gap;
  z-index: 99;

  @include media-breakpoint-up($breakpoint) {
    position: relative;
    top: auto;
    transform: none;
    transition: none;
    z-index: 1;
    width: 100%;
  }

  &__container {
    display: flex;
    flex-direction: column;
    @include media-breakpoint-up($breakpoint) {
      border: $border;
    }
  }

  &__filterables {
    overflow: auto;
  }

  &__item {
    padding: 18px 20px 4px 20px;
    border-bottom: $border;
    &:last-child {
      border-bottom: none;
    }
  }

  &.is-active {
    transform: translateX(0);

    & ~ #{$self}__overlay {
      display: block;
    }
  }

  &__overlay {
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    height: 100%;
    left: 0;
    position: fixed;
    right: 0;
    top: 0;
    width: 100%;
    z-index: 98;

    @include media-breakpoint-up(sm) {
      display: none !important;
    }
  }

  &__selects {
    padding: 20px 20px 0 20px;
    @include media-breakpoint-up($breakpoint) {
      padding: 0;
    }
  }

  &__title {
    margin-bottom: 8px;
  }
  .form-group {
    margin-bottom: 10px;
  }
  &__more {
    color: #0099ff;
    text-align: center;
    margin-bottom: 0;
    padding-bottom: 9px;
    display: block;
    span {
      &:nth-child(2) {
        display: none;
      }
    }
    &[aria-expanded="true"] {
      span {
        &:nth-child(1) {
          display: none;
        }
        &:nth-child(2) {
          display: block;
        }
      }
    }
  }

  &__actions {
    max-height: 52px;
    height: 100%;
    border-color: $border-color;
    background-color: white;
    border: {
      left: 0;
      bottom: 0;
      right: 0;
    }
    font-size: $body-font-size;
    display: block;
    @include media-breakpoint-up($breakpoint) {
      height: 52px;
    }
  }

  .rating-stars {
    transform: translateY(-2px);
    &__container {
      @include media-breakpoint-up($breakpoint) {
        width: 100px;
      }
    }
    &__count {
      font-size: 16px;
      padding-top: 4px;
      margin-left: 5px;
    }
  }

  .select-custom {
    &__view {
      padding-left: 20px;
      border-radius: 0;
      &:after,
      &:before {
        border: {
          right: 5px solid transparent;
          left: 5px solid transparent;
        }
      }
    }
    &__list {
      li {
        padding-left: 20px;
      }
    }
  }
}

.filter-catalog {
  $breakpoint: "sm";
  &__footer,
  &__header {
    @include media-breakpoint-up($breakpoint) {
      padding-left: 20px;
    }
    .select,
    .select select {
      height: 25px;
      line-height: 25px;
    }
    .select {
      .select,
      .form-control {
        padding: 0 24px 0 10px;
        @include media-breakpoint-up($breakpoint) {
          padding: 0 44px 0 10px;
        }
      }
      &--arrow-opposite {
        &:before {
          top: 30%;
        }
        &:after {
          top: 68%;
        }
      }
    }
  }
  &__header {
    .select {
      label {
        display: none;
        @include media-breakpoint-up($breakpoint) {
          display: inline-block;
        }
      }
      select {
        @include media-breakpoint-down(xs) {
          height: 32px;
        }
      }
      &--arrow-opposite {
        @include media-breakpoint-down($breakpoint) {
          &:before {
            top: 43%;
          }
          &:after {
            top: 80%;
          }
        }
      }
    }
  }
}
