.wp-block-group.has-lexleman-group-background {
	position: relative;
	isolation: isolate;
}

.wp-block-group.has-lexleman-group-background-offset {
	overflow: visible;
}

.wp-block-group.has-lexleman-group-background::before,
.lexleman-group-background-layer::before {
	content: "";
	position: absolute;
	z-index: -1;
	top: 0;
	bottom: 0;
	left: var(--lexleman-group-left, 0);
	right: var(--lexleman-group-right, auto);
	width: var(--lexleman-group-width, 60%);
	margin-inline: auto;
	/* Move the entire image layer, so the background itself is not cropped. */
	transform: translateY(var(--lexleman-group-offset-y, 0%));
	background-image: var(--lexleman-group-image);
	background-size: contain;
	background-position: var(--lexleman-group-side, left) var(--lexleman-group-vertical, 50%);
	background-repeat: no-repeat;
	opacity: var(--lexleman-group-opacity, 0.06);
	pointer-events: none;
}

/* Hide only this group's decoration; nested groups keep their own setting. */
@media (max-width: 767px) {
	.wp-block-group.has-lexleman-group-background-hidden-mobile::before,
	.wp-block-group.has-lexleman-group-background-hidden-mobile > .lexleman-group-background-layer {
		display: none;
	}
}

/* Separate the animation from the image's own opacity and positioning. */
.wp-block-group.has-lexleman-animated-background::before {
	content: none;
}

.wp-block-group.has-lexleman-group-background > .lexleman-group-background-layer {
	position: absolute;
	inset: 0;
	z-index: -1;
	isolation: isolate;
	width: auto;
	max-width: none;
	height: auto;
	margin: 0 !important;
	padding: 0;
	pointer-events: none;
}
