.seo-amo-modal[hidden] {
  display: none !important;
}

.seo-amo-modal {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 2147483000;
}

.seo-amo-modal__backdrop {
  background: rgba(8, 15, 30, 0.76);
  inset: 0;
  position: absolute;
}

.seo-amo-modal__dialog {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
  max-height: calc(100vh - 48px);
  max-width: 940px;
  overflow: auto;
  padding: 30px 28px 22px;
  position: relative;
  width: min(100%, 940px);
  z-index: 1;
}

.seo-amo-modal__close {
  align-items: center;
  background: #eef1f5;
  border: 0;
  border-radius: 999px;
  color: #1e293b;
  cursor: pointer;
  display: flex;
  font: 400 30px/1 Arial, sans-serif;
  height: 38px;
  justify-content: center;
  padding: 0 0 3px;
  position: absolute;
  right: 16px;
  top: 16px;
  width: 38px;
}

/* Заголовок только для скринридеров: форма amoCRM несёт свой видимый заголовок,
   визуальный дубль убран (2026-07-23) */
.seo-amo-modal__title {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  margin: 0;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.seo-amo-modal__mount {
  min-height: 390px;
  position: relative;
}

.seo-amo-modal__public-frame {
  background: #f4f6f8;
  border: 0;
  display: block;
  height: 844px;
  width: 100%;
}

.seo-amo-modal__loading,
.seo-amo-modal__fallback,
.seo-amo-modal__privacy {
  color: #5f6b7a;
  font-size: 13px;
  line-height: 1.45;
}

.seo-amo-modal__privacy {
  margin: 10px 0 0;
  text-align: center;
}

.seo-amo-modal-open,
.seo-amo-modal-open body {
  overflow: hidden !important;
}

.seo-amo-cta {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
  min-height: 96px;
  text-align: center;
}

.seo-amo-cta__text {
  color: inherit;
  font-size: 15px;
  line-height: 1.4;
  margin: 0;
  max-width: 440px;
}

.seo-amo-cta__button {
  background: #315efb;
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font: 600 16px/1.2 Arial, sans-serif;
  padding: 14px 24px;
}

@media (max-width: 640px) {
  .seo-amo-modal {
    padding: 0;
  }

  .seo-amo-modal__dialog {
    border-radius: 0;
    height: 100vh;
    max-height: 100vh;
    max-width: none;
    padding: 0;
    width: 100%;
  }

  .seo-amo-modal__title {
    display: none;
  }

  .seo-amo-modal__close {
    position: fixed;
    z-index: 2;
  }

  .seo-amo-modal__mount {
    min-height: 844px;
  }

  .seo-amo-modal__loading {
    margin: 80px 24px;
  }

  .seo-amo-modal__privacy {
    margin: 0;
    padding: 12px 16px 20px;
  }
}

/* Заглушка формы: центрирование в высоком контейнере (2026-07-16) */
form[data-seo-amo-converted="1"]{display:flex;height:100%;margin:0}
form[data-seo-amo-converted="1"] .seo-amo-cta{flex:1}



/* ── Своя форма в стиле сайта (2026-07-29) ───────────────────────────── */
.seo-amo-form { box-sizing: border-box; width: 100%; }
.seo-amo-form * { box-sizing: border-box; }

.seo-amo-form__sink {
  border: 0; height: 0; position: absolute; visibility: hidden; width: 0;
}

.seo-amo-form__body { display: grid; gap: 14px; margin: 0; }

.seo-amo-form__input {
  -webkit-appearance: none;
  appearance: none;
  background: #fff;
  border: 1px solid #d7dfef;
  border-radius: 28px;
  color: #1c2536;
  font: 400 16px/1.4 inherit;
  min-height: 54px;
  padding: 14px 24px;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}

.seo-amo-form__input::placeholder { color: #9aa5b6; }
.seo-amo-form__input:hover { border-color: #b9c6dd; }

.seo-amo-form__input:focus {
  border-color: #315efb;
  box-shadow: 0 0 0 3px rgba(49, 94, 251, .14);
  outline: none;
}

.seo-amo-form__submit {
  background: #2f60c4;
  border: 0;
  border-radius: 28px;
  color: #fff;
  cursor: pointer;
  font: 500 17px/1.2 inherit;
  min-height: 54px;
  padding: 15px 22px;
  transition: background .15s;
  width: 100%;
}

.seo-amo-form__submit:hover { background: #24509f; }
.seo-amo-form__submit:disabled { background: #9db3f7; cursor: default; }

.seo-amo-form__agree {
  align-items: flex-start;
  color: #4a72c4;
  cursor: pointer;
  display: flex;
  font-size: 13px;
  gap: 8px;
  line-height: 1.4;
  margin: 2px 0 0;
  text-align: left;
}

.seo-amo-form__agree input {
  accent-color: #2f60c4;
  flex: 0 0 auto;
  height: 15px;
  margin: 2px 0 0;
  width: 15px;
}

.seo-amo-form__agree a { color: inherit; }

.seo-amo-form__error {
  background: #fdeceb;
  border-radius: 12px;
  color: #b3261e;
  font-size: 14px;
  line-height: 1.45;
  margin: 0;
  padding: 10px 16px;
  text-align: left;
}

.seo-amo-form__error a { color: inherit; }

.seo-amo-form__done { padding: 26px 8px; text-align: center; }

.seo-amo-form__done-mark {
  align-items: center;
  background: #e8f5ec;
  border-radius: 50%;
  color: #1f9254;
  display: flex;
  height: 54px;
  justify-content: center;
  margin: 0 auto 14px;
  width: 54px;
}

.seo-amo-form__done-title {
  color: #1c2536; font-size: 19px; font-weight: 700; margin: 0 0 6px;
}

.seo-amo-form__done-text { color: #5f6b7a; font-size: 15px; margin: 0; }

/* Форма встала на место мёртвой: снимаем позиционирование заглушки */
form[data-seo-amo-inline="1"] {
  display: block; height: auto; margin: 0; padding: 0; position: static;
}

.seo-amo-modal__mount { min-height: 0; }

@media (max-width: 640px) {
  .seo-amo-form__input { font-size: 16px; min-height: 50px; padding: 13px 20px; }
  .seo-amo-form__submit { min-height: 50px; font-size: 16px; }
}
