/* 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;
}


/* === SR DESIGN HOTFIX v2 - 2026-06-01 === */

/* FIX 1: Hide giant graph-gate button (578x578 icon covering hero) */
.sr-graph-gate-btn,
#sr-graph-gate-trigger,
.sr-graph-gate-btn__icon,
.sr-graph-gate-btn__copy,
.sr-graph-gate-btn__arrow {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  max-width: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  left: -99999px !important;
  top: -99999px !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

/* FIX 2: Hide FOR SALE acquisition card */
#sr-acq-card,
[id*="sr-acq"],
.sr-acq-card,
.sr-acq-card-link,
.sr-acq-kicker,
.sr-acq-title,
.sr-acq-copy,
.sr-acq-proof,
.sr-acq-cta,
.sr-acq-note {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  max-width: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  left: -99999px !important;
  top: -99999px !important;
  pointer-events: none !important;
  opacity: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* FIX 2b: Hide ACQ card inline style override */
style#sr-acq-card-css {
  display: none !important;
}

/* FIX 3: Hide promo dock that overlaps content on right */
#sr-promo-dock,
.sr-promo-dock {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* FIX 4: Hide app promo FABs */
#sr-promo-fab,
.sr-promo-fab,
.sr-app-fab,
.sr-app-download-fab,
[class*="app-fab"] {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  opacity: 0 !important;
}

/* FIX 5: Fix hero section overflow */
body.sr-site .sr-hero-pro__intro--masthead {
  position: relative;
  z-index: 5;
  overflow: visible;
}

body.sr-site .sr-hero-masthead {
  overflow: visible;
}

/* FIX 6: Footer overflow fix */
body.sr-site footer,
body.sr-site .sr-footer-pro,
body.sr-site .sr-footer-premium {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  width: 100% !important;
}

/* FIX 7: Prevent horizontal overflow site-wide */
html {
  overflow-x: hidden !important;
}

body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
}

/* FIX 8: Hide any injected maintenance/update panels */
[class*="sr-update"],
[class*="sr-notify"],
[class*="sr-maint"],
[class*="sr-announcement"] {
  display: none !important;
}


/* === SR ALIGNMENT FIX v3 - 2026-06-02 === */

/* FIX A: Spectrogram header overflow (1920px -> parent width) */
body.sr-site .sr-prism-spectro-head {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* FIX B: Live graph chart header overflow */
body.sr-site .sr-dash-pro-chart-head {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* FIX C: Trend card headers overflow (appears twice for two trend cards) */
body.sr-site .sr-dash-pro-trend-head {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* FIX D: Cite section header overflow */
body.sr-site .sr-cite-header {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* FIX E: Footer mast header overflow */
body.sr-site .sr-footer-pro__mast {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* FIX F: Footer alignment - center it with content */
body.sr-site .sr-footer-pro,
body.sr-site .footer-premium {
  width: 100% !important;
  max-width: 100vw !important;
  margin-left: auto !important;
  margin-right: auto !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}

/* FIX G: Ensure all card headers respect parent container */
body.sr-site .card header,
body.sr-site [class*="sr-dash"] header,
body.sr-site [class*="sr-prism"] header {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* FIX H: Global overflow prevention for dashboard sections */
body.sr-site .sr-dash-pro,
body.sr-site .sr-dash-ultra,
body.sr-site .sr-flow-section {
  overflow-x: hidden !important;
  max-width: 100% !important;
}

/* FIX I: Prevent any element from exceeding viewport */
body.sr-site * {
  max-width: 100vw !important;
}

/* FIX J: Inner containers should respect their parent width */
body.sr-site .sr-prism-spectro,
body.sr-site .sr-dash-pro-chart,
body.sr-site .sr-dash-pro-trend,
body.sr-site .sr-cite-section {
  overflow-x: hidden !important;
}


/* === SR FOOTER FIX v3 - 2026-06-02 === */
body.sr-site .sr-footer-pro,
body.sr-site .footer-premium,
body.sr-site #site-footer {
  margin-left: auto !important;
  margin-right: auto !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 80rem !important;
  padding-left: 2rem !important;
  padding-right: 2rem !important;
  box-sizing: border-box !important;
}


/* === SR WIDTH UNIFORMITY v4 - 2026-06-02 === */

/* All major sections: same 1280px content width, centered */
body.sr-site .sr-hero-pro {
  max-width: 80rem !important;
  margin-left: auto !important;
  margin-right: auto !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

body.sr-site .sr-cite-section,
body.sr-site .sr-promo-strip {
  max-width: 80rem !important;
  margin-left: auto !important;
  margin-right: auto !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Inner containers also match */
body.sr-site .max-w-7xl {
  max-width: 80rem !important;
  margin-left: auto !important;
  margin-right: auto !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
}

/* === PROFESSIONAL QUOTE PANEL === */

#sr-quote-panel {
  position: fixed;
  top: 50%;
  right: 1.5rem;
  transform: translateY(-50%);
  z-index: 9990;
  width: 280px;
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  line-height: 1.4;
  color: #f0f4f8;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

#sr-quote-panel.sr-qp-hidden {
  opacity: 0;
  transform: translateY(-50%) translateX(40px);
  pointer-events: none;
}

#sr-quote-panel .sr-qp-card {
  position: relative;
  padding: 20px;
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(8, 18, 38, 0.96) 0%, rgba(12, 28, 48, 0.94) 50%, rgba(6, 14, 30, 0.97) 100%);
  border: 1px solid rgba(125, 211, 252, 0.18);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 40px rgba(56, 189, 248, 0.06);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  overflow: hidden;
}

#sr-quote-panel .sr-qp-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.6), rgba(251, 191, 36, 0.4), transparent);
}

#sr-quote-panel .sr-qp-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.55);
  font: 700 14px/1 Arial, sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

#sr-quote-panel .sr-qp-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

#sr-quote-panel .sr-qp-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.25);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6ee7b7;
  margin-bottom: 12px;
}

#sr-quote-panel .sr-qp-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.8);
  animation: srQpPulse 2s ease-in-out infinite;
}

@keyframes srQpPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 10px rgba(52, 211, 153, 0.8); }
  50% { opacity: 0.6; box-shadow: 0 0 4px rgba(52, 211, 153, 0.4); }
}

