/* Форма заявки neurounit.ai в теме Creovio: модальное окно #nu-lead и форма обратного звонка [nu_foot_form].
   Цвета из темы: акцент var(--theme-color1), тёмные поля как у форм темы. Шрифт наследуется от темы. */

.nu-lead-overlay,
.nu-foot,
.nu-iti {
  --nu-accent: var(--theme-color1, #bcea3e);
  --nu-accent-rgb: var(--theme-color1-rgb, 188, 234, 62);
  --nu-on-accent: var(--theme-color1-text-color, #151515);
  --nu-field: var(--form_control_common_bg, rgba(39, 39, 39, .5));
  --nu-line: var(--form_control_common_border, rgba(81, 81, 81, .5));
  --nu-text: #fff;
  --nu-muted: rgba(255, 255, 255, .6);
  --nu-err: #ff8f8f;
  /* intl-tel-input на тёмном фоне */
  --iti-icon-color: rgba(255, 255, 255, .55);
  --iti-hover-color: rgba(255, 255, 255, .06);
  --iti-border-color: rgba(255, 255, 255, .1);
  --iti-country-selector-bg: #141514;
}

/* ---------- окно ---------- */

html.nu-lead-lock {
  overflow: hidden !important;
  scrollbar-gutter: stable;
}

.nu-lead-overlay {
  position: fixed;
  inset: 0;
  z-index: 100050;
  display: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px 16px;
  background: rgba(3, 4, 3, .72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--nu-text);
  line-height: 1.5;
}

.nu-lead-overlay.open {
  display: flex;
  animation: nu-lead-fade .2s ease-out;
}

.nu-lead-card {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 460px;
  margin: auto;
  padding: 40px 32px 32px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 24px;
  background:
    radial-gradient(120% 55% at 100% 0%, rgba(var(--nu-accent-rgb), .1), transparent 60%),
    var(--theme-color4, #0d0d0d);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .85);
  outline: none;
}

.nu-lead-overlay.open .nu-lead-card {
  animation: nu-lead-rise .28s cubic-bezier(.2, .8, .2, 1);
}

.nu-lead-overlay .nu-lead-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  color: rgba(255, 255, 255, .7);
  font-family: inherit;
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  transition: background-color .2s, color .2s;
}

.nu-lead-overlay .nu-lead-close:hover,
.nu-lead-overlay .nu-lead-close:focus-visible {
  background: rgba(255, 255, 255, .12);
  color: #fff;
}

.nu-lead-title {
  padding-right: 40px;
  font-family: var(--heading-font-family, inherit);
  font-size: 30px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.01em;
  color: var(--headings-color, #fff);
}

.nu-lead-sub {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--nu-muted);
}

.nu-lead-overlay .nu-lead-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 24px 0 0;
}

/* ---------- поля: окно и подвал ---------- */

.nu-lead-overlay .nu-lead-field,
.nu-foot .nu-foot-phone {
  box-sizing: border-box;
  width: 100%;
  height: 52px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid var(--nu-line);
  border-radius: 14px;
  background: var(--nu-field);
  box-shadow: none;
  color: var(--nu-text);
  font-family: inherit;
  font-size: 16px; /* меньше 16px iOS увеличивает страницу при фокусе */
  font-weight: 400;
  line-height: 1.4;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.nu-lead-overlay textarea.nu-lead-field {
  height: auto;
  min-height: 88px;
  padding: 13px 16px;
  resize: vertical;
}

.nu-lead-overlay .nu-lead-field::placeholder,
.nu-foot .nu-foot-phone::placeholder {
  color: rgba(255, 255, 255, .4);
  opacity: 1;
}

.nu-lead-overlay .nu-lead-field:focus,
.nu-foot .nu-foot-phone:focus {
  border-color: var(--nu-accent);
  box-shadow: 0 0 0 1px var(--nu-accent);
}

.nu-lead-overlay .nu-lead-field.nu-invalid,
.nu-foot .nu-foot-phone.nu-invalid {
  border-color: var(--nu-err);
  box-shadow: 0 0 0 1px var(--nu-err);
}

.nu-lead-overlay .nu-lead-field:-webkit-autofill,
.nu-foot .nu-foot-phone:-webkit-autofill {
  -webkit-text-fill-color: #fff;
  -webkit-box-shadow: 0 0 0 1000px #1a1b1a inset;
  caret-color: #fff;
}

.nu-lead-form .iti,
.nu-foot .iti {
  display: block;
  width: 100%;
}

/* ---------- канал связи ---------- */

.nu-lead-overlay .nu-lead-ch {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--nu-line);
  border-radius: 14px;
  background: var(--nu-field);
}

.nu-lead-overlay .nu-lead-ch button {
  flex: 1 1 0;
  min-width: 0;
  height: 40px;
  margin: 0;
  padding: 0 6px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--nu-muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}

.nu-lead-overlay .nu-lead-ch button:hover {
  color: #fff;
}

.nu-lead-overlay .nu-lead-ch button.on {
  border-color: rgba(var(--nu-accent-rgb), .45);
  background: rgba(var(--nu-accent-rgb), .12);
  color: var(--nu-accent);
}

/* ---------- ошибки, согласие, отправка ---------- */

.nu-lead-overlay .nu-fielderr {
  margin: -4px 2px 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--nu-err);
}

.nu-lead-overlay .nu-fielderr:empty {
  display: none;
}

.nu-lead-overlay .nu-lead-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--nu-muted);
  cursor: pointer;
}

.nu-lead-overlay .nu-lead-consent input {
  -webkit-appearance: none;
  appearance: none;
  flex: none;
  display: grid;
  place-content: center;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1.5px solid rgba(255, 255, 255, .35);
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
  transition: background-color .15s, border-color .15s;
}

