/* =====================================================================
                    EXIT-INTENT POPUP
   ===================================================================== */

.exit-intent-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

.exit-intent-popup.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.exit-intent-popup__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.exit-intent-popup__content {
  position: relative;
  background: #ffffff;
  border-radius: 12px;
  padding: 1.5rem;
  max-width: 420px;
  width: 90%;
  text-align: left;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s ease;
  z-index: 1;
}

.exit-intent-popup.is-open .exit-intent-popup__content {
  transform: scale(1) translateY(0);
}

.exit-intent-popup__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  transition: all 0.2s ease;
  padding: 0;
}

.exit-intent-popup__close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #1f2937;
  transform: rotate(90deg);
}

.exit-intent-popup__icon {
  display: none; /* Убираем большую иконку */
}

.exit-intent-popup__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 0.75rem;
  line-height: 1.3;
}

.exit-intent-popup__text {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #6b7280;
  margin: 0 0 1.25rem;
}

.exit-intent-popup__form {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.exit-intent-popup__form-row {
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.exit-intent-popup__form-row input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.9375rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
  background: #ffffff;
}

.exit-intent-popup__form-row input:focus {
  outline: none;
  border-color: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.1);
}

.exit-intent-popup__form-row input::placeholder {
  color: #9ca3af;
}

/* Error states для exit-intent popup */
.exit-intent-popup__form-row.contactform__field {
  position: relative;
}

.exit-intent-popup__form-row.contactform__field--error input {
  border-color: #dc2626 !important;
  outline: 2px solid rgba(220, 38, 38, 0.2) !important;
  background-color: #fef2f2;
  width: 100%;
  box-sizing: border-box;
}

.exit-intent-popup__form-row .contactform__error-message {
  display: none;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #dc2626;
  line-height: 1.4;
  width: 100%;
  box-sizing: border-box;
}

.exit-intent-popup__form-row.contactform__field--error
  .contactform__error-message {
  display: block;
}

.exit-intent-popup__submit {
  width: 100%;
  padding: 0.625rem 1rem;
  font-size: 0.9375rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  border-radius: 8px;
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.exit-intent-popup__submit:hover {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}

.exit-intent-popup__submit .btn__icon {
  width: 16px;
  height: 16px;
  color: #ffffff;
  stroke: #ffffff;
}

.exit-intent-popup__skip {
  background: none !important;
  border: none !important;
  color: #6b7280;
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0;
  transition: none;
  text-decoration: underline;
}

.exit-intent-popup__skip:hover {
  color: #1f2937;
  background: none !important;
  border: none !important;
  transform: none;
  box-shadow: none;
}

/* Адаптивность */
@media (max-width: 768px) {
  .exit-intent-popup__content {
    padding: 2rem 1.5rem;
    max-width: 95%;
  }

  .exit-intent-popup__title {
    font-size: 1.25rem;
  }

  .exit-intent-popup__icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
  }

  .exit-intent-popup__icon svg {
    width: 32px;
    height: 32px;
  }
}