#sr-quote-panel .sr-qp-title {
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
  line-height: 1.2;
}

#sr-quote-panel .sr-qp-subtitle {
  display: block;
  font-size: 12px;
  color: rgba(203, 213, 225, 0.8);
  margin-bottom: 16px;
  line-height: 1.45;
}

#sr-quote-panel .sr-qp-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

#sr-quote-panel .sr-qp-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: rgba(226, 232, 240, 0.85);
}

#sr-quote-panel .sr-qp-feature-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

#sr-quote-panel .sr-qp-feature-icon svg {
  width: 12px;
  height: 12px;
  color: #38bdf8;
}

#sr-quote-panel .sr-qp-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.3);
}

#sr-quote-panel .sr-qp-cta:hover {
  background: linear-gradient(135deg, #38bdf8, #3b82f6);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(14, 165, 233, 0.4);
}

#sr-quote-panel .sr-qp-cta svg {
  width: 14px;
  height: 14px;
}

#sr-quote-panel .sr-qp-note {
  display: block;
  text-align: center;
  font-size: 9.5px;
  color: rgba(148, 163, 184, 0.6);
  margin-top: 8px;
}

/* Hide on mobile - show floating button instead */
@media (max-width: 1024px) {
  #sr-quote-panel {
    display: none !important;
  }
}

/* Hide when user scrolls past hero */
body.sr-is-scrolling #sr-quote-panel {
  opacity: 0.7;
}


/* === SR WIDTH OVERRIDE v5 - Beat sr-overflow-fix.css specificity === */
/* Must match or exceed: html body.sr-site .sr-hero-pro { max-width: min(1400px, 100vw) !important; } */

html body.sr-site .sr-hero-pro {
  max-width: 80rem !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

html body.sr-site .sr-hero-pro__shell {
  max-width: 80rem !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

html body.sr-site .sr-hero-pro__grid {
  max-width: 80rem !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Dashboard section */
html body.sr-site .sr-dashboard-ultra {
  max-width: 80rem !important;
  margin-left: auto !important;
  margin-right: auto !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Cite section */
html body.sr-site .sr-cite-section {
  max-width: 80rem !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Promo strip */
html body.sr-site .sr-promo-strip {
  max-width: 80rem !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Footer */
html body.sr-site .sr-footer-pro {
  max-width: 80rem !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* All max-w-7xl containers */
html body.sr-site .max-w-7xl {
  max-width: 80rem !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
}




/* Performance: reduce animations on mobile */
@media (max-width: 768px) {
  #sr-dust-canvas { display: none !important; }
  #sr-aurora-canvas { display: none !important; }
  #sr-lens-flare { display: none !important; }
  #world-solar-bg { transition: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  #sr-dust-canvas, #sr-aurora-canvas, #sr-lens-flare { display: none !important; }
  #world-solar-bg { transition: none !important; filter: none !important; }
}



/* === SR BACKGROUND ENHANCEMENT v3 - No transforms === */

/* Smooth opacity compositing for background (no transform — Three.js handles it) */
#world-solar-bg {
  will-change: opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Subtle vignette via pseudo-element */
#world-solar-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(2,4,12,0.45) 85%, rgba(2,4,12,0.85) 100%);
  pointer-events: none;
  z-index: 5;
}

/* Hide old heavy overlays if they exist */
#sr-dust-canvas,
#sr-aurora-canvas,
#sr-enhance-vignette,
#sr-lens-flare {
  display: none !important;
}

/* Prevent hero right scrollbar */
html body.sr-site .sr-hero-pro,
html body.sr-site .sr-hero-pro__shell,
html body.sr-site .sr-hero-pro__grid {
  overflow-x: hidden !important;
  overflow-y: hidden !important;
}

/* Early width alignment (before JS injects higher-specificity rules) */
/* Uses :root prefix for specificity 0,4,1 — beats sr-overflow-fix.css (0,3,1) */
:root body.sr-site .sr-hero-pro,
:root body.sr-site .sr-hero-pro__shell {
  max-width: 80rem !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  overflow-x: hidden !important;
}

:root body.sr-site #dashboard,
:root body.sr-site .sr-dash-pro,
:root body.sr-site .max-w-7xl {
  max-width: 80rem !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

:root body.sr-site .sr-footer-pro,
:root body.sr-site .footer-premium,
:root body.sr-site #site-footer {
  max-width: 80rem !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Fallback: ensure page is visible even if JS fails */
body.sr-site {
  visibility: visible !important;
}

/* Reduce on mobile */
@media (max-width: 768px) {
  #world-solar-bg {
    will-change: auto;
    opacity: 1 !important;
  }
  #world-solar-bg::after {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  #world-solar-bg {
    will-change: auto;
    opacity: 1 !important;
  }
}
