/*-------------- modal-window -----------------*/
.modal-window-wrap{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  overflow-y: auto;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 110;

  .modal-window{
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    transform: none;
  }
}

.modal-window{
  display: block;
  width: 540px;
  min-height: 330px;
  max-height: 90%;
  //overflow-y: auto;
  background: #fff;
  border-top: 5px solid $color-purple;
  border-radius: 4px;
  padding: 20px 25px;
  position: fixed;
  @include top-center;
  left: 0;
  right: 0;
  margin: 0 auto;
  z-index: 110;

  &.scroll{overflow-y: auto;}

  &.scroll .form-site{padding-bottom: 20px;}

  &__head{
    @include font(normal, normal, rem(20px), 1.25, $color-dark-grey);
    text-transform: uppercase;
    padding-right: 40px;
    margin-bottom: 20px;
  }

  &__head-label {
    font-size: 0.875rem;
    line-height: 1.2;
    text-transform: none;
  }

  &__head-label:before {
    content: "";
    display: inline-block;
    width: 1px;
    height: 16px;
    background: #acb2c3;
    margin-left: 10px;
    margin-right: 10px;
  }

  &__text{
    @include font(normal, normal, rem(14px), 1.25, $color-dark-grey);
    margin-top: -10px;
    margin-bottom: 25px;
  }

  &__close{
    display: inline-block;
    width: 16px;
    height: 16px;
    position: absolute;
    top: 22px;
    right: 24px;
    cursor: pointer;
  }

  &__close .icon{
    position: absolute;
    @include top-center;
    left: 0;
    right: 0;
    margin: 0 auto;
  }

  .select-filter{
    width: 100%;
    padding-top: 0;

    &__content{
      padding: 12px 0;
      border-radius: 0;
      border-top: 0;
      padding-top: 11px;
      margin-top: 0;
      min-height: 0;
    }

    &__top{border-bottom: 1px solid $color-light-grey;}

    .input-check__label{vertical-align: top;}

    &__top,
    &__params{
      padding-left: 15px;
      padding-right: 15px;
      margin-left: 0;
    }

    &__params{
      padding-top: 15px;
      margin-top: 0;
    }

    &__btn{
      margin-left: 0;
      margin-right: 0;
      padding: 15px;
      margin-bottom: -12px;
    }
  }

    .add-filter > perfect-scrollbar{
      width: calc(100% + 15px);
      max-width: calc(100% + 15px);
      margin-right: -15px;
      padding-right: 15px;
    }
}

.new-file-modal-form{
  .form-site{
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    &__fields{min-height: 339px;}
  }
}


.new-perm-templ{
  .form-site{
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    &__fields{min-height: 418px;}
  }
}

.new-env-modal{
  margin-top: 26px;

  .form-site{
    min-height: 235px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    &__label{margin-bottom: 9px;}
    &__label + .img-upload{margin-top: -5px;}
    &__note{margin-top: -6px; margin-bottom: 8px;}
    &__item{margin-bottom: 27px;}
    &__item:last-child{margin-bottom: 0;}
    &__btn{margin-top: 40px;}
  }
}

@media (max-width: 767px) {
  .mobile-modal-window{
    .modal-window{
      width: 100%;
      max-height: 100%;
      overflow: visible;
      position: static;
      transform: none;
      box-shadow: 0 2px 4px 0 #dbe4f9;
      padding: 17px;

      &__head{
        font-size: rem(18px);
        margin-bottom: 27px;
      }

      &__close{
        width: 18px;
        height: 18px;
        top: 25px;
        right: 30px;
      }
    }
  }
}
