/* ============================================================
   FUNNEL MECHANICS — floating UI for conversion widgets
   ============================================================ */

/* ---------- PURCHASE NOTIFICATION POPUPS ---------- */

.purchase-popup {
  position: fixed;
  bottom: 100px;
  left: 20px;
  width: 330px;
  background: var(--bg-card);
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 14px 18px 14px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-deep), 0 0 20px rgba(201, 169, 97, 0.15);
  font-family: 'Inter', sans-serif;
  z-index: 90;
  transform: translateX(-360px);
  opacity: 0;
  transition: transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 320ms ease;
}

.purchase-popup.visible {
  transform: translateX(0);
  opacity: 1;
}

.purchase-popup .avatar {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
}

.purchase-popup .body { flex: 1; min-width: 0; line-height: 1.4; }

.purchase-popup .line1 {
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 600;
}

.purchase-popup .line2 {
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.purchase-popup .line2 strong { color: var(--gold-bright); font-weight: 600; }

.purchase-popup .line3 {
  color: var(--gold);
  font-size: 0.72rem;
  margin-top: 2px;
  letter-spacing: 0.02em;
}

.purchase-popup .line3 .check { color: var(--green-bright); }

.purchase-popup .close {
  position: absolute;
  top: 4px;
  right: 8px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
}

.purchase-popup .close:hover { color: var(--text-primary); }

/* ---------- LIVE VISITOR COUNTER ---------- */

.visitor-counter {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 30px;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: var(--text-secondary);
  box-shadow: var(--shadow-deep);
  z-index: 85;
  backdrop-filter: blur(8px);
}

.visitor-counter .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-bright);
  box-shadow: 0 0 0 0 var(--green-bright);
  animation: dot-pulse 2s infinite;
}

@keyframes dot-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(122, 154, 90, 0.6); }
  70%  { box-shadow: 0 0 0 8px rgba(122, 154, 90, 0); }
  100% { box-shadow: 0 0 0 0 rgba(122, 154, 90, 0); }
}

.visitor-counter strong {
  color: var(--text-primary);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: opacity 200ms ease;
}

/* ---------- GUARANTEE FLOATING BADGE ---------- */

.guarantee-float {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: var(--bg-card);
  border: 2px solid var(--gold);
  border-radius: 8px;
  padding: 10px 16px 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Inter', sans-serif;
  box-shadow: var(--shadow-deep);
  z-index: 85;
}

.guarantee-float .seal-mini {
  font-size: 1.4rem;
  color: var(--gold-bright);
  border: 2px solid var(--gold);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.guarantee-float .g-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold-bright);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.2;
}

.guarantee-float .g-sub {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* when purchase popup is visible, shift guarantee badge up */
body.popup-active .guarantee-float {
  transform: translateY(-90px);
  transition: transform 300ms ease;
}

/* ---------- EXIT INTENT MODAL ---------- */

.exit-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease;
}

.exit-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.exit-modal {
  background: linear-gradient(180deg, #1a1610 0%, var(--bg-card) 100%);
  border: 2px double var(--gold);
  border-radius: 10px;
  max-width: 520px;
  width: 100%;
  padding: 48px 40px 36px;
  text-align: center;
  position: relative;
  transform: scale(0.88);
  transition: transform 280ms cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.8), 0 0 60px rgba(201, 169, 97, 0.15);
}

.exit-overlay.visible .exit-modal { transform: scale(1); }

.exit-modal .close-x {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px 10px;
  transition: color 200ms;
}

.exit-modal .close-x:hover { color: var(--text-primary); }

.exit-modal .dr-thumb {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 20px;
  border: 2px solid var(--gold);
  background: radial-gradient(circle, #3a3020, #1a1610);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-bright);
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 600;
  overflow: hidden;
}

.exit-modal .dr-thumb img {
  width: 100%; height: 100%; object-fit: cover;
}

.exit-modal h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.3rem;
  color: var(--gold-bright);
  margin-bottom: 12px;
  line-height: 1.15;
}

.exit-modal .gift-line {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  color: var(--text-primary);
  font-style: italic;
  margin-bottom: 20px;
}

.exit-modal .offer-line {
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1.5;
}

.exit-modal .offer-line strong {
  color: var(--gold-bright);
  font-size: 1.25rem;
  font-weight: 700;
}

.exit-modal .exit-timer {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.8rem;
  color: var(--red-bright);
  font-weight: 700;
  margin: 16px 0 24px;
  letter-spacing: 0.05em;
}

.exit-modal .exit-timer .colon { animation: pulse 1s infinite; }

.exit-modal .btn { margin-bottom: 14px; }

.exit-modal .no-thanks {
  display: block;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  cursor: pointer;
  text-decoration: underline;
  margin: 0 auto;
  padding: 6px;
}

.exit-modal .no-thanks:hover { color: var(--text-secondary); }

/* ---------- MOBILE TWEAKS ---------- */

@media (max-width: 900px) {

  .purchase-popup {
    bottom: 80px;
    left: 10px;
    right: 10px;
    width: auto;
    max-width: 380px;
    margin: 0 auto;
  }

  .visitor-counter {
    bottom: 12px;
    right: 12px;
    padding: 8px 14px;
    font-size: 0.78rem;
  }

  .guarantee-float {
    display: none; /* hide on mobile — reduces clutter */
  }

  .exit-modal {
    padding: 36px 22px 26px;
  }

  .exit-modal h3 { font-size: 1.8rem; }
}
