/* ============================================================
   EXIT INTENT POPUP — Newsletter v2
   ============================================================ */

/* Overlay */
#exit-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 25, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
#exit-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* Modal */
#exit-modal {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 500px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,.4);
  transform: translateY(24px) scale(.96);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1);
  position: relative;
}
#exit-overlay.open #exit-modal {
  transform: translateY(0) scale(1);
}

/* Botão fechar */
#exit-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255,255,255,.18);
  border: none;
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  z-index: 2;
  line-height: 1;
  font-weight: 700;
}
#exit-close:hover { background: rgba(255,255,255,.32); }

/* Header azul-marinho */
.exit-header {
  background: linear-gradient(160deg, #0d1f3c 0%, #1a3560 100%);
  padding: 36px 32px 28px;
  text-align: center;
  position: relative;
}
.exit-header .exit-icon {
  font-size: 36px;
  margin-bottom: 14px;
  display: block;
}
.exit-header h2 {
  font-family: 'Inter', Arial, sans-serif;
  font-size: 24px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 10px;
  line-height: 1.25;
  letter-spacing: -.3px;
}
.exit-header p {
  font-size: 14px;
  color: rgba(255,255,255,.68);
  line-height: 1.6;
  max-width: 340px;
  margin: 0 auto;
}

/* Benefícios */
.exit-benefits {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 20px 24px 0;
}
.exit-benefit {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  background: #f1f5f9;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
}
.exit-benefit span { font-size: 15px; }

/* Form */
.exit-form-wrap {
  padding: 20px 24px 8px;
}
.exit-form-wrap label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 8px;
}
.exit-input-row {
  display: flex;
  gap: 10px;
}
.exit-input-row input {
  flex: 1;
  padding: 14px 18px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 15px;
  font-family: 'Inter', Arial, sans-serif;
  color: #374151;
  background: #fff;
  outline: none;
  transition: border .2s, box-shadow .2s;
}
.exit-input-row input:focus {
  border-color: #0d1f3c;
  box-shadow: 0 0 0 3px rgba(13,31,60,.08);
}
.exit-input-row input::placeholder { color: #94a3b8; }
.exit-input-row button {
  background: #cc0000;
  color: #fff;
  border: none;
  padding: 14px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  font-family: 'Inter', Arial, sans-serif;
  transition: background .2s, transform .15s;
  white-space: nowrap;
  letter-spacing: .2px;
}
.exit-input-row button:hover {
  background: #a80000;
  transform: scale(1.03);
}

/* Erro */
.exit-error {
  font-size: 12px;
  color: #cc0000;
  margin-top: 6px;
  display: none;
  padding-left: 2px;
}

/* Recusar */
.exit-skip {
  text-align: center;
  padding: 14px 24px 20px;
}
.exit-skip button {
  background: none;
  border: none;
  font-size: 13px;
  color: #94a3b8;
  cursor: pointer;
  font-family: 'Inter', Arial, sans-serif;
  transition: color .15s;
  text-decoration: none;
}
.exit-skip button:hover { color: #64748b; }

/* Tela de sucesso */
.exit-success {
  text-align: center;
  padding: 32px 24px 28px;
}
.exit-success .es-icon { font-size: 56px; margin-bottom: 14px; display: block; }
.exit-success h3 { font-size: 20px; font-weight: 800; color: #0d1f3c; margin-bottom: 8px; }
.exit-success p  { font-size: 14px; color: #64748b; line-height: 1.6; }

/* Mobile */
@media(max-width:520px) {
  #exit-modal { border-radius: 16px; }
  .exit-header { padding: 28px 20px 22px; }
  .exit-header h2 { font-size: 20px; }
  .exit-header p { font-size: 13px; }
  .exit-form-wrap { padding: 16px 18px 6px; }
  .exit-input-row { flex-direction: column; gap: 8px; }
  .exit-input-row button { width: 100%; padding: 14px; }
  .exit-benefits { padding: 16px 18px 0; gap: 6px; }
  .exit-benefit { font-size: 11px; padding: 5px 10px; }
  .exit-skip { padding: 12px 18px 18px; }
}
