@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.form {
  margin: em(50px) 0;
  opacity: 1;
  transition: opacity 0.2s ease-in-out;
  position: relative;
  z-index: 1;
  .section__text {
    margin: 0;
  }
  & + .section__title {
    margin-top: em(-75px);
  }
}

*.loading {
  pointer-events: none;
  opacity: 0.4;
  transition: opacity 0.2s ease-in-out;
  &:before {
    content: '';
    position: absolute;
    top: 40%;
    left: 50%;
    width: em(70px);
    height: em(70px);
    margin-top: em(-35px);
    margin-left: em(-35px);
    border: em(3px) solid;
    border-color: $green transparent transparent transparent;
    border-radius: 50%;
    animation: rotate 1s infinite;
    z-index: 100;
  }
}

.form__submit {
  text-align: right;
}

.button {
  display: inline-block;
  height: em(45px);
  line-height: em(44px);
  border: none;
  -webkit-appearance: none;
  text-align: center;
  font-size: em(16px);
  text-transform: uppercase;
  background: $green;
  border-radius: 0;
  color: $white;
  font-weight: 900;
  cursor: pointer;
  letter-spacing: 0.02em;
  position: relative;
  overflow: hidden;
  span {
    transition: transform 0.4s $easeOutQuart;
  }
  &:hover {
    .button__icon {
      transform: none;
    }
    .button__text {
      transform: translateX(100%);
    }
  }
}

.button__icon {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: translateX(-100%);
  svg {
    display: inline-block;
    height: em(21px);
    width: em(36px);
    fill: $white;
    margin: em(12px) 0;
  }
}

.button__text {
  display: inline-block;
  transform: none;
  padding: 0 em(30px);
  min-width: em(200px);
}

.form__field {
  width: 100%;
  display: block;
  margin-bottom: em(15px);
}

input, textarea {
  width: 100%;
  height: em(45px);
  font-size: em(16px);
  font-weight: 900;
  font-family: $default_font_family;
  color: darken($dark_gray, 20);
  background: lighten($light_gray, 2);
  text-indent: em(14px);
  border: none;
  transition: background 0.2s ease-in-out;
  -webkit-appearance: none;
  border-radius: 0;
  padding-right: em(5px);
  &::placeholder {
    color: $gray;
  }
  &::-webkit-input-placeholder {
    color: $gray;
  }
  &::-moz-placeholder {
    color: $gray;
  }
  &:-ms-input-placeholder {
    color: $gray;
  }
  &:-moz-placeholder {
    color: $gray;
  }
  &:focus {
    background: $light_gray;
    outline: none;
  }
}

textarea {
  height: em(150px);
  text-indent: 0;
  padding: em(12px) em(14px);
  resize: vertical;
  min-height: em(100px);
}

.form__field__help_text {
  margin-top: em(5px);
  display: block;
  width: 100%;
  font-size: em(16px);
  font-weight: 300;
  color: $dark_gray;
}

.form__success, .form__errors, .form__field__errors {
  display: block;
  width: 100%;
  font-size: em(16px);
  font-weight: 700;
  line-height: 1.5;
}

.form__errors, .form__field__errors {
  color: $red;
}

.form__errors {
  margin-bottom: em(30px);
}

.form__field__errors {
  margin-top: em(7px);
}