section.form *,
.service-template section.form * {
  color: #fff;
}

.form .container__form {
  border-radius: 5px;
  background: var(--Linear, linear-gradient(90deg, #02b973 0%, #15b2da 100%));
  padding: 40px;
  position: relative;
  h2 {
    margin-bottom: 10px;
  }
  & > p {
    font-size: 18px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    margin-bottom: 35px;
  }
  input[type="submit"] {
    border: 1px solid rgba(0, 0, 0, 0);
    background: #02b973;
    display: flex;
    padding: 16px 31px;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-style: normal;
    font-weight: 800;
    line-height: normal;
    text-transform: uppercase;
    text-align: center;
    transition: 0.3s;
  }
  .wpcf7-spinner {
    position: absolute;
    top: 20px;
    right: 0px;
  }
}

.modal-fos .form .container__form .wpcf7-spinner {
  top: auto;
  bottom: 20px;
  right: 0px;
}

.form__fields_bottom > .wpcf7-form-control-wrap {
  position: absolute;
  left: -9999px;
  opacity: 0;
}

.service-template section.form .container__form h2 {
  font-size: 32px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  letter-spacing: 1.6px;
}

.form__fields {
  display: flex;
  flex-direction: row;
  gap: 23px;
  flex-wrap: nowrap;
  margin-bottom: 24px;
}

.form__field {
  display: block;
  width: calc(100% / 3 - (23px * 2 / 3));
  min-width: calc(100% / 3 - (23px * 2 / 3));
  & > p {
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    margin-bottom: 5px;
  }
  & input {
    width: 100%;
    min-width: 100%;
    height: 50px;
    background: rgba(255, 255, 255, 0.3);
    padding: 15px 20px;
  }
  & input,
  & input::placeholder {
    opacity: 0.7;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    color: #fff;
  }
  & input:focus {
    color: #fff;
    opacity: 1;
  }
}

.form__fields_bottom {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-end;
  gap: 23px;
  flex-wrap: nowrap;
}

section.form .wpcf7-not-valid-tip {
  color: red;
}

section.form .wpcf7-not-valid-tip ~ .wpcf7-not-valid-tip {
  display: none;
}

.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.payment-required .wpcf7-response-output,
.wpcf7 form.sent .wpcf7-response-output {
  border: none;
  padding: 0;
  margin: 0;
  margin-top: 20px;
}

.wpcf7-list-item {
  margin-left: 0;
}

.form_field_comm {
  width: 631px;
  min-width: 631px;
  height: 157px;
  display: flex;
  flex-direction: column;
  & > p {
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    margin-bottom: 5px;
  }
  & > span {
    height: 132px;
  }
  & textarea {
    width: 100%;
    min-width: 100%;
    background: rgba(255, 255, 255, 0.3);
    padding: 15px 20px;
    height: 100%;
    max-height: 100%;
    resize: none;
    overflow: hidden;
  }
  & textarea,
  & textarea::placeholder {
    opacity: 0.7;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    color: #fff;
  }
  & textarea:focus {
    color: #fff;
    opacity: 1;
  }
}

.form_field_file {
  display: block;
  width: calc(100% - 631px - 23px);
  min-width: calc(100% - 631px - 23px);
  p {
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    margin-bottom: 10px;
  }
}

.input__file {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 15px;
  width: 100%;
  height: 42px;
  background: rgba(255, 255, 255, 0.3);
}

.input__file_block {
  position: relative;
  cursor: pointer;
  input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: -1;
  }
  .custom-file-btn {
    border-radius: 7px;
    border: 2px solid var(--White-Text, #fff);
    background: #efefef;
    display: flex;
    height: 42px;
    padding: 8px 8px;
    justify-content: center;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    svg {
      width: 14px;
      height: 14px;
      aspect-ratio: 1/1;
    }
    span {
      display: block;
      color: #000;
      font-size: 16px;
      font-style: normal;
      font-weight: 400;
      line-height: normal;
    }
  }
}

.input__file_text {
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 170px - 15px);
}

.form__accept {
  margin-top: 31px;
  margin-bottom: 27px;
  position: relative;
  input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: -1;
  }
  .wpcf7-list-item-label {
    padding-left: 30px;
    position: relative;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    a {
      font-weight: 600;
      transition: 0.3s;
    }
    &::before {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      width: 20px;
      height: 20px;
      aspect-ratio: 1/1;
      border: 1.3px solid #fff;
      border-radius: 2.35px;
    }
  }
  input:checked + .wpcf7-list-item-label::before {
    background: #fff;
    content: "";
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="9" viewBox="0 0 12 9" fill="none"><path d="M11.6485 2.0501L5.31801 8.38016C4.84923 8.84903 4.08879 8.84903 3.61957 8.38016L0.351719 5.11207C-0.11724 4.6432 -0.11724 3.88267 0.351719 3.41371C0.820767 2.94467 1.58115 2.94467 2.04999 3.41354L4.46904 5.83262L9.94998 0.351653C10.419 -0.117395 11.1795 -0.11704 11.6483 0.351653C12.1172 0.820612 12.1172 1.58087 11.6485 2.0501Z" fill="%2300B5DF"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00b5df;
    font-size: 14px;
    font-weight: bold;
  }
}

