/*
  DXR Store — Space / Sci‑Fi Pro CTA + Benefits Modal upgrade
  - Pure CSS visuals (no external libs)
  - Respects prefers-reduced-motion
  - Overrides existing style.css safely
*/

/* ============================
   CTA BUTTON — Space Holo Glass
   ============================ */
.fixed-btn.primary.dxr-space-cta {
  min-height: 52px; /* >= 48px touch target */
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
  background:
    radial-gradient(120% 180% at 12% 18%, rgba(0, 195, 255, 0.24), transparent 60%) padding-box,
    radial-gradient(140% 220% at 88% 86%, rgba(255, 66, 214, 0.14), transparent 55%) padding-box,
    linear-gradient(135deg, rgba(10, 10, 14, 0.62), rgba(5, 5, 7, 0.34)) padding-box,
    linear-gradient(135deg, rgba(0, 195, 255, 0.78), rgba(255, 66, 214, 0.56), rgba(16, 124, 16, 0.62)) border-box;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 14px 34px rgba(0, 195, 255, 0.12),
    0 18px 60px rgba(0, 0, 0, 0.55),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}

.fixed-btn.primary.dxr-space-cta i {
  font-size: 18px;
  line-height: 1;
  transform: translateY(0.5px);
}

/* Glass sheen sweep */
.fixed-btn.primary.dxr-space-cta::before {
  content: "";
  position: absolute;
  inset: -40% -30%;
  background: linear-gradient(
    120deg,
    transparent 25%,
    rgba(255, 255, 255, 0.16) 45%,
    rgba(0, 195, 255, 0.12) 55%,
    transparent 75%
  );
  opacity: 0.55;
  transform: translateX(-45%) rotate(10deg);
  animation: dxrCtaSheen 6.8s ease-in-out infinite;
  pointer-events: none;
  mix-blend-mode: screen;
}

/* Tiny orbital highlight (subtle + slow) */
.fixed-btn.primary.dxr-space-cta::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  top: 18%;
  left: 12%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.62) 0%, rgba(0, 195, 255, 0.24) 38%, transparent 68%);
  box-shadow:
    0 0 18px rgba(0, 195, 255, 0.35),
    0 0 28px rgba(255, 66, 214, 0.12);
  opacity: 0.55;
  animation: dxrCtaOrbit 7.6s linear infinite;
  pointer-events: none;
}

