/* Layout controls style the block's existing element on the site. */
:is(.bv-layout-flex, .bv-layout-grid) {
	--bv-height: initial;
	--bv-gap: initial;
	--bv-justify: initial;
	--bv-align: initial;
	--bv-direction: initial;
	--bv-track: initial;
	--bv-columns: initial;
	min-height: var(--bv-height, auto);
}
:is(.bv-width-full-boxed,.bv-width-full-full,.bv-width-boxed-boxed) {
	--bv-width: initial;
	--bv-padding-left: initial;
	--bv-padding-right: initial;
}
:is(.bv-layout-flex,.bv-layout-grid):not(.bv-native-layout), .bv-legacy-gap {
	gap: var(--bv-gap, var(--wp--style--block-gap, 1rem)) !important;
}
:is(.bv-layout-flex,.bv-layout-grid):not(.bv-native-layout), .bv-legacy-justify { justify-content: var(--bv-justify, start) !important; }
:is(.bv-layout-flex,.bv-layout-grid):not(.bv-native-layout), .bv-legacy-align { align-items: var(--bv-align, stretch) !important; }
.bv-layout-flex:not(.bv-native-layout) {
	display: flex !important;
	flex-direction: var(--bv-direction, row) !important;
	flex-wrap: wrap !important;
}
.bv-layout-grid:not(.bv-native-layout) {
	display: grid !important;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--bv-track, 14rem)), 1fr)) !important;
	justify-items: stretch;
}
.bv-layout-grid.bv-fixed-grid:not(.bv-native-layout) {
	grid-template-columns: repeat(var(--bv-columns), minmax(0, 1fr)) !important;
}
.bv-layout-grid.wp-block-columns > .wp-block-column { min-width: 0; }
:is(.bv-layout-flex, .bv-layout-grid) > * { min-width: 0; }
/* A full-width preset widens the block's surface. The boxed preset sets a
   separate inner rail using padding, keeping the existing Flex or Grid layout. */
:is(.bv-width-full-boxed, .bv-width-full-full) {
	box-sizing: border-box;
	max-width: none !important;
	--bv-bleed-left: 0px;
	--bv-bleed-right: 0px;
}
.bv-width-full-boxed {
	--bv-content-inset: max(0px, calc((100% + var(--bv-bleed-left) + var(--bv-bleed-right) - var(--bv-width, var(--wp--style--global--content-size, 72rem))) / 2));
	padding-left: max(var(--bv-padding-left, var(--wp--style--root--padding-left, 16px)), var(--bv-content-inset)) !important;
	padding-right: max(var(--bv-padding-right, var(--wp--style--root--padding-right, 16px)), var(--bv-content-inset)) !important;
}
.bv-width-full-full {
	padding-left: var(--bv-padding-left, 0px);
	padding-right: var(--bv-padding-right, 0px);
}
/* Percentage padding is based on the containing block's width. Add back the
   root padding where WordPress has expanded a section with negative margins. */
