/**
 * WiseIQ Conversion Velocity Engine — Styles v1.0
 */

/* ── Exit-Intent Modal ────────────────────────────────────────── */
.wiq-exit-modal {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.wiq-exit-modal.wiq-em-open {
  opacity: 1;
  pointer-events: auto;
}
.wiq-em-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
}
.wiq-em-dialog {
  position: relative;
  background: #fff;
  border-radius: 20px;
  max-width: 420px;
  width: calc(100% - 32px);
  padding: 32px 28px 28px;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,0.22);
  transform: scale(0.94) translateY(16px);
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.wiq-exit-modal.wiq-em-open .wiq-em-dialog { transform: scale(1) translateY(0); }
.wiq-em-close {
  position: absolute;
  top: 14px; right: 16px;
  background: none;
  border: none;
  font-size: 22px;
  color: #9CA3AF;
  cursor: pointer;
  line-height: 1;
}
.wiq-em-close:hover { color: #374151; }
.wiq-em-icon { margin-bottom: 12px; }
.wiq-em-title {
  font-size: 20px;
  font-weight: 800;
  color: #111827;
  margin: 0 0 8px;
}
.wiq-em-sub {
  font-size: 14px;
  color: #6B7280;
  margin: 0 0 18px;
  line-height: 1.6;
}
.wiq-em-card {
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 18px;
  text-align: left;
}
.wiq-em-lender { font-size: 15px; font-weight: 700; color: #111827; margin-bottom: 4px; }
.wiq-em-apr    { font-size: 13px; color: #374151; margin-bottom: 6px; }
.wiq-em-soft-pull {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #059669;
  font-weight: 600;
}
.wiq-em-cta {
  display: block;
  background: #1D4ED8;
  color: #fff;
  text-decoration: none;
  padding: 13px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
  transition: background 0.15s;
}
.wiq-em-cta:hover { background: #1E40AF; }
.wiq-em-dismiss {
  background: none;
  border: none;
  font-size: 12px;
  color: #9CA3AF;
  cursor: pointer;
  text-decoration: underline;
}

/* ── Universal Sticky Bottom CTA ─────────────────────────────── */
.wiq-sticky-cta {
  position: fixed;
  bottom: -80px;
  left: 0; right: 0;
  z-index: 9997;
  background: #fff;
  border-top: 2px solid #1D4ED8;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
  padding: 10px 16px;
  transition: bottom 0.3s cubic-bezier(0.4,0,0.2,1);
}
.wiq-sticky-cta.wiq-sc-visible { bottom: 0; }
.wiq-sc-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.wiq-sc-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  flex-wrap: wrap;
}
.wiq-sc-label { font-size: 11px; color: #6B7280; text-transform: uppercase; letter-spacing: 0.05em; }
.wiq-sc-name  { font-size: 14px; font-weight: 700; color: #111827; }
.wiq-sc-apr   { font-size: 12px; color: #374151; }
.wiq-sc-actions { display: flex; align-items: center; gap: 8px; }
.wiq-sc-btn {
  background: #1D4ED8;
  color: #fff;
  text-decoration: none;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.15s;
}
.wiq-sc-btn:hover { background: #1E40AF; }
.wiq-sc-soft-pull {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  color: #059669;
  font-weight: 600;
  white-space: nowrap;
}
.wiq-sc-close {
  background: none;
  border: none;
  font-size: 18px;
  color: #9CA3AF;
  cursor: pointer;
  padding: 0 4px;
}
.wiq-sc-close:hover { color: #374151; }

/* ── Smart Nudge ──────────────────────────────────────────────── */
.wiq-nudge {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 9999;
  max-width: 340px;
  background: #fff;
  border: 1px solid #BFDBFE;
  border-left: 4px solid #1D4ED8;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  transform: translateX(120%);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
  padding: 14px 16px;
}
.wiq-nudge.wiq-nudge-visible { transform: translateX(0); }
.wiq-nudge-inner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wiq-nudge-msg { font-size: 13px; color: #374151; flex: 1; line-height: 1.4; }
.wiq-nudge-cta {
  background: #1D4ED8;
  color: #fff;
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.wiq-nudge-cta:hover { background: #1E40AF; }
.wiq-nudge-close {
  background: none;
  border: none;
  font-size: 16px;
  color: #9CA3AF;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

/* ── Rate Alert ───────────────────────────────────────────────── */
.wiq-rate-alert {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 12px;
  transition: opacity 0.3s;
}
.wiq-rate-alert.wiq-ra-hidden { opacity: 0; pointer-events: none; }
.wiq-ra-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.wiq-ra-pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #10B981;
  flex-shrink: 0;
  animation: wiq-cv-pulse 2s ease-in-out infinite;
}
.wiq-ra-text { font-size: 13px; color: #1E40AF; flex: 1; }
.wiq-ra-cta {
  background: #1D4ED8;
  color: #fff;
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.wiq-ra-cta:hover { background: #1E40AF; }
.wiq-ra-close {
  background: none;
  border: none;
  font-size: 16px;
  color: #9CA3AF;
  cursor: pointer;
  padding: 0;
}

/* ── Mortgage Rate Lock Signal ────────────────────────────────── */
.wiq-rate-lock {
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  border: 1px solid #F59E0B;
  border-radius: 10px;
  padding: 12px 16px;
  margin: 12px 0;
}
.wiq-rl-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.wiq-rl-pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #D97706;
  flex-shrink: 0;
  animation: wiq-cv-pulse 1.5s ease-in-out infinite;
}
.wiq-rl-text { font-size: 13px; color: #92400E; flex: 1; line-height: 1.5; }
.wiq-rl-cta {
  background: #D97706;
  color: #fff;
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.wiq-rl-cta:hover { background: #B45309; }

/* ── Save Results ─────────────────────────────────────────────── */
.wiq-save-results { margin: 12px 0; }
.wiq-sr-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.wiq-sr-btn:hover { border-color: #1D4ED8; background: #EFF6FF; color: #1D4ED8; }
.wiq-sr-confirm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #059669;
  font-weight: 600;
}

/* ── Pulse animation ──────────────────────────────────────────── */
@keyframes wiq-cv-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

/* ── Dark mode ────────────────────────────────────────────────── */
[data-theme="dark"] .wiq-sticky-cta { background: #111827; border-top-color: #3B82F6; }
[data-theme="dark"] .wiq-sc-name    { color: #F9FAFB; }
[data-theme="dark"] .wiq-sc-apr     { color: #D1D5DB; }
[data-theme="dark"] .wiq-nudge      { background: #1F2937; border-color: #3B82F6; }
[data-theme="dark"] .wiq-nudge-msg  { color: #D1D5DB; }
[data-theme="dark"] .wiq-rate-alert { background: #1E3A5F; border-color: #3B82F6; }
[data-theme="dark"] .wiq-ra-text    { color: #93C5FD; }
[data-theme="dark"] .wiq-em-dialog  { background: #1F2937; }
[data-theme="dark"] .wiq-em-title   { color: #F9FAFB; }
[data-theme="dark"] .wiq-em-sub     { color: #9CA3AF; }
[data-theme="dark"] .wiq-em-card    { background: #111827; border-color: #374151; }
[data-theme="dark"] .wiq-em-lender  { color: #F9FAFB; }
[data-theme="dark"] .wiq-em-apr     { color: #D1D5DB; }
