/* ==========================================================================
   Доработка №25: две разные модалки — «Заявка» и «Демо-доступ».
   Поверх main.css: .modal__container, .form-input*, .submit-form* уже есть,
   здесь только отличия и лечение наложений.
   ========================================================================== */

/* Пока открыта наша модалка, чужие всплывашки не должны её накрывать:
   виджет leadback выезжает через пару секунд после первого скролла и на
   телефоне закрывает форму целиком, плашка cookie — нижнюю часть. */
body:has(.modal__container.show) .lb_wrapper,
body:has(.modal__container.show) .lb-widget-panel,
body:has(.modal__container.show) .cookie-info {
  display: none !important;
}

/* позиционирование модалки — из main.css, свой position ей не задаём */

.nd-modal__chip {
  display: inline-block;
  margin-bottom: 12px;
  padding: 5px 10px;
  border-radius: 3px;
  background: #f4f4f4;
  color: #283370;
  font-weight: 600;
  font-size: .75rem;
  line-height: 1.2;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.nd-modal__chip--demo {
  background: #fdeadf;
  color: #b5501b;
}
.nd-modal--demo { border-top: 4px solid var(--color-primary, #f3712b); }

.nd-modal .modal__description { max-width: 34em; }

/* textarea в стиле полей темы; плавающая подпись у необязательного поля
   не поднимается сама (нет :valid-перехода), поэтому держим её сверху */
.nd-modal__textarea {
  height: auto;
  min-height: 72px;
  padding-top: 26px;
  resize: vertical;
  font-size: 16px;            /* iOS не зумит поле при 16px */
}
.nd-modal__textarea + .form-input__placeholder {
  font-size: .75rem;
  opacity: .8;
  top: 8px;
  transform: translateY(0);
}

/* выбор сервиса в демо */
.nd-modal__label {
  display: block;
  margin-bottom: 6px;
  text-align: left;
  font-weight: 600;
  font-size: .875rem;
  line-height: 1.3;
  color: var(--color-dark, #1a1919);
}
.nd-modal__select { position: relative; }
.nd-modal__select select.form-input__input {
  height: 56px;
  padding: 0 44px 0 19px;
  font-size: 16px;
  color: var(--color-dark, #1a1919);
  opacity: 1;
  cursor: pointer;
}
.nd-modal__select::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid #283370;
  border-bottom: 2px solid #283370;
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.nd-modal__hours {
  margin: 0;
  font-size: .8125rem;
  line-height: 1.4;
  color: #4a4a4a;
}

.nd-modal .form-input__input[type="tel"] { font-size: 16px; }

@media (max-width: 576px) {
  .nd-modal .modal__description { font-size: .9375rem; }
  .nd-modal__hours { font-size: .75rem; }
}

/* поле-ловушка для ботов: в боевой разметке пряталось инлайновым <style>,
   здесь — уводим за экран, чтобы ни видеть, ни попасть табом */
.nd-modal .submit-form__email {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  margin: 0 !important;
  pointer-events: none;
}
