/* ==========================================================================
   CRO Boost — Conversion Rate Optimization Styles
   Packora Solutions | v1.0
   ========================================================================== */

/* ── 1. STICKY URGENCY BAR ─────────────────────────────────────────────── */
.cro-sticky-bar {
  position: fixed;
  bottom: 70px; /* above mobile bottom nav */
  left: 0; right: 0;
  z-index: 9990;
  background: linear-gradient(90deg, #0C2340 0%, #0084FF 50%, #0C2340 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.65rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 -4px 20px rgba(0,132,255,0.35);
  transform: translateY(100%);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  flex-wrap: wrap;
}
.cro-sticky-bar.visible {
  transform: translateY(0);
}
.cro-sticky-bar .sticky-bar-text {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.cro-sticky-bar .sticky-bar-text .pulse-dot {
  width: 8px; height: 8px;
  background: #4ADE80;
  border-radius: 50%;
  animation: pulseGreen 1.5s infinite;
  flex-shrink: 0;
}
@keyframes pulseGreen {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0.7); }
  50% { box-shadow: 0 0 0 6px rgba(74,222,128,0); }
}
.cro-sticky-bar .btn-sticky {
  background: #FCD34D;
  color: #0C2340;
  border: none;
  border-radius: 8px;
  padding: 0.45rem 1.1rem;
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}
.cro-sticky-bar .btn-sticky:hover {
  background: #F59E0B;
  transform: scale(1.04);
}
.cro-sticky-bar .sticky-close {
  position: absolute;
  right: 0.75rem;
  top: 50%; transform: translateY(-50%);
  background: none; border: none;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.25rem;
  line-height: 1;
  transition: color 0.2s;
}
.cro-sticky-bar .sticky-close:hover { color: #fff; }

@media (max-width: 640px) {
  .cro-sticky-bar { bottom: 60px; font-size: 0.78rem; padding: 0.55rem 2rem 0.55rem 0.75rem; }
}

/* ── 2. SOCIAL PROOF POPUP ─────────────────────────────────────────────── */
.sp-popup {
  position: fixed;
  bottom: 145px;
  left: 1.25rem;
  z-index: 9980;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(12,35,64,0.22), 0 0 0 1.5px rgba(0,132,255,0.18);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 290px;
  min-width: 230px;
  transform: translateX(calc(-100% - 2rem));
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.sp-popup.show {
  transform: translateX(0);
  pointer-events: auto;
}
.sp-popup .sp-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0084FF, #00A3FF);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 1rem;
  flex-shrink: 0;
  border: 2px solid #E0F0FF;
}
.sp-popup .sp-content { flex: 1; min-width: 0; }
.sp-popup .sp-content .sp-name {
  font-weight: 700; font-size: 0.82rem; color: #0C2340;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sp-popup .sp-content .sp-action {
  font-size: 0.75rem; color: #5B6B7C; margin-top: 0.1rem; line-height: 1.35;
}
.sp-popup .sp-content .sp-time {
  font-size: 0.68rem; color: #9CA3AF; margin-top: 0.2rem;
  display: flex; align-items: center; gap: 0.3rem;
}

@media (max-width: 640px) {
  .sp-popup { max-width: 240px; left: 0.75rem; bottom: 130px; }
}

/* ── 3. AUTO POPUP MODAL (10s) ─────────────────────────────────────────── */
.exit-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7,23,43,0.7);
  backdrop-filter: blur(4px);
  z-index: 10010;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.exit-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.exit-modal {
  background: #fff;
  border-radius: 16px;
  max-width: 400px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  transform: scale(0.9) translateY(16px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.exit-overlay.active .exit-modal {
  transform: scale(1) translateY(0);
}
.exit-modal-header {
  background: linear-gradient(135deg, #0C2340 0%, #0084FF 100%);
  padding: 1.35rem 1.5rem 1.1rem;
  text-align: center;
  position: relative;
}
.exit-modal-header .exit-emoji {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 0.35rem;
  animation: bounceEmoji 1.5s infinite;
}
@keyframes bounceEmoji {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.exit-modal-header h3 {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 0.3rem;
}
.exit-modal-header p {
  color: rgba(255,255,255,0.8);
  font-size: 0.78rem;
  line-height: 1.45;
}
.exit-modal-close {
  position: absolute;
  top: 0.6rem; right: 0.6rem;
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 50%;
  width: 28px; height: 28px;
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  transition: background 0.2s;
}
.exit-modal-close:hover { background: rgba(255,255,255,0.3); }
.exit-modal-body {
  padding: 1.1rem 1.35rem 1.35rem;
}
/* Inline form in popup */
.exit-inline-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
}
.exit-form-group {
  position: relative;
  display: flex;
  align-items: center;
}
.exit-form-group i {
  position: absolute;
  left: 0.85rem;
  color: #0084FF;
  font-size: 0.85rem;
  pointer-events: none;
}
.exit-form-group input {
  width: 100%;
  padding: 0.7rem 0.85rem 0.7rem 2.4rem;
  border: 1.5px solid #D8E5F2;
  border-radius: 9px;
  font-size: 0.85rem;
  font-family: inherit;
  color: #0C2340;
  background: #F8FBFF;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.exit-form-group input:focus {
  border-color: #0084FF;
  box-shadow: 0 0 0 3px rgba(0,132,255,0.12);
  background: #fff;
}
.exit-form-group input::placeholder { color: #9CA3AF; }

.exit-modal-cta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.35rem;
}
.exit-modal-cta .btn-exit-yes {
  background: linear-gradient(135deg, #0084FF, #00A3FF);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.75rem;
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 16px rgba(0,132,255,0.4);
}
.exit-modal-cta .btn-exit-yes:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,132,255,0.5);
}
.exit-modal-cta .btn-exit-no {
  background: none;
  border: none;
  color: #9CA3AF;
  font-size: 0.75rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0.25rem;
  transition: color 0.2s;
  text-align: center;
}
.exit-modal-cta .btn-exit-no:hover { color: #5B6B7C; }

/* Trust row */
.exit-trust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  border-top: 1px solid #F3F4F6;
  padding-top: 0.75rem;
  margin-top: 0.5rem;
}
.exit-trust-row span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.68rem;
  color: #9CA3AF;
  font-weight: 600;
}
.exit-trust-row i { color: #0084FF; font-size: 0.72rem; }

/* ── 4. TRUST BADGES ────────────────────────────────────────────────────── */
.modal-social-strip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  margin-bottom: 1.25rem;
  font-size: 0.78rem;
  color: #166534;
  font-weight: 600;
}
.modal-social-strip i { color: #22C55E; font-size: 1rem; }
.modal-social-strip .avatars {
  display: flex;
}
.modal-social-strip .avatars span {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: linear-gradient(135deg, #0084FF, #00A3FF);
  margin-left: -6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.modal-social-strip .avatars span:first-child { margin-left: 0; }

.modal-urgency {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(239,68,68,0.06);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 10px;
  padding: 0.6rem 0.85rem;
  margin-bottom: 1.25rem;
  font-size: 0.78rem;
  color: #991B1B;
  font-weight: 600;
}
.modal-urgency .urgency-left {
  display: flex; align-items: center; gap: 0.5rem;
}
.modal-urgency .urgency-left i { color: #EF4444; animation: pulseRedIcon 1.5s infinite; }
@keyframes pulseRedIcon {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.modal-urgency .urgency-slots {
  font-weight: 800;
  color: #EF4444;
  font-size: 0.85rem;
}

.modal-trust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid #F3F4F6;
  margin-top: 0.85rem;
  flex-wrap: wrap;
}
.trust-badge {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  color: #6B7280;
  font-weight: 600;
}
.trust-badge i { color: #0084FF; font-size: 0.8rem; }

.form-micro {
  font-size: 0.68rem;
  color: #9CA3AF;
  margin-top: 0.2rem;
  display: block;
}

/* ── 5. WHATSAPP FAB ────────────────────────────────────────────────────── */
.whatsapp-fab {
  position: fixed;
  bottom: 145px;
  right: 1.25rem;
  z-index: 9970;
  width: 54px; height: 54px;
  background: #25D366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 1.55rem;
  box-shadow: 0 4px 20px rgba(37,211,102,0.5);
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.25s;
  animation: fabPulseWA 3s infinite;
}
@keyframes fabPulseWA {
  0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,0.5); }
  50% { box-shadow: 0 4px 30px rgba(37,211,102,0.75), 0 0 0 8px rgba(37,211,102,0.12); }
}
.whatsapp-fab:hover {
  background: #128C7E;
  transform: scale(1.1);
  animation: none;
  box-shadow: 0 6px 25px rgba(18,140,126,0.6);
}
.whatsapp-fab .wa-tooltip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%; transform: translateY(-50%);
  background: #0C2340;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  letter-spacing: 0.02em;
}
.whatsapp-fab .wa-tooltip::after {
  content: '';
  position: absolute;
  left: 100%; top: 50%; transform: translateY(-50%);
  border: 5px solid transparent;
  border-left-color: #0C2340;
}
.whatsapp-fab:hover .wa-tooltip { opacity: 1; }

@media (max-width: 640px) {
  .whatsapp-fab { bottom: 135px; right: 0.75rem; width: 48px; height: 48px; font-size: 1.3rem; }
}

/* ── 6. SCROLL PROGRESS ─────────────────────────────────────────────────── */
.scroll-progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, #0084FF, #FCD34D);
  z-index: 99999;
  width: 0%;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}

/* ── 7. INLINE MINI CTA BAR ─────────────────────────────────────────────── */
.cro-inline-cta {
  background: linear-gradient(135deg, #F0F7FF 0%, #E0EEFF 100%);
  border-top: 1px solid #D0E9FF;
  border-bottom: 1px solid #D0E9FF;
  padding: 1rem 0;
}
.cro-inline-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.cro-inline-benefits {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.cro-inline-benefit {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0C2340;
  white-space: nowrap;
}
.cro-inline-benefit i { color: #0084FF; }

@media (max-width: 640px) {
  .cro-inline-cta-inner { flex-direction: column; text-align: center; gap: 0.75rem; }
  .cro-inline-benefits { justify-content: center; }
}