.nu-lead-overlay .nu-lead-consent input::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--nu-on-accent);
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
  transform: scale(0);
  transition: transform .12s ease-out;
}

.nu-lead-overlay .nu-lead-consent input:checked {
  border-color: var(--nu-accent);
  background: var(--nu-accent);
}

.nu-lead-overlay .nu-lead-consent input:checked::before {
  transform: scale(1);
}

.nu-lead-overlay .nu-lead-consent input:focus-visible {
  box-shadow: 0 0 0 3px rgba(var(--nu-accent-rgb), .35);
}

.nu-lead-overlay .nu-lead-consent a {
  color: rgba(255, 255, 255, .85);
  font-weight: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.nu-lead-overlay .nu-lead-consent a:hover {
  color: var(--nu-accent);
}

.nu-lead-overlay .nu-lead-consent.nu-invalid {
  color: var(--nu-err);
}

.nu-lead-overlay .nu-lead-consent.nu-invalid input {
  border-color: var(--nu-err);
  box-shadow: 0 0 0 1px var(--nu-err);
}

.nu-lead-overlay .nu-lead-submit,
.nu-foot .nu-foot-submit {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: 30px;
  background: var(--nu-accent);
  color: var(--nu-on-accent);
  font-family: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background-color .25s, opacity .2s;
}

.nu-lead-overlay .nu-lead-submit {
  height: 54px;
  margin-top: 4px;
  font-size: 16px;
}

.nu-lead-overlay .nu-lead-submit:hover,
.nu-lead-overlay .nu-lead-submit:focus-visible,
.nu-foot .nu-foot-submit:hover,
.nu-foot .nu-foot-submit:focus-visible {
  background: var(--theme-color1-lighter, #d0f27a);
}

.nu-lead-overlay .nu-lead-submit:disabled,
.nu-foot .nu-foot-submit:disabled {
  opacity: .6;
  cursor: default;
}

.nu-lead-overlay .nu-lead-msg {
  margin-top: 20px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--nu-accent);
}

.nu-lead-overlay .nu-lead-msg.err,
.nu-foot .nu-foot-msg.err {
  color: var(--nu-err);
}

.nu-lead-msg a,
.nu-foot-msg a {
  color: inherit;
  font-weight: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.nu-lead-msg[hidden],
.nu-foot-msg[hidden] {
  display: none !important;
}

/* ---------- форма в подвале: узкая колонка, поле и кнопка друг под другом ---------- */

.nu-foot {
  width: 100%;
  max-width: 420px;
}

.nu-foot .nu-foot-lead {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}

.nu-foot .nu-foot-submit {
  height: 50px;
  padding: 0 20px;
  font-size: 16px;
}

.nu-foot .nu-foot-msg {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--nu-accent);
}

.nu-foot .nu-foot-note {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--nu-muted);
}

/* ---------- список стран intl-tel-input на тёмном фоне ---------- */

.nu-iti .iti__selected-country {
  border-radius: 13px 0 0 13px;
}

.nu-iti .iti__selected-country-primary {
  border-radius: 13px 0 0 13px;
}

.nu-iti .iti__country-selector {
  color: #fff;
  font-size: 15px;
  line-height: 1.4;
}

.nu-iti.iti--inline-country-selector .iti__country-selector {
  margin-top: 4px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 50px -12px rgba(0, 0, 0, .8);
}

.nu-iti .iti__search-input {
  height: auto;
  margin: 0;
  background: transparent;
  box-shadow: none;
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  outline: none;
}

.nu-iti .iti__search-input::placeholder {
  color: rgba(255, 255, 255, .45);
}

.nu-iti .iti__country {
  color: #fff;
}

.nu-iti .iti__dial-code {
  color: rgba(255, 255, 255, .5);
}

.nu-iti .iti__country.iti__highlight {
  background: rgba(var(--nu-accent-rgb), .14);
}

/* На телефоне список стран открывается поверх страницы: он должен быть выше окна заявки. */
.nu-iti.iti--detached-country-selector {
  z-index: 100060;
}

.nu-iti.iti--fullscreen-popup .iti__country-selector {
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 14px;
  overflow: hidden;
}

/* ---------- телефон ---------- */

@media (max-width: 575px) {
  .nu-lead-overlay {
    padding: 16px 12px;
  }

  .nu-lead-card {
    padding: 32px 20px 24px;
    border-radius: 20px;
  }

  .nu-lead-title {
    font-size: 26px;
  }

  .nu-lead-overlay .nu-lead-form {
    margin-top: 20px;
  }
}

@keyframes nu-lead-fade {
  from { opacity: 0; }
}

@keyframes nu-lead-rise {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
}

@media (prefers-reduced-motion: reduce) {
  .nu-lead-overlay.open,
  .nu-lead-overlay.open .nu-lead-card {
    animation: none;
  }
}

/* ---------- вариант в одну строку (подвал сайта): поле и кнопка рядом, на узком экране друг под другом ---------- */

.nu-foot--row {
  max-width: 490px;
}

.nu-foot--row .nu-foot-lead {
  flex-direction: row;
  align-items: stretch;
}

.nu-foot--row .iti,
.nu-foot--row .nu-foot-phone {
  flex: 1 1 auto;
  min-width: 0;
}

.nu-foot--row .nu-foot-submit {
  flex: 0 0 auto;
  width: auto;
  height: 52px;
  padding: 0 26px;
}

@media (max-width: 420px) {
  .nu-foot--row .nu-foot-lead {
    flex-direction: column;
  }

  .nu-foot--row .nu-foot-submit {
    width: 100%;
  }
}
