/* will9.ru — success modal for contact form */

.form-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.form-modal[hidden] {
  display: none;
}

.form-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgb(33 33 33 / 55%);
  cursor: pointer;
}

.form-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  padding: 40px 32px 32px;
  border-radius: 8px;
  background: var(--color-grey-01);
  color: var(--color-white);
  box-sizing: border-box;
  box-shadow: 0 24px 64px rgb(0 0 0 / 35%);
}

.form-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--color-white);
  cursor: pointer;
}

.form-modal__close svg {
  width: 20px;
  height: 20px;
}

.form-modal__close:hover,
.form-modal__close:focus-visible {
  color: var(--color-orange);
}

.form-modal__close:focus-visible {
  outline: 2px solid var(--color-orange);
  outline-offset: 2px;
}

.form-modal__eyebrow {
  margin: 0 0 16px;
}

.form-modal__title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 40px;
  line-height: 1;
  color: var(--color-white);
}

.form-modal__text {
  margin: 0 0 28px;
  max-width: 36em;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-white);
}

.form-modal__btn {
  min-height: 54px;
  min-width: 160px;
}

.consent.is-error .consent__box {
  border-color: #ff8f73;
}

.field__error,
.consent__error {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 5;
  max-width: min(100%, 320px);
  margin: 0;
  padding: 8px 12px;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgb(0 0 0 / 18%);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 13px;
  line-height: 1.35;
  color: var(--color-grey-01, #212121);
  pointer-events: none;
  white-space: normal;
}

.field__error::after,
.consent__error::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 16px;
  border: 6px solid transparent;
  border-top-color: #ffffff;
}

.consent__error {
  left: 0;
  max-width: min(100%, 360px);
}

.footer-form__error {
  margin-top: 12px;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.35;
  color: #ff8f73;
}

.footer-form__fields.is-loading {
  opacity: 0.72;
  pointer-events: none;
}

.btn--form-submit[disabled] {
  opacity: 0.7;
  cursor: wait;
}

@media (max-width: 767px) {
  .form-modal {
    padding: 16px;
    align-items: flex-end;
  }

  .form-modal__dialog {
    width: 100%;
    padding: 28px 20px 24px;
  }

  .form-modal__title {
    font-size: 28px;
  }

  .form-modal__btn {
    width: 100%;
  }
}
