/* TODO: Поправить отступы в соответствии с общими стилями проекта */
.s_form_question {
  padding: 40px 0;
}

.form_question {
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 100%;
  background-size: cover;
  border-radius: 32px;
  height: 587px;
  padding: 40px;
  background: #8D31F9 url(images/i1.png) no-repeat right;
}

.form_question__title_box {
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: white;
  @media screen and (width <= 780px) {
    color: black;
  }

  > h2 {
    font-weight: 500;
    font-size: clamp(24px, 3vw, 42px);
    line-height: 100%;
    letter-spacing: -0.03rem;
  }

  .form_question__sub_title {
    font-weight: 400;
    letter-spacing: 0;
    font-size: clamp(14px, 3vw, 16px);
    line-height: 150%;
  }
}

.s_form_question form {
  display: flex;
  width: 100%;
  max-width: 530px;
  min-width: 300px;
  flex-flow: row wrap;
  gap: 15px;

  .form_item {
    position: relative;
    @media screen and (width <= 680px) {
      width: 100%;
    }

    > textarea {
      width: 100%;
      max-width: 100%;
      min-width: 100%;
      border-radius: 12px;
      min-height: 182px;
      max-height: 182px;
      height: auto;
      display: block;
    }

    > input {
      padding: 20px;
      border-radius: 12px;
    }
  }
}

.form_input {
  max-width: 240px;
  width: 100%;
  padding: 20px 16px;
  border-radius: 12px;
  background: white;
  font-size: clamp(14px, 3vw, 16px);
  max-height: 60px;
}

.form_label {
  position: absolute;
  pointer-events: none;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: clamp(14px, 3vw, 16px);
  color: var(--grey-AF);
  white-space: nowrap;
  overflow: hidden;
  transition: .4s;
  display: inline-block;
}

.form_item .form_input:focus ~ .form_label {
  top: 11px;
  transform: unset;
  font-size: 12px;
}

.form_item .form_input:not(:focus):valid ~ .form_label {
  top: 11px;
  transform: unset;
  font-size: 12px;
}

.form_item .form_input:focus {
  padding: 30px 20px 20px;
}

.form_item .form_input:not(:focus):valid {
  padding: 30px 20px 11px;
}

label.form_label[for=MESSAGE] {
  top: 30px;
  color: black;
}


@media (max-width: 820px) {
  .s_form_question form {
    flex-direction: column;
    align-items: unset;
    gap: 8px;
  }

  .form_question__title_box {
    gap: 14px;
  }
}

@media (max-width: 768px) {
  .s_form_question {
    padding: 20px 0;
  }
}

@media (max-width: 550px) {
  .form_input {
    max-width: unset;
    padding: 18px 16px;
    max-height: 54px;
  }

  .form_item .form_input:focus ~ .form_label {
    top: 9px;
  }
  .form_item .form_input:not(:focus):valid ~ .form_label {
    top: 9px;
  }
  .form_item .form_input:focus {
    padding: 28px 20px 20px;
  }
  .form_item .form_input:not(:focus):valid {
    padding: 28px 20px 9px;
  }

  .form_question {
    background-size: cover;
    background: url(images/i2.png) no-repeat center;
    gap: 24px;
    padding: 50px 10px;
    border-radius: 24px;
    height:auto;
    background-size: cover;
  }

  .form_question__sub_title {
    max-width: 235px;
  }
}

.form_btn {
  display: flex;
  align-items: center;
  gap: 15px;
  @media screen and (width <= 780px){
    flex-flow: row wrap;
    width: 100%;
  }
  .btn4 {
    width: 100%;
    @media screen and (width <= 780px){
      color: black;
      border: 1px solid;
    }
  }

  .form_question__check {
    font-size: 12px;
    color: var(--grey-AF);

    > a {
      color: var(--grey-AF);
    }
  }
}
