/* Exit-intent попап «Получите каталог» */
.exit-popup {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: none;
}
.exit-popup.is-open {
  display: block;
  animation: exit-popup__fadein 0.25s ease-out;
}
.exit-popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(18, 14, 40, 0.7);
}
.exit-popup__box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 624px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  animation: exit-popup__slideup 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}
.exit-popup__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #1a1a1a;
  font-size: 22px;
  line-height: 36px;
  text-align: center;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s, background 0.2s, color 0.2s;
  z-index: 2;
  border: 0;
  font-family: Arial, sans-serif;
  font-weight: 300;
}
.exit-popup__close:hover {
  transform: rotate(90deg);
  background: #fef2f2;
  color: #dc2626;
}
.exit-popup__image {
  width: 100%;
  height: 240px;
  object-fit: cover;
  object-position: center;
  display: block;
  background: #f3f4f6;
}
.exit-popup__body {
  padding: 22px 28px 26px;
  text-align: center;
}
.exit-popup__eyebrow {
  display: inline-block;
  color: #dc2626;
  font-family: 'TTMedium', sans-serif;
  font-size: 13px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.exit-popup__title {
  font-family: 'TTBold', sans-serif;
  font-weight: 700;
  font-size: 26px;
  line-height: 1.2;
  color: #1a1a1a;
  margin-bottom: 10px;
}
.exit-popup__text {
  font-family: 'TTRegular', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #555;
  margin-bottom: 20px;
}
.exit-popup__cta {
  margin: 0 auto;
  display: inline-flex;
  /* остальные стили — из .popup-form__btn_green */
}

@keyframes exit-popup__fadein {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes exit-popup__slideup {
  from { opacity: 0; transform: translate(-50%, -46%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

/* Блокировка скролла без конфликта с .lock из popup.js */
html.exit-lock,
html.exit-lock body {
  overflow: hidden;
}

/* Pulse-анимация на кнопке внутри exit-popup — работает только когда попап открыт.
   Когда скрыт — пауза, чтобы не тратить CPU. */
.exit-popup .popup-form__btn_green {
  animation-play-state: paused;
}
.exit-popup.is-open .popup-form__btn_green {
  animation-play-state: running;
}

/* Мобилка — на всякий случай (триггер не должен сработать, но если JS ошибся) */
@media (max-width: 600px) {
  .exit-popup__box { width: calc(100vw - 16px); }
  .exit-popup__image { height: 180px; }
  .exit-popup__body { padding: 18px 20px 22px; }
  .exit-popup__title { font-size: 22px; }
  .exit-popup__text { font-size: 14px; margin-bottom: 16px; }
}
