/**
 * Overlay — core/group block style (shared: editor + front end).
 *
 * The `is-style-overlay` class is applied by the block style (and pre-seeded by
 * the inserter variation). `le-overlay` is the pre-2026-08-31 marker, kept as a
 * permanent alias so patterns and already-published pages that still carry it
 * keep rendering. These two rules are the entire behavior, and they must render
 * identically in the editor and on the front end.
 */

/*
 * The overlay's IMMEDIATE parent becomes the positioning context. The `>` child
 * combinator matches only the direct container — exactly the block the overlay
 * is nested in, and nothing higher up. The selector is intentionally
 * element-agnostic so it adapts per context: on the front end it anchors to the
 * container block itself (e.g. .wp-block-group); in the editor it anchors to the
 * block's inner layout wrapper. Wrapped in :where() to keep specificity at 0 so
 * that if a user sets their own Position on the parent via the native control,
 * that always wins.
 */
:where(:has(> .wp-block-group.is-style-overlay, > .le-overlay)) {
	position: relative;
}

/* The overlay fills that container and stacks above its in-flow siblings. */
.wp-block-group.is-style-overlay,
.le-overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
}
