.footer-wrap{
  padding-top: 50px;
}

.footer{
  width: 100%;
  height: 50px;
  background: #fff;
  padding: 10px 0;
  box-shadow: -10px 9px 21px 13px rgba(128, 152, 213, 0.15);
  position: fixed;
  bottom: 0;
  right: 0;
  z-index: 10;

  &__btn{
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;

    .split-btn_up{margin-top: -4px;}
  }

  &__link{
    @include font(normal, 600, rem(14px), 1.57, $color-dark-purple);
    cursor: pointer;
  }

  &__link:hover{
    color: $color-dark-purple;
    text-decoration: underline;
  }

  &__btn-big{
    position: relative;

    .btn{
      vertical-align: middle;
      min-width: 134px;
      font-weight: 600;
      padding: 0 20px;
    }

    .footer-popup{
      position: absolute;
      bottom: calc(100% + 76px);
      right: 172px;
    }

    .split-btn{min-width: 125px;}

    .tooltip{
      display: none;
      width: 250px;
      position: absolute;
      bottom: 100%;
      left: 50%;
      transform: translateX(-50%);
      margin: 0 0 8px;
      z-index: 10;

      &::after{
        left: 0;
        right: 0;
        margin: 0 auto;
      }
    }
  }

  &__btn-large{
    position: relative;

    .btn{
      vertical-align: middle;
      min-width: 200px;
      font-weight: 600;
      padding: 0 20px;
    }

    .btn_border{min-width: 134px;}

    .footer-popup{
      position: absolute;
      bottom: calc(100% + 76px);
      right: 172px;
    }

    .split-btn{min-width: 125px;}

    .tooltip{
      display: none;
      width: 250px;
      position: absolute;
      bottom: 100%;
      left: 50%;
      transform: translateX(-50%);
      margin: 0 0 8px;
      z-index: 10;

      &::after{
        left: 0;
        right: 0;
        margin: 0 auto;
      }
    }
  }

  &__btn-big &__link{margin-right: 20px;}
  &__btn-big:hover .tooltip{display: inline-block;}
  &__btn-big_padding .btn{padding: 0 40px;}

  &_static{
    position: static;
  }

  .split-btn{
    &__popup{
      left: auto;
      right: 0;
    }
  }
}

.footer-cohort{
  display: inline-flex;
  vertical-align: middle;
  align-items: center;
  position: absolute;
  color: $color-dark-grey;
  text-decoration: none;
  transform: translateY(-50%) translateX(-50%);
  left: 50%;
  top: 50%;

  &__icon{
    margin-right: 6px;
    position: relative;
    cursor: pointer;

    .icon{
      display: inline-block;
      vertical-align: middle;
      width: 19px;
      height: 19px;
      margin-top: -3px;
    }

    .ic-cohort{
      width: 31px;
      height: 28px;
    }

    .tooltip{
      display: none;
      width: 245px;
      position: absolute;
      bottom: 100%;
      left: 0;
      margin: 0 0 10px 0;
    }

    .tooltip_right{
      width: auto;
      bottom: auto;
      @include top-center;
      left: auto;
      right: 100%;
      margin: 0 10px 0 0;
      white-space: nowrap;
    }
  }

  &__num{
    font-size: rem(14px);
    font-weight: 600;
  }

  &__num_grey{color: $color-light-grey;}

  &__num_line{position: relative;}

  &__num_line::after{
    content: '';
    display: inline-block;
    width: 100%;
    height: 1px;
    border-bottom: 1px dashed $color-light-red;
    position: absolute;
    bottom: 0;
    right: 0;
  }

  &__icon_blue .icon{fill: $color-blue;}

  &__icon:hover .tooltip{display: inline-block;}

  &__text{
    max-width: calc(100% - 36px);
    @include font(normal, normal, rem(13px), 1.57, $color-dark-grey);
    white-space: nowrap;

    b{font-weight: 600;}
  }

  &__info{
    display: inline-block;
    vertical-align: middle;
    position: relative;
    margin-left: 5px;
  }

  .ic-help,
  .ic-info{
    display: inline-block;
    vertical-align: middle;
    width: 16px;
    height: 17px;
    margin-top: -3px;
  }

  .ic-business-warning{
    display: inline-block;
    vertical-align: middle;
    width: 18px;
    height: 18px;
    margin-top: -3px;
  }

  .info-popup{
    display: none;
    width: 360px;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
  }

  &__info:hover .info-popup{display: inline-block;}

  &_blue{
    .footer-cohort{
      &__text{
        color: $color-blue;
        font-size: 14px;
      }

      &__icon{
        .icon{fill: $color-blue;}
      }
    }
  }

  &__time{
    @include font(normal, normal, rem(13px), 1.57, $color-dark-grey);
    margin-left: 8px;
    padding-left: 8px;
    border-left: 1px solid #979797;
  }

  &__time_line{
    position: relative;
  }

  &__time_line::after{
    content: '';
    display: inline-block;
    width: calc(100% - 8px);
    height: 1px;
    border-bottom: 1px dashed $color-light-red;
    position: absolute;
    bottom: 0;
    right: 0;
  }

  &__error{
    position: relative;
    margin-left: 4px;

    .ic-failure{
      width: 19px;
      height: 16px;
    }

    .tooltip{
      display: none;
      width: 250px;
      margin-left: 0;
      margin-right: 0;
      position: absolute;
      bottom: 100%;
      left: -5px;
    }
  }

  &__error:hover .tooltip{display: inline-block;}
}

.footer-popup{
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 347px;
  padding: 16px;
  border-radius: 7px;
  background-color: rgba(172, 178, 195, 0.1);
  position: relative;

  &::after{
    content: '';
    display: inline-block;
    width: 140px;
    height: 94px;
    background: url(/assets/img/spiral-arrow.svg) no-repeat center;
    background-size: contain;
    margin-left: -8px;
    position: absolute;
    top: 33px;
    left: 100%;
  }

  &__close{
    width: 18px;
    margin-right: 12px;

    .icon{
      vertical-align: middle;
      width: 18px;
      height: 18px;
    }
  }

  &__text{
    width: calc(100% - 30px);
    @include font(normal, normal, rem(14px), 1.45, $color-dark-blue);
  }

  &_small{
    width: auto;
    white-space: nowrap;
    padding: 12px 16px 14px;
  }

  &_small::after{top: 16px;}
}

.footer-cohort-msg{
  .notice-msg{
    &__btn{
      .btn_small,
      button.btn_small,
      input[type="submit"].btn_small{
        min-width: 165px;
        padding: 0 20px;
      }
    }

    &__text .notice-msg__accent{color: $color-dark-grey;}
  }
}

@media (max-width: 1199px) {
  .footer-cohort{
    position: static;
    transform: none;
    margin: 5px 15px;
  }
}
