/* =========================================================================
   SDI Campaign Automation Styles
   ========================================================================= */

/* ─── 1. COUNTDOWN BANNER ──────────────────────────────────────────────── */
#sdi-countdown-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 50%, #7f1d1d 100%);
  color: white;
  padding: 8px 16px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  box-shadow: 0 2px 12px rgba(220, 38, 38, 0.3);
  animation: cd-slideDown 0.5s ease-out;
  max-height: 60px;
  overflow: hidden;
  transition: max-height 0.4s, padding 0.4s, opacity 0.4s;
}
@keyframes cd-slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.cd-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}
.cd-icon { font-size: 18px; animation: cd-pulse 1s infinite; }
@keyframes cd-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}
.cd-text {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
}
.cd-timer {
  display: flex;
  align-items: center;
  gap: 4px;
}
.cd-unit {
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(4px);
  border-radius: 6px;
  padding: 2px 8px;
  text-align: center;
  min-width: 40px;
}
.cd-unit span {
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  display: block;
  line-height: 1.2;
}
.cd-unit small {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.8;
}
.cd-sep {
  font-size: 14px;
  font-weight: 700;
  opacity: 0.6;
  animation: cd-blink 1s infinite;
}
@keyframes cd-blink {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 0.2; }
}
.cd-cta {
  background: white;
  color: #dc2626;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.cd-cta:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.cd-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s;
}
.cd-close:hover { color: white; }

/* ─── 2. FLOATING PROMO BAR ────────────────────────────────────────────── */
#sdi-floating-promo {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9990;
  max-width: 600px;
  width: calc(100% - 32px);
  transition: transform 0.4s, opacity 0.4s;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}
.fp-inner {
  background: linear-gradient(135deg, #071a4d 0%, #0f2d6b 100%);
  color: white;
  border-radius: 16px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 32px rgba(7, 26, 77, 0.3);
  border: 1px solid rgba(59, 130, 246, 0.3);
  animation: fp-float 3s ease-in-out infinite;
}
@keyframes fp-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.fp-icon { font-size: 24px; flex-shrink: 0; }
.fp-text {
  font-size: 13px;
  font-weight: 500;
  flex: 1;
  line-height: 1.4;
}
.fp-text em {
  color: #60a5fa;
  font-style: normal;
}
.fp-cta {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  padding: 8px 18px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
}
.fp-cta:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}
.fp-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
  transition: color 0.2s;
}
.fp-close:hover { color: white; }

/* ─── 3. FLOATING WHATSAPP BUTTON ──────────────────────────────────────── */
#sdi-whatsapp-btn {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9995;
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  transition: transform 0.3s, box-shadow 0.3s;
}
#sdi-whatsapp-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
}
.wa-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #25D366;
  animation: wa-pulse 2s infinite;
  z-index: -1;
}
@keyframes wa-pulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.8); opacity: 0; }
}
.wa-icon {
  position: relative;
  z-index: 1;
}
.wa-tooltip {
  position: absolute;
  left: 72px;
  background: #071a4d;
  color: white;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  font-family: 'Inter', -apple-system, sans-serif;
}
.wa-tooltip::after {
  content: '';
  position: absolute;
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
  border-right: 6px solid #071a4d;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}
#sdi-whatsapp-btn.wa-animated .wa-tooltip {
  animation: wa-tooltip-show 4s ease-in-out infinite;
}
@keyframes wa-tooltip-show {
  0%, 70%, 100% { opacity: 0; transform: translateX(8px); }
  10%, 60% { opacity: 1; transform: translateX(0); }
}

/* ─── 4. EXIT INTENT POPUP ─────────────────────────────────────────────── */
#sdi-exit-popup {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(7, 26, 77, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: ep-fadeIn 0.3s ease;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}
@keyframes ep-fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.ep-modal {
  background: white;
  border-radius: 24px;
  max-width: 480px;
  width: 100%;
  padding: 32px;
  position: relative;
  text-align: center;
  animation: ep-slideUp 0.4s ease;
  box-shadow: 0 24px 80px rgba(0,0,0,0.3);
}
@keyframes ep-slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.ep-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  color: #64748b;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ep-close:hover { background: #e2e8f0; }
.ep-badge {
  display: inline-block;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.ep-title {
  font-size: 28px;
  font-weight: 800;
  color: #071a4d;
  margin: 0 0 8px;
}
.ep-subtitle {
  font-size: 15px;
  color: #475569;
  margin: 0 0 20px;
  line-height: 1.6;
}
.ep-features {
  text-align: left;
  margin: 0 0 20px;
}
.ep-feature {
  padding: 8px 0;
  font-size: 14px;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ep-feature span {
  color: #22c55e;
  font-weight: 700;
  font-size: 16px;
}
.ep-timer {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 13px;
  color: #92400e;
  margin: 0 0 20px;
}
.ep-btn {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: white;
  padding: 14px 24px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.ep-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}
.ep-no {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 13px;
  cursor: pointer;
  padding: 8px;
  margin-top: 8px;
  transition: color 0.2s;
}
.ep-no:hover { color: #64748b; }

/* ─── 5. SCROLL-TRIGGERED CTA ──────────────────────────────────────────── */
#sdi-scroll-cta {
  position: fixed;
  bottom: -80px;
  left: 0;
  right: 0;
  z-index: 9980;
  background: linear-gradient(135deg, #071a4d, #0f2d6b);
  border-top: 2px solid #3b82f6;
  padding: 0;
  transition: bottom 0.4s ease;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  box-shadow: 0 -4px 20px rgba(7, 26, 77, 0.3);
}
#sdi-scroll-cta.sc-visible {
  bottom: 0;
}
.sc-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
.sc-text {
  color: white;
}
.sc-text strong {
  font-size: 15px;
  display: block;
}
.sc-text span {
  font-size: 12px;
  color: #94a3b8;
}
.sc-btn {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  padding: 10px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s;
}
.sc-btn:hover { transform: scale(1.05); }
.sc-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}
.sc-close:hover { color: white; }

/* ─── RESPONSIVE ───────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  #sdi-countdown-banner {
    padding: 6px 12px;
  }
  .cd-inner {
    gap: 8px;
  }
  .cd-text { display: none; }
  .cd-unit { min-width: 32px; padding: 2px 6px; }
  .cd-unit span { font-size: 14px; }
  .cd-unit small { font-size: 8px; }
  .cd-cta { font-size: 11px; padding: 3px 10px; }
  
  #sdi-floating-promo {
    bottom: 72px;
  }
  .fp-inner {
    padding: 10px 14px;
    gap: 10px;
  }
  .fp-text { font-size: 12px; }
  .fp-cta { font-size: 11px; padding: 6px 12px; }
  
  #sdi-whatsapp-btn {
    width: 52px;
    height: 52px;
    bottom: 16px;
    left: 16px;
  }
  .wa-tooltip { display: none; }
  
  .ep-modal {
    padding: 24px 20px;
    border-radius: 20px;
  }
  .ep-title { font-size: 22px; }
  
  .sc-inner {
    padding: 10px 16px;
    gap: 12px;
  }
  .sc-text span { display: none; }
  .sc-btn { font-size: 12px; padding: 8px 16px; }
}

@media (max-width: 480px) {
  .cd-timer { display: none; }
  .cd-text { display: inline; font-size: 12px; }
  
  .fp-icon { display: none; }
  .fp-cta { display: none; }
  .fp-text { font-size: 11px; }
}
