/* sr-hotfix-20260530 — layout overlap + cookie/promo stacking */
body.sr-site:has(.sr-cookie-banner:not([hidden])) {
  padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
}

.sr-cookie-banner {
  z-index: 10050 !important;
  max-height: min(38vh, 9rem);
  overflow: auto;
}

.sr-cookie-banner__actions {
  flex-direction: row !important;
  flex-wrap: wrap;
  gap: 0.5rem;
}

body.sr-site:has(.sr-cookie-banner:not([hidden])) .sr-promo-fab.is-visible {
  bottom: calc(6.5rem + env(safe-area-inset-bottom, 0px)) !important;
}

body.sr-site:has(.sr-cookie-banner:not([hidden])) .sr-promo-dock.is-visible {
  bottom: calc(7.5rem + env(safe-area-inset-bottom, 0px)) !important;
}

.sr-promo-fab {
  z-index: 10010 !important;
  max-width: min(22rem, calc(100vw - 1.25rem));
}

@media (max-width: 900px) {
  .sr-promo-fab.is-visible {
    right: 0.65rem !important;
    left: auto !important;
    bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px)) !important;
    transform: scale(0.92);
    transform-origin: bottom right;
  }

  body.sr-site:has(.sr-cookie-banner:not([hidden])) .sr-promo-fab.is-visible {
    bottom: calc(7rem + env(safe-area-inset-bottom, 0px)) !important;
  }

  .sr-dash-pro-chart-frame,
  .sr-spectro-panel,
  #live-freq-chart-wrap {
    margin-bottom: 0.5rem;
  }
}

/* Prevent hero subtitle clipping under fixed header */
.sr-hero-premium,
.sr-flagship-hero,
.sr-dash-intro {
  scroll-margin-top: 5.5rem;
}

.site-wrapper > section:first-of-type .sr-section-lead,
.sr-dash-intro__lead {
  overflow: visible;
  text-overflow: unset;
  white-space: normal;
}

.back-to-top.visible {
  bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
}

body.sr-site:has(.sr-cookie-banner:not([hidden])) .back-to-top.visible {
  bottom: calc(7.5rem + env(safe-area-inset-bottom, 0px)) !important;
}


/* App download FAB — primary right-side widget (replaces ebook) */
.sr-promo-fab {
  position: fixed !important;
  right: clamp(0.65rem, 2vw, 1.25rem) !important;
  bottom: clamp(1rem, 3vh, 1.75rem) !important;
  z-index: 10015 !important;
}

body.sr-site:not(.sr-past-hero) .sr-promo-fab.is-visible {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.srn-wrap { display: none !important; }

body.sr-site:has(.sr-cookie-banner:not([hidden])) .sr-promo-fab.is-visible {
  bottom: calc(6.5rem + env(safe-area-inset-bottom, 0px)) !important;
}
