/*
 * Fangstportalen v1.7.19 – true full-width public pages.
 * The previous rule only removed max-width from a few Elementor elements.
 * This version also breaks the Elementor document out of the theme's boxed
 * wrapper and removes width limits from both legacy sections and containers.
 */
html,
body {
  overflow-x: clip;
}

/* Remove boxed constraints added by common WordPress themes. */
body:not(.fp-is-app-area) #page,
body:not(.fp-is-app-area) .site,
body:not(.fp-is-app-area) .site-content,
body:not(.fp-is-app-area) .content-area,
body:not(.fp-is-app-area) .site-main,
body:not(.fp-is-app-area) article.page,
body:not(.fp-is-app-area) article.page > .entry-content,
body:not(.fp-is-app-area) .entry-content {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* The Elementor document must span the viewport even when its theme parent is boxed. */
body:not(.fp-is-app-area).elementor-page .elementor,
body:not(.fp-is-app-area) .entry-content > .elementor {
  position: relative !important;
  left: 50% !important;
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: -50vw !important;
  margin-right: -50vw !important;
}

/* Elementor Flexbox Containers, including boxed containers. */
body:not(.fp-is-app-area) .elementor > .e-con,
body:not(.fp-is-app-area) .elementor > .e-con.e-parent,
body:not(.fp-is-app-area) .elementor > .elementor-element.e-con,
body:not(.fp-is-app-area) .elementor .e-con.e-parent,
body:not(.fp-is-app-area) .elementor .e-con-boxed,
body:not(.fp-is-app-area) .elementor .e-con-boxed > .e-con-inner,
body:not(.fp-is-app-area) .elementor .e-con > .e-con-inner {
  width: 100% !important;
  max-width: none !important;
  --container-max-width: 100% !important;
}

/* Legacy Elementor sections. */
body:not(.fp-is-app-area) .elementor-section-wrap,
body:not(.fp-is-app-area) .elementor-section,
body:not(.fp-is-app-area) .elementor-section.elementor-section-boxed,
body:not(.fp-is-app-area) .elementor-section.elementor-section-boxed > .elementor-container,
body:not(.fp-is-app-area) .elementor-section > .elementor-container {
  width: 100% !important;
  max-width: none !important;
}

/* Theme-specific wrappers frequently responsible for the visible side margins. */
body:not(.fp-is-app-area) .ast-container,
body:not(.fp-is-app-area) .container,
body:not(.fp-is-app-area) .site-container,
body:not(.fp-is-app-area) .content-container,
body:not(.fp-is-app-area) .wp-site-blocks,
body:not(.fp-is-app-area) main.wp-block-group,
body:not(.fp-is-app-area) .wp-block-post-content {
  width: 100% !important;
  max-width: none !important;
}

/* Do not let the page/article itself keep theme padding around Elementor pages. */
body:not(.fp-is-app-area).elementor-page .site-content,
body:not(.fp-is-app-area).elementor-page .content-area,
body:not(.fp-is-app-area).elementor-page .site-main,
body:not(.fp-is-app-area).elementor-page article.page,
body:not(.fp-is-app-area).elementor-page article.page > .entry-content {
  padding-left: 0 !important;
  padding-right: 0 !important;
}
