/* ===================================================================
   BOLTLY FLUSH  -  FRONTEND ONLY (never enqueued in the Elementor editor)
   Removes the white gaps Elementor/the theme add around the header,
   footer and page content on the live site. These rules are anchored to
   the Boltly widgets / header-footer locations so they never touch other
   sections, and they are kept out of the editor so empty drop zones and
   new sections behave normally while building.
   =================================================================== */
/* ---- remove white space / gaps that Elementor sections, containers and columns
        add around the header and footer so they sit flush ---- */
.elementor-widget-boltly_header, .elementor-widget-boltly_footer { margin: 0 !important; }

/* zero the padding on the section / flex-container that holds the widget */
.elementor-section:has(.elementor-widget-boltly_header),
.elementor-section:has(.elementor-widget-boltly_footer),
.e-con:has(.elementor-widget-boltly_header),
.e-con:has(.elementor-widget-boltly_footer),
.e-con-inner:has(.elementor-widget-boltly_header),
.e-con-inner:has(.elementor-widget-boltly_footer) {
  padding-top: 0 !important; padding-bottom: 0 !important; margin-top: 0 !important; margin-bottom: 0 !important;
  min-height: 0 !important;
}

/* zero the default column padding (10px) wrapping the widget */
.elementor-column:has(.elementor-widget-boltly_header) > .elementor-widget-wrap,
.elementor-column:has(.elementor-widget-boltly_footer) > .elementor-widget-wrap,
.elementor-widget-wrap:has(> .elementor-element .elementor-widget-boltly_header),
.elementor-widget-wrap:has(> .elementor-element .elementor-widget-boltly_footer) {
  padding: 0 !important;
}

/* ============================================================
   FLUSH HEADER / FOOTER  -  kill every gap Elementor adds around
   the widget in a Theme Builder header/footer or on a page.
   ============================================================ */
.elementor-widget-boltly_header, .elementor-widget-boltly_footer { margin: 0 !important; padding: 0 !important; }
.elementor-widget-boltly_header > .elementor-widget-container,
.elementor-widget-boltly_footer > .elementor-widget-container { margin: 0 !important; padding: 0 !important; }

/* Theme Builder header/footer location wrappers + every Elementor box inside them */
.elementor-location-header, .elementor-location-footer,
.elementor-location-header > .elementor, .elementor-location-footer > .elementor,
.elementor-location-header .elementor-section, .elementor-location-footer .elementor-section,
.elementor-location-header .elementor-container, .elementor-location-footer .elementor-container,
.elementor-location-header .e-con, .elementor-location-footer .e-con,
.elementor-location-header .e-con-inner, .elementor-location-footer .e-con-inner,
.elementor-location-header .elementor-column, .elementor-location-footer .elementor-column,
.elementor-location-header .elementor-widget-wrap, .elementor-location-footer .elementor-widget-wrap,
.elementor-location-header .elementor-element-populated, .elementor-location-footer .elementor-element-populated {
  margin: 0 !important; padding: 0 !important; min-height: 0 !important; gap: 0 !important; row-gap: 0 !important;
}

/* page-placed fallback for modern browsers */
.elementor-section:has(.elementor-widget-boltly_header),
.elementor-section:has(.elementor-widget-boltly_footer),
.e-con:has(.elementor-widget-boltly_header),
.e-con:has(.elementor-widget-boltly_footer) { margin: 0 !important; padding: 0 !important; min-height: 0 !important; }

/* remove the white gap directly below the header (top margin of the content
   block that follows the Theme Builder header location) */
.elementor-location-header { margin: 0 !important; }
.elementor-location-header + * { margin-top: 0 !important; }
.elementor-location-header + .elementor > .elementor-section:first-child,
.elementor-location-header + .elementor > .e-con:first-child { margin-top: 0 !important; }
/* and any gap above the footer location */
.elementor-location-footer { margin: 0 !important; }
* + .elementor-location-footer { margin-top: 0 !important; }

/* page content sits flush under the Theme Builder header (covers theme
   content wrappers AND the first section of the page) */
.elementor-location-header + main,
.elementor-location-header + #content,
.elementor-location-header + .site-content,
.elementor-location-header + .content-area,
.elementor-location-header + .site-main,
.elementor-location-header + .elementor,
.elementor-location-header + * { margin-top: 0 !important; padding-top: 0 !important; }
.elementor-location-header + * > .elementor > .elementor-section:first-child,
.elementor-location-header + * > .elementor > .e-con:first-child,
.elementor-location-header + * .elementor > .elementor-section:first-child,
.elementor-location-header + * .elementor > .e-con:first-child { margin-top: 0 !important; }

/* frontend-only gap: the theme's content wrapper (rendered on the live site
   but not in the editor) adds top spacing under the header. Flatten it. */
.elementor-location-header ~ main,
.elementor-location-header ~ main.site-main,
.elementor-location-header ~ .site-main,
.elementor-location-header ~ #content,
.elementor-location-header ~ .site-content,
.elementor-location-header ~ .content-area,
.elementor-location-header ~ .ast-container,
.elementor-location-header ~ #primary,
.elementor-location-header ~ .elementor { margin-top: 0 !important; padding-top: 0 !important; }
main.site-main > .elementor:first-child,
#content > .elementor:first-child,
.site-content > .elementor:first-child { margin-top: 0 !important; padding-top: 0 !important; }
