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

}
body.rrx .elementor .elementor-element.e-con.rrxc::before { content: none; }
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 pseudo-elements border-box; the static site leaves them content-box (tick marks, bars) */
body.rrx .elementor *::before, body.rrx .elementor *::after { box-sizing: content-box; }
