/* ReformedRx on Elementor: make Elementor's wrappers layout-neutral so rrx-main.css renders the
   same DOM as the static site. Loaded after Elementor's frontend CSS and before rrx-main.css. */

/* page / template / theme wrappers vanish so sticky header + tabs stick to the viewport */
body.rrx #content.site-main, body.rrx .page-content, body.rrx [data-elementor-type],
body.rrx #masthead, body.rrx .hfe-site-footer, body.rrx #colophon, body.rrx .footer-width-fixer,
body.rrx .elementor-location-header, body.rrx .elementor-location-footer { display: contents; }
body.rrx #masthead > .main-title, body.rrx .hfe-site-footer > .bhf-hidden { display: none; }

/* containers behave like the plain divs/sections they came from */
body.rrx .elementor .elementor-element.e-con.rrxc {
  --display: block; --width: auto; --position: static; --overflow: visible;
  --padding-top: 0px; --padding-right: 0px; --padding-bottom: 0px; --padding-left: 0px;
  --margin-top: 0px; --margin-right: 0px; --margin-bottom: 0px; --margin-left: 0px;
  --gap: normal; --row-gap: normal; --column-gap: normal;
  --flex-grow: initial; --flex-shrink: initial; --flex-basis: initial;
  --flex-direction: initial; --flex-wrap: initial; --flex-wrap-mobile: initial;
  --align-items: initial; --align-content: initial; --justify-content: initial;
  --min-height: auto; --height: auto; --text-align: inherit; --z-index: auto; --border-radius: 0;

}
/* kill Elementor's overlay ::before at low specificity so the site's own ::before markers (.proc numbers etc.) still win */
body.rrx :where(.elementor .elementor-element.e-con.rrxc)::before, body.rrx :where(.elementor .elementor-element.e-con.rrxc)::after { content: none; position: static; inset: auto; width: auto; height: auto; transition: none; mix-blend-mode: normal; opacity: 1; border-radius: 0; }
body.rrx .elementor .elementor-element.e-con.rrx-flat { --display: contents; display: contents; }

/* widget wrappers disappear; their element (h2, p, img, a.btn, raw html) sits where it did */
.rrxw.rrxw.rrxw { all: unset; display: contents; }
.rrxw .elementor-widget-container { display: contents; }

/* Elementor button -> plain .btn anchor */
.rrxw .elementor-button { background: none; border-radius: 0; color: inherit; fill: none; font-size: inherit; line-height: inherit;
  padding: 0; display: inline-flex; text-align: inherit; transition: none; }
.rrxw .elementor-button-content-wrapper, .rrxw .elementor-button-text, .rrxw .elementor-button-icon { display: contents; }
.rrxw .elementor-button-icon svg { order: 2; width: auto; height: auto; fill: none; }

/* headings / images: drop Elementor defaults main.css never had to fight */
:where(.rrxw) .elementor-heading-title { line-height: inherit; color: inherit; font-size: inherit; font-weight: inherit; font-family: inherit; }
.elementor .rrxw img { height: auto; }

/* static build: main:has(> .cta-full:last-child) + .footer{margin-top:0} -> same rule for the Elementor page root */
body.rrx:has([data-elementor-type="wp-page"] > .cta-full:last-child) .footer { margin-top: 0; }
/* theme / plugin extras that take up space */
body.rrx .hfe-skip-link:not(:focus), body.rrx #elementor-device-mode { position: absolute; }
/* Elementor gives containers min-width:0; plain divs are min-width:auto (grid/flex sizing depends on it) */
:where(body.rrx) .e-con.rrxc { min-width: auto; }

/* Elementor makes every ::before/::after border-box; the static site only sets it on elements (step circles, badges) */
body.rrx .elementor ::before, body.rrx .elementor ::after { box-sizing: content-box; }

/* Elementor/theme CSS turns on native smooth scrolling; with Lenis running that double-smooths and the page
   stutters and jumps. The static site never sets it, so native scroll-behavior stays auto everywhere. */
html, html body { scroll-behavior: auto !important; }

/* Elementor eases every container's transform/background/border (0.3-0.4s). The static site has no such transition, and
   with GSAP driving transforms every frame it made scroll effects lag and rubber-band, and let GSAP read the
   [data-fade] start offset mid-transition (reveals lost their 34px rise; triggers fired 34px early).
   Zeroing Elementor's duration variables removes only Elementor's transition; the site's own transitions still apply. */
body.rrx .elementor-element { --e-con-transform-transition-duration: 0s; --e-transform-transition-duration: 0s; --background-transition: 0s; --border-transition: 0s; }