.modal-fos {
  display: none;
  position: fixed;
  z-index: 10000;
  inset: 0;
  align-items: center;
  justify-content: center;
}

.modal-fos._active {
  display: flex;
}

.modal-fos__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.modal-fos__content {
  background: transparent;
  max-width: fit-content;
  width: 100%;
  padding: 0 15px;
  margin: auto;
  position: relative;
  z-index: 1;
}

.modal-fos__close {
  position: absolute;
  top: 4px;
  right: 18px;
  background: transparent;
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #fff;
  transition: color 0.2s;
  z-index: 1;
}

.modal-fos .container {
  padding: 0;
}

.modal-fos .modal-fos__content > .wpcf7 {
  overflow: auto;
  max-height: 100vh;
}

@media (max-width: 1229px) {
  .form__fields_bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .form_field_comm {
    width: 100%;
  }

  .form_field_file {
    width: 100%;
    min-width: 100%;
  }
}

@media (max-width: 991px) {
  .form__fields {
    gap: 15px;
    flex-direction: column;
  }

  .form__field {
    width: 100%;
    min-width: 100%;
  }
}

@media (max-width: 767px) {
  .form .container__form .form__field > p,
  .form .container__form .form__field > input,
  .form .container__form .form__field > input::placeholder,
  .form .container__form .form_field_comm > p,
  .form .container__form .form_field_comm > textarea,
  .form .container__form .form_field_comm > textarea::placeholder,
  .form .container__form .form_field_file > p,
  .form .container__form .input__file_text,
  .input__file_block label,
  .form__accept label {
    line-height: normal;
    font-size: 14px;
  }

  .form .container__form button {
    font-size: 12px;
    line-height: normal;
    width: 100%;
  }

  .form .container__form p {
    font-size: 16px;
    line-height: normal;
  }

  .form .container__form {
    padding: 20px;
  }

  .form_field_comm {
    width: 100%;
    min-width: 100%;
  }
}

@media (max-width: 430px) {
  .modal-fos .form .container__form {
    padding-top: 35px;
  }

  .modal-fos__close {
    top: 9px;
    right: 25px;
  }
}

@media (max-width: 413px) {
  .form .container__form .form__field > p,
  .form .container__form .form__field > input,
  .form .container__form .form__field > input::placeholder,
  .form .container__form .form_field_comm > p,
  .form .container__form .form_field_comm > textarea,
  .form .container__form .form_field_comm > textarea::placeholder,
  .form .container__form .form_field_file > p,
  .form .container__form .input__file_text,
  .input__file_block label,
  .form__accept label,
  .form .container__form button {
    font-size: 12px;
  }

  .form .container__form p {
    font-size: 14px;
  }

  .input__file_block label span {
    font-size: 10px;
  }

  .input__file_text {
    max-width: calc(100% - 125px - 15px);
  }
}

@media (hover: hover) {
  .form .container__form input[type="submit"]:hover {
    border: 1px solid rgba(0, 0, 0, 0);
    background: var(--Accent, #00b5df);
  }

  .form__accept label a:hover {
    color: #fff;
  }
}
