/* Image Inner Blocks — the image figure must be a positioning context so its
   absolutely-positioned badge children anchor to it. Loaded in editor + front end. */

/* Front end: badges are injected inside <figure class="wp-block-image …"> */
figure.wp-block-image.has-theme-badges {
	position: relative;
}

/* Host box equals the image box; badges anchor to it via the overlay below. */
.le-image-badges-host {
	position: relative;
}

/* The badges' offset parent: one positioned overlay sized to the host (= the image box). */
.le-image-badges {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

/* Gutenberg's inner-block containers are positioned; neutralize them or one (zero-height) hijacks the badge's offset parent. */
.le-image-badges .block-editor-inner-blocks,
.le-image-badges .block-editor-block-list__layout,
.le-image-badges .block-editor-block-list__layout > .wp-block {
	position: static;
}

/* Clicks fall through the empty overlay to the image; badges stay clickable. */
.le-image-badges .wp-block-littleextra-badge {
	pointer-events: auto;
}
