/**
 * Filtered archive cleanup + keep content within the 1440 container.
 */

/* Known empty spacer containers (template leftovers with large padding) */
.elementor-element-a2b85f5,
.elementor-element-0654030 {
	display: none !important;
	margin: 0 !important;
	padding: 0 !important;
	min-height: 0 !important;
	height: 0 !important;
	overflow: hidden !important;
	--padding-top: 0px !important;
	--padding-bottom: 0px !important;
	--padding-left: 0px !important;
	--padding-right: 0px !important;
	--padding-block-start: 0px !important;
	--padding-block-end: 0px !important;
	--padding-inline-start: 0px !important;
	--padding-inline-end: 0px !important;
	--gap: 0px !important;
}

/*
 * Only hide boxed parents whose direct .e-con-inner has no element children.
 * Do not target e-con-full (no inner wrapper) — that breaks archive layout.
 */
body.prep-archive-hub--external-filters .e-con.e-con-boxed.e-parent:has(> .e-con-inner:not(:has(*))),
body.post-type-archive-uroci .e-con.e-con-boxed.e-parent:has(> .e-con-inner:not(:has(*))),
body.post-type-archive-worksheets .e-con.e-con-boxed.e-parent:has(> .e-con-inner:not(:has(*))),
body.post-type-archive-canva-templates .e-con.e-con-boxed.e-parent:has(> .e-con-inner:not(:has(*))) {
	display: none !important;
	margin: 0 !important;
	padding: 0 !important;
	min-height: 0 !important;
	height: 0 !important;
	overflow: hidden !important;
	--padding-top: 0px !important;
	--padding-bottom: 0px !important;
	--padding-left: 0px !important;
	--padding-right: 0px !important;
	--gap: 0px !important;
}

/*
 * Keep filtered archive sections inside the site container (1440).
 * Some listing parents were saved with --content-width:100%.
 * Force flex so max-width actually constrains (inline ignores it).
 */
body.prep-archive-hub--external-filters .elementor-location-archive > .e-con.e-con-boxed,
body.post-type-archive-uroci .elementor-location-archive > .e-con.e-con-boxed,
body.post-type-archive-worksheets .elementor-location-archive > .e-con.e-con-boxed,
body.post-type-archive-canva-templates .elementor-location-archive > .e-con.e-con-boxed {
	--display: flex;
	display: flex !important;
	flex-direction: column;
	width: 100%;
	box-sizing: border-box;
}

body.prep-archive-hub--external-filters .elementor-location-archive > .e-con.e-con-boxed > .e-con-inner,
body.post-type-archive-uroci .elementor-location-archive > .e-con.e-con-boxed > .e-con-inner,
body.post-type-archive-worksheets .elementor-location-archive > .e-con.e-con-boxed > .e-con-inner,
body.post-type-archive-canva-templates .elementor-location-archive > .e-con.e-con-boxed > .e-con-inner {
	--display: flex;
	--content-width: min(100%, var(--container-max-width, 1440px)) !important;
	display: flex !important;
	flex-direction: column;
	max-width: min(100%, var(--container-max-width, 1440px)) !important;
	width: 100%;
	margin-left: auto;
	margin-right: auto;
	box-sizing: border-box;
}