.has-global-padding > .bv-width-full-boxed.alignfull {
	--bv-bleed-left: var(--wp--style--root--padding-left, 0px);
	--bv-bleed-right: var(--wp--style--root--padding-right, 0px);
}
.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) > .bv-width-full-boxed.alignfull {
	--bv-bleed-left: 0px;
	--bv-bleed-right: 0px;
}
:is(.bv-width-full-boxed, .bv-width-full-full).is-layout-constrained > :not(.alignleft, .alignright) {
	max-width: none;
}
.bv-content-lane:has(> :is(.bv-width-full-boxed, .bv-width-full-full)) {
	max-width: none !important;
}
.has-global-padding > .bv-content-lane:not(.alignfull):has(> :is(.bv-width-full-boxed, .bv-width-full-full)) {
	margin-left: calc(var(--wp--style--root--padding-left, 0px) * -1) !important;
	margin-right: calc(var(--wp--style--root--padding-right, 0px) * -1) !important;
}
.has-global-padding > .bv-content-lane:not(.alignfull).has-global-padding:has(> :is(.bv-width-full-boxed, .bv-width-full-full)) {
	padding-left: var(--wp--style--root--padding-left, 0px);
	padding-right: var(--wp--style--root--padding-right, 0px);
}
.has-global-padding > .bv-content-lane:not(.alignfull).has-global-padding > :is(.bv-width-full-boxed, .bv-width-full-full) {
	margin-left: calc(var(--wp--style--root--padding-left, 0px) * -1);
	margin-right: calc(var(--wp--style--root--padding-right, 0px) * -1);
	--bv-bleed-left: var(--wp--style--root--padding-left, 0px);
	--bv-bleed-right: var(--wp--style--root--padding-right, 0px);
}
.bv-width-full-full.wp-block-cover > .wp-block-cover__inner-container {
	width: 100%;
}
.bv-width-boxed-boxed {
	box-sizing: border-box;
	width: min(100%, var(--bv-width, var(--wp--style--global--content-size, 72rem)));
	margin-inline: auto !important;
}
.bv-layout-grid.bv-grid-justified {
	grid-template-columns: repeat(auto-fit, min(100%, var(--bv-track, 14rem))) !important;
}
.bv-layout-grid.bv-grid-justified.bv-fixed-grid {
	grid-template-columns: repeat(var(--bv-columns), minmax(0, min(calc((100% - (var(--bv-columns) - 1) * var(--bv-gap, var(--wp--style--block-gap, 1rem))) / var(--bv-columns)), var(--bv-track, 14rem)))) !important;
}

/* Starter columns are native Groups with a responsive flex basis. */
.bv-layout-flex:not(.bv-layout-vertical) > :is(.bv-layout-column, .wp-block-column) { flex: 100 1 0 !important; }
.bv-layout-flex:not(.bv-layout-vertical) > .bv-layout-column-wide { flex-grow: 200 !important; }
.bv-layout-flex:not(.bv-layout-vertical) > .bv-column-sized { flex-grow: var(--bv-column-width, 100) !important; }
.bv-has-background-image {
	background-image: var(--bv-background-image) !important;
	background-size: var(--bv-background-size, cover) !important;
	background-position: var(--bv-background-position, center) !important;
	background-attachment: var(--bv-background-attachment, scroll) !important;
	background-repeat: var(--bv-background-repeat, no-repeat) !important;
}
.bv-custom-attachment { background-attachment: var(--bv-background-attachment) !important; }
/* Keep a boxed row centered when an all-sides responsive margin is set. */
.bv-width-boxed-boxed.bv-width-boxed-boxed.bv-width-boxed-boxed.bv-width-boxed-boxed {
	margin-inline: auto !important;
}
.wp-site-blocks > main.bv-compact-template-main { margin-top: 0 !important; }
.wp-site-blocks > main > .bv-compact-template-content { padding-top: 0 !important; padding-bottom: 0 !important; }
header.wp-block-template-part > .wp-block-columns:not([style],[id],.has-background,.has-custom-css,[class*=" bv-"]):has(> .wp-block-column:empty):not(:has(> .wp-block-column:not(:empty), > :not(.wp-block-column), > .wp-block-column:is([id],[style],.has-background,[class*=" bv-"]))) { display: none; }

/* A nested full-width preset fills its own parent lane without negative bleed. */
:is(.bv-width-full-boxed, .bv-width-full-full).bv-nested-section,
.has-global-padding > :is(.bv-width-full-boxed, .bv-width-full-full).bv-nested-section.alignfull {
	min-width: 0;
	margin-inline: 0 !important;
	--bv-bleed-left: 0px;
	--bv-bleed-right: 0px;
}
@media(max-width:1024px){.bv-layout-grid.bv-fixed-grid, .bv-layout-grid.bv-grid-justified.bv-fixed-grid{grid-template-columns:repeat(min(2,var(--bv-columns)),minmax(0,1fr)) !important}}@media(max-width:600px){.bv-layout-grid.bv-fixed-grid, .bv-layout-grid.bv-grid-justified.bv-fixed-grid{grid-template-columns:minmax(0,1fr) !important}.bv-layout-flex:not(.bv-layout-vertical) > :is(.bv-layout-column,.wp-block-column){flex-basis:100% !important}}