@use "@wordpress/base-styles/variables" as *;

/**
 * Group: All Alignment Settings
 */
.wp-block-group {
	// Ensure not rendering outside the element
	// as -1px causes overflow-x scrollbars
	.block-editor-block-list__insertion-point {
		left: 0;
		right: 0;
	}
}

// Place block list appender in the same place content will appear.
[data-type="core/group"].is-selected {
	.block-list-appender {
		margin-left: 0;
		margin-right: 0;
	}

	.has-background .block-list-appender {
		margin-top: $block-padding + $grid-unit-05;
		margin-bottom: $block-padding + $grid-unit-05;
	}
}

// Affect the appender of the Row and Stack variants.
.wp-block-group.is-layout-flex.block-editor-block-list__block > .block-list-appender:only-child {
	gap: inherit;

	&,
	.block-editor-default-block-appender__content,
	.block-editor-inserter {
		display: inherit;
		width: 100%;
		flex-direction: inherit;
		flex: 1;
	}

	&::after {
		content: "";
		display: flex;
		flex: 1 0 $button-size-next-default-40px;
		pointer-events: none;
		min-height: $button-size-next-default-40px - $border-width - $border-width;
		border: $border-width dashed currentColor;
	}

	// Let the parent be selectable in the placeholder area.
	pointer-events: none;
	.block-editor-inserter,
	.block-editor-button-block-appender {
		pointer-events: all;
	}
}

