/* Единый вид окна «шаг 2: контакты» — S91, решение владельца 03.08.
   Три сценария сбора данных с сайта (зарплата, заявка на подбор, получение
   материалов) показывают одно и то же окно: человек видит один и тот же экран
   независимо от того, откуда пришёл. Раньше каждый скрипт впрыскивал свой CSS
   и они разъезжались — теперь стиль здесь один, скрипты только раскладывают
   разметку по этим классам. */

.fm-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: rgba(13, 8, 32, 0.82);
  backdrop-filter: blur(6px);
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
/* Открывают окно двумя способами: одни скрипты добавляют .active, другие просто
   снимают hidden. Гасить по одному признаку, а показывать по другому — значит
   отдать людям невидимое некликабельное окно (так и вышло 03.08: зарплатная и обе
   формы .ru перестали принимать обращения). Показываем по ЛЮБОМУ из признаков. */
.fm-overlay.active,
.fm-overlay:not([hidden]) { opacity: 1; pointer-events: auto; }
.fm-overlay[hidden] { display: none; }

.fm-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  margin: auto;
  background: #1e1144;
  border: 1px solid rgba(134, 59, 255, 0.35);
  border-radius: 20px;
  padding: 34px 32px 28px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  text-align: left;
  font-family: 'Montserrat', sans-serif;
  transform: translateY(16px);
  transition: transform 0.25s;
}
.fm-overlay.active .fm-card,
.fm-overlay:not([hidden]) .fm-card { transform: translateY(0); }
@media (max-width: 600px) {
  .fm-card { padding: 26px 20px 22px; }
}

.fm-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.45);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s;
}
.fm-close:hover { color: #fff; }

.fm-step {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #a46dff;
  margin-bottom: 8px;
}
.fm-title {
  font-size: 21px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 8px;
}
.fm-sub {
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 20px;
}

.fm-input,
.fm-textarea {
  width: 100%;
  box-sizing: border-box;
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(134, 59, 255, 0.28);
  border-radius: 12px;
  padding: 13px 15px;
  margin-bottom: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.fm-textarea { resize: vertical; min-height: 104px; }
.fm-input::placeholder,
.fm-textarea::placeholder { color: rgba(255, 255, 255, 0.38); }
.fm-input:focus,
.fm-textarea:focus {
  border-color: #863bff;
  box-shadow: 0 0 0 3px rgba(134, 59, 255, 0.18);
}

.fm-consent {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 0 0 12px;
  cursor: pointer;
}
.fm-consent input {
  flex-shrink: 0;
  width: 19px;
  height: 19px;
  margin-top: 1px;
  accent-color: #863bff;
  cursor: pointer;
}
.fm-consent span {
  font-size: 12.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.55);
}
.fm-consent a { color: #a46dff; text-decoration: underline; }

.fm-btn {
  width: 100%;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  background: linear-gradient(135deg, #863bff 0%, #5e77ff 100%);
  border: none;
  border-radius: 14px;
  padding: 15px;
  margin-top: 10px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(134, 59, 255, 0.32);
  transition: transform 0.18s, box-shadow 0.18s, opacity 0.18s;
}
.fm-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(134, 59, 255, 0.48); }
.fm-btn:disabled { opacity: 0.6; cursor: default; transform: none; }

.fm-note {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
}
.fm-req { color: #ff7a7a; font-weight: 700; margin-left: 2px; }

/* Экран «готово» — тот же язык, что у формы */
.fm-done { text-align: center; }
.fm-done-title {
  font-size: 21px;
  font-weight: 800;
  color: #4ade80;
  margin: 0 0 12px;
}
.fm-done-text {
  font-size: 15px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.8);
  margin: 0 0 18px;
}