.fixed-btn.primary.dxr-space-cta:hover {
  transform: translateY(-1px);
  box-shadow:
    0 16px 38px rgba(0, 195, 255, 0.14),
    0 22px 70px rgba(0, 0, 0, 0.60),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.fixed-btn.primary.dxr-space-cta:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(0, 195, 255, 0.28),
    0 0 0 6px rgba(255, 66, 214, 0.14),
    0 16px 38px rgba(0, 195, 255, 0.14),
    0 22px 70px rgba(0, 0, 0, 0.60),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

@keyframes dxrCtaSheen {
  0%, 22% {
    transform: translateX(-55%) rotate(10deg);
    opacity: 0.0;
  }
  32% {
    opacity: 0.55;
  }
  52% {
    transform: translateX(35%) rotate(10deg);
    opacity: 0.35;
  }
  72%, 100% {
    transform: translateX(55%) rotate(10deg);
    opacity: 0.0;
  }
}

@keyframes dxrCtaOrbit {
  0%   { top: 18%; left: 12%; }
  25%  { top: 18%; left: 88%; }
  50%  { top: 82%; left: 88%; }
  75%  { top: 82%; left: 12%; }
  100% { top: 18%; left: 12%; }
}

@media (max-width: 400px) {
  .fixed-btn.primary.dxr-space-cta {
    min-height: 50px;
  }
  .fixed-btn.primary.dxr-space-cta i {
    font-size: 17px;
  }
}

/* ============================
   BENEFITS MODAL — Space Holo Glass
   ============================ */

/* Smooth entrance/exit for overlay */
.benefits-modal-overlay {
  background:
    radial-gradient(circle at 20% 10%, rgba(0, 195, 255, 0.10), transparent 55%),
    radial-gradient(circle at 90% 90%, rgba(255, 66, 214, 0.08), transparent 50%),
    rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  transition: opacity 0.28s ease-out;
}

.benefits-modal.active .benefits-modal-overlay {
  opacity: 1;
}

.benefits-modal-box {
  border: 1px solid transparent;
  background:
    linear-gradient(145deg, rgba(10, 10, 12, 0.62) 0%, rgba(4, 4, 6, 0.42) 100%) padding-box,
    linear-gradient(135deg, rgba(0, 195, 255, 0.70), rgba(255, 66, 214, 0.44), rgba(16, 124, 16, 0.44)) border-box;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.70),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 0 70px rgba(0, 195, 255, 0.10);
  isolation: isolate;
  /* Smooth entrance */
  opacity: 0;
  transform: scale(0.94) translateY(12px);
  transition: opacity 0.32s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.benefits-modal.active .benefits-modal-box {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Starfield + nebula layers INSIDE the modal */
.benefits-modal-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 18%, rgba(255,255,255,0.22) 60%, transparent 61%),
    radial-gradient(1px 1px at 22% 42%, rgba(255,255,255,0.14) 60%, transparent 61%),
    radial-gradient(1px 1px at 36% 28%, rgba(255,255,255,0.18) 60%, transparent 61%),
    radial-gradient(1px 1px at 48% 62%, rgba(255,255,255,0.12) 60%, transparent 61%),
    radial-gradient(1px 1px at 63% 22%, rgba(255,255,255,0.16) 60%, transparent 61%),
    radial-gradient(1px 1px at 74% 46%, rgba(255,255,255,0.20) 60%, transparent 61%),
    radial-gradient(1px 1px at 86% 30%, rgba(255,255,255,0.10) 60%, transparent 61%),
    radial-gradient(1px 1px at 18% 80%, rgba(255,255,255,0.12) 60%, transparent 61%),
    radial-gradient(1px 1px at 42% 86%, rgba(255,255,255,0.16) 60%, transparent 61%),
    radial-gradient(1px 1px at 72% 78%, rgba(255,255,255,0.12) 60%, transparent 61%),
    radial-gradient(2px 2px at 90% 64%, rgba(255,255,255,0.10) 60%, transparent 61%);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

.benefits-modal-box::after {
  content: "";
  position: absolute;
  inset: -40px;
  background:
    radial-gradient(circle at 18% 10%, rgba(0, 195, 255, 0.14), transparent 58%),
    radial-gradient(circle at 88% 86%, rgba(255, 66, 214, 0.10), transparent 56%),
    radial-gradient(circle at 58% 32%, rgba(16, 124, 16, 0.08), transparent 60%);
  opacity: 0.85;
  filter: blur(8px);
  pointer-events: none;
  z-index: 0;
}

.benefits-modal-content {
  position: relative;
  z-index: 1;
}

.benefits-modal-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 22px rgba(0,0,0,0.35);
}

.benefits-modal-close:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(0, 195, 255, 0.26),
    0 0 0 6px rgba(255, 66, 214, 0.12),
    0 8px 22px rgba(0,0,0,0.35);
}

.bm-title {
  font-size: 24px;
  letter-spacing: 0.2px;
}

.bm-subtitle {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.58);
}

.bm-highlight {
  border-radius: 14px;
  border: 1px solid rgba(0, 195, 255, 0.14);
  background:
    radial-gradient(circle at 10% 10%, rgba(0, 195, 255, 0.10), transparent 60%),
    rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.88);
}

.bm-section-title {
  letter-spacing: 0.15px;
}

.bm-list li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Keep modal CTA premium but avoid heavy infinite pulse */
.bm-cta-btn {
  animation: none;
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow:
    0 10px 30px rgba(0, 195, 255, 0.12),
    0 14px 46px rgba(0, 0, 0, 0.55);
  position: relative;
  overflow: hidden;
}

.bm-cta-btn::before {
  content: "";
  position: absolute;
  inset: -40% -30%;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.14) 50%, transparent 70%);
  transform: translateX(-55%) rotate(10deg);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.bm-cta-btn:hover::before {
  opacity: 0.75;
  animation: dxrCtaSheen 2.6s ease-in-out 1;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .fixed-btn.primary.dxr-space-cta::before,
  .fixed-btn.primary.dxr-space-cta::after {
    animation: none !important;
  }
  .bm-cta-btn:hover::before {
    animation: none !important;
  }
  .benefits-modal-overlay,
  .benefits-modal-box {
    transition: opacity 0.01ms !important;
    transform: none !important;
  }
  .benefits-modal.active .benefits-modal-box {
    transform: none !important;
  }
}
