/* ══════════════════════════════════════════════════════════
   STICKY BOTTOM CTA BAR (Mobile)
══════════════════════════════════════════════════════════ */
.sticky-cta-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(5, 5, 14, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 16px;
  z-index: 995;
  display: flex;
  justify-content: center;
  align-items: center;
}

.sticky-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  position: relative;
  overflow: hidden; /* Contains the sweep animated pseudo-element */
  padding: 14px 24px;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 4px 24px rgba(124, 58, 237, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  
  /* Constant urgency heartbeat */
  animation: urgency-heartbeat 4s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Glass Glare Sweep for Urgency */
.sticky-cta-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.35) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-20deg);
  pointer-events: none;
  animation: urgency-sweep 4s infinite;
}

.sticky-cta-btn:active {
  transform: scale(0.98) !important;
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.2);
  animation: none; /* Stops beating during click */
}


/* ══════════════════════════════════════════════════════════
   STICKY SIDE BUTTON (Desktop)
══════════════════════════════════════════════════════════ */
.sticky-side-wrap {
  position: fixed;
  top: 50%;
  right: 0;
  z-index: 995;
  transform: translateY(-50%);
  display: flex !important; /* Forces bounding box to be exact */
}

.sticky-side-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  position: relative;
  overflow: hidden; /* Contains the sweep glare */
  
  /* Vertical text flow naturally shapes the button */
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  
  padding: 24px 14px;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 0 0 12px 12px; /* Bottom edge due to rotation */
  text-decoration: none;
  
  box-shadow: 0 -4px 24px rgba(124, 58, 237, 0.4), inset 0 -1px 1px rgba(255, 255, 255, 0.2);
  transition: padding 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  
  /* The continuous soft pulse */
  animation: premium-pulse 3s infinite ease-in-out;
}

/* Glass Glare Sweep */
.sticky-side-btn::after {
  content: '';
  position: absolute;
  top: -150%;
  left: -50%;
  width: 200%;
  height: 50%;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.35) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(15deg);
  pointer-events: none;
  animation: premium-sweep 4.5s infinite;
}

.sticky-side-btn:hover {
  background: linear-gradient(135deg, #8b5cf6, #5b21b6);
  padding-top: 30px; /* Expands outwards from the wall slightly */
  color: #ffffff;
  /* Override pulse with a consistent heavy glow on hover */
  box-shadow: 0 -4px 34px rgba(124, 58, 237, 0.8), inset 0 -1px 2px rgba(255, 255, 255, 0.5) !important;
  animation: none; /* Stop pulse while hovering */
}

/* ══════════════════════════════════════════════════════════
   ANIMATION KEYFRAMES
══════════════════════════════════════════════════════════ */
@keyframes premium-pulse {
  0% { box-shadow: 0 -4px 20px rgba(124, 58, 237, 0.3), inset 0 -1px 1px rgba(255, 255, 255, 0.2); }
  50% { box-shadow: 0 -4px 40px rgba(124, 58, 237, 0.85), inset 0 -1px 2px rgba(255, 255, 255, 0.45); }
  100% { box-shadow: 0 -4px 20px rgba(124, 58, 237, 0.3), inset 0 -1px 1px rgba(255, 255, 255, 0.2); }
}

@keyframes premium-sweep {
  0% { top: -150%; }
  15% { top: 250%; }
  100% { top: 250%; } /* Long pause before the next sweep */
}

@keyframes urgency-heartbeat {
  0% { transform: scale(1); }
  6% { transform: scale(1.04); }
  12% { transform: scale(0.98); }
  18% { transform: scale(1.04); }
  24% { transform: scale(1); }
  100% { transform: scale(1); }
}

@keyframes urgency-sweep {
  0% { left: -150%; }
  20% { left: 150%; }
  100% { left: 150%; }
}


/* ══════════════════════════════════════════════════════════
   RESPONSIVE HANDLING
══════════════════════════════════════════════════════════ */

/* 1. Ensure body always has padding to clear the persistent bottom bar on ALL screens */
body {
  padding-bottom: 74px; 
}
.modal-overlay {
  padding-bottom: 74px;
}

/* 2. Ensure vertical side button scales elegantly on smaller mobile screens */
@media (max-width: 768px) {
  .sticky-side-wrap { 
    /* The user requested it visible on mobile. Scale it slightly so it doesn't crowd small screens */
    transform: translateY(-50%) scale(0.85);
    transform-origin: right center;
  }
}

/* 3. Modal adjustments for extremely small phones */
@media (max-width: 380px) {
  .modal-card { 
    bottom: 74px; 
  }
}
