/* ============================================================
   Vital Smoke Detector - funnel additions for the presell and
   interstitial exports (offer doc, "Calls to Action"):
   - a scrolling CTA bar at the top of the page that appears once
     the visitor starts scrolling, on desktop and mobile;
   - pulsating CTA buttons.
   The export stylesheets are left untouched; this file loads after
   them.
   ============================================================ */

.vsd-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 3px solid #ff6a3d;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .12);
  transform: translateY(-110%);
  opacity: 0;
  pointer-events: none;
  transition: transform .35s cubic-bezier(.22, .9, .28, 1), opacity .25s ease;
}

.vsd-topbar.is-on {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.vsd-topbar__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.vsd-topbar__logo {
  display: block;
  width: auto;
  height: 36px;
  flex-shrink: 0;
}

.vsd-topbar__text {
  flex: 1;
  font-family: "Inter", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.3;
  color: #0C1E38;
}

.vsd-topbar__text b {
  color: #e8402a;
}

.vsd-topbar__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  background: #ff6a3d;
  color: #fff;
  font-family: "Montserrat", Arial, sans-serif;
  font-weight: 800;
  font-size: 16px;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  padding: 12px 22px;
  border-radius: 6px;
  box-shadow: 0 4px 0 0 #e85a2e;
}

.vsd-topbar__btn:hover,
.vsd-topbar__btn:focus {
  color: #fff;
  filter: brightness(.92);
}

.vsd-topbar__btn svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 768px) {
  .vsd-topbar__inner {
    padding: 8px 12px;
    gap: 10px;
  }

  .vsd-topbar__text {
    display: none;
  }

  .vsd-topbar__logo {
    height: 30px;
  }

  .vsd-topbar__btn {
    flex: 1;
    font-size: 15px;
    padding: 12px 14px;
  }
}

/* ---------- pulsating CTAs ----------
   A glow ring instead of a scale(), so full-width buttons never grow past the
   page gutter and the top-bar button never grows over the logo. The first
   shadow keeps the export's 3D bottom edge on .adv-btn. */
@keyframes vsd-pulse {
  0% { box-shadow: 0 4px 0 0 #e85a2e, 0 0 0 0 rgba(255, 106, 61, .55); }
  70% { box-shadow: 0 4px 0 0 #e85a2e, 0 0 0 9px rgba(255, 106, 61, 0); }
  100% { box-shadow: 0 4px 0 0 #e85a2e, 0 0 0 0 rgba(255, 106, 61, 0); }
}

.vsd-pulse {
  animation: vsd-pulse 1.8s ease-out infinite;
}

.vsd-pulse:hover {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  .vsd-pulse {
    animation: none;
  }

  .vsd-topbar {
    transition: none;
  }
}

/* ---------- presell: the top bar replaces the export's mobile bottom bar ---------- */
.vsd-page--pre .adv-bottombar {
  display: none !important;
}

@media (max-width: 900px) {
  .vsd-page--pre .adv-footer {
    padding-bottom: 24px;
  }
}

/* ---------- interstitial: the sticky header already carries the CTA on desktop ---------- */
@media (min-width: 769px) {
  .vsd-page--int .vsd-topbar {
    display: none;
  }
}

@media (max-width: 768px) {
  .vsd-page--int .mobile-sticky-cta {
    display: none !important;
  }
}

/* interstitial buy-box CTA is a link to checkout instead of a scroll button */
.vsd-page--int a.cta-button {
  text-decoration: none;
}

/* ---------- presell phones/tablets (<=768px): the export caps article media at
   400px wide with a fixed 217px height, so on screens wider than ~400px the
   images and videos sat flush left with an empty strip on the right. Fill the
   full-bleed width instead, keeping the export's 400:217 crop. ---------- */
@media (max-width: 768px) {
  .vsd-page--pre .adv-article .adv-figure:not(.adv-figure--hero-desktop) img,
  .vsd-page--pre .adv-article .adv-media img,
  .vsd-page--pre .adv-article .adv-figure:not(.adv-figure--hero-desktop) video {
    max-width: 100%;
    height: auto;
    aspect-ratio: 400 / 217;
  }
}
