.filter-projects {
  position: absolute;
  z-index: 10;
  bottom: 0px;
  left: 110px;
  opacity: 0;
  transition: opacity 300ms ease-in;
  pointer-events: none;

  &.js-box-hover {
    .filter-projects__search-icon svg path {
      fill: $white;
    }
    .filter-projects__wrapper {
      background-color: $secondary-color;
    }
  }

  @include sm {
    width: 59px;
    bottom: unset;
    left: unset;
    top: 60px;
    right: 20px;
    opacity: 1;
    transition: 0.3s all;
    pointer-events: all;
  }

  .js-filter-open & {
    opacity: 1;
    pointer-events: all;

    @include sm {
      width: calc(100vw - 120px);
    }

    @include xs {
      width: calc(100vw - 40px);
    }
  }

  &__wrapper {
    width: 440px;
    height: 55px;
    min-height: 55px;
    background-color: transparent;
    border: 1px solid $secondary-color;
    border-radius: 4px;
    padding: 19px 33px 22px 50px;
    overflow: hidden;
    transition: 0.3s all;

    @include sm {
      background-color: $secondary-color;
      height: 59px;
      min-height: 0;
      padding: 0px;
      width: 59px;
      border-radius: 100%;
      -webkit-box-shadow: 0px 0px 3px 0px rgba(0,0,0,0.4);
      box-shadow: 0px 0px 3px 0px rgba(0,0,0,0.4);
    }

    .js-filter-open & {
      background-color: $secondary-color;
      min-height: 375px;

      @include sm {
        width: 100%;
        padding: 22px 33px 22px 50px;
        border-radius: 0;
      }
    }
  }

  &__open-box {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    cursor: pointer;

    .js-filter-open & {
      display: none;
    }
  }

  &__search-icon {
    position: absolute;
    width: 22px;
    height: 22px;
    top: 17px;
    left: 90px;
    cursor: pointer;
    transition: 0.3s opacity;
    opacity: 1;

    @include sm {
      display: none;
    }

    svg path {
      fill: $secondary-color;
      transition: 0.2s fill;
    }

    .js-filter-open & {
      opacity: 0;
      pointer-events: none;
    }

    &:hover {
      svg path {
        fill: $primary-color;
      }
    }
  }

  &__close {
    position: absolute;
    top: 19px;
    left: 15px;
    width: 22px;
    height: 22px;
    opacity: 0;
    cursor: pointer;
    transition: 1s opacity;
    pointer-events: none;

    .js-filter-open & {
      opacity: 1;
      pointer-events:unset
    }

    @include sm {
      transition: 0.1s opacity;
    }

    &::after, &::before {
      content: " ";
      width: 10px;
      height: 10px;
      display: inline-block;
      transform: rotate(45deg);
      position: absolute;
      top: 6px;
    }

    &::after {
      border-right: 2px solid $primary-color;
      border-top: 2px solid $primary-color;
      left: 0;
    }

    &::before {
      border-left: 2px solid $primary-color;
      border-bottom: 2px solid $primary-color;
      right: 0;
    }

  }

  &__container {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    @include sm {
      opacity: 0;
      transition: 0.2s opacity;

      .js-filter-open & {
        opacity: 1;
      }
    }
  }

  &__filter-message {
    color: $secondary-color;
    font-size: 18px;
    line-height: 18px;
    font-weight: 700;
    text-align: center;
    transition: 0.2s color;

    .js-filter-open & {
      color: $primary-color;
    }
  }

  &__input-form {
    width: 100%;
    position: relative;
    margin-top: 18px;
    overflow: hidden;

    input {
      width: 100%;
      height: 50px;
      border-radius: 6px;
      box-sizing: border-box;
      padding: 0 16px;
    }

    .tagify {
      background-color: $white;
      border: 0;
      border-radius: 6px;
      box-sizing: border-box;
      width: 100%;
      min-height: 50px;
      display: flex;
      align-items: center;
      padding: 0 4px;
    }
    .filter-projects__custom-look {
      --tag-bg: #{$primary-color};
      --tag-hover: #{$secondary-color};
      --tag-text-color: #{$white};
      --tag-remove-bg: #{$secondary-color};
      --tag-remove-btn-color: #{$white};
      --tag-pad: 9px 10px 10px;
      --tag-inset-shadow-size: 24px;

      .tagify__tag__removeBtn {
        margin-right: 8.666667px;
      }

      .tagify__input {
        padding: 12px 10px 7px;
      }
    }
    .tagify__tag > div {
      border-radius: 6px;
      font-size: 14px;
    }
  }

  &__filter-icon {
    width: 59px;
    height: 59px;
    z-index: 0;
    position: absolute;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s opacity;

    @include sm {
      opacity: 1;
      position: relative;
    }

    .js-filter-open & {
      opacity: 0;
      position: absolute;
    }
  }

  &__icon-search {
    position: absolute;
    width: 22px;
    height: 22px;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);

    svg path {
      fill: $primary-color;
    }
  }

  &__search {
    padding: 0 16px 0 40px !important;
    color: $white;
    background-color: $background-input;
    &::placeholder {
      color: $primary-color;
    }
  }

  &__project-list {
    color: $primary-color;
    font-size: 12px;
    line-height: 12px;
    padding-top: 25px;
    display: flex;
    align-items: center;

    svg {
      margin-top: -2px;
      margin-right: 4px;
    }
  }
}

