/**
 * RSF block layout — full-bleed bands and vertical spacing.
 */

.rsm-rsf-band {
	box-sizing: border-box;
}

.rsm-rsf-band--full {
	margin-inline: calc(50% - 50vw);
	max-width: 100vw;
	width: 100vw;
}

.rsm-rsf-band__inner {
	box-sizing: border-box;
	margin-inline: auto;
	max-width: var(--rsm-rsf-band-inner-width, var(--rsm-content-width, 90%));
	width: var(--rsm-rsf-band-inner-width, var(--rsm-content-width, 90%));
}

@media (max-width: 640px) {
	.rsm-rsf-band__inner {
		max-width: min(
			var(--rsm-rsf-band-inner-width, var(--rsm-content-width, 90%)),
			calc(100% - 32px)
		);
		width: min(
			var(--rsm-rsf-band-inner-width, var(--rsm-content-width, 90%)),
			calc(100% - 32px)
		);
	}
}

.block-editor-block-list__block.rsm-rsf-band--full {
	box-sizing: border-box;
	margin-inline: calc(50% - 50vw) !important;
	max-width: 100vw !important;
	width: 100vw !important;
}

.block-editor-block-list__block.rsm-rsf-band--full .block-editor-block-list__block-edit {
	margin-inline: auto;
	max-width: var(--rsm-content-width, 90%);
	width: var(--rsm-content-width, 90%);
}

/*
 * Layout band owns vertical rhythm. WordPress block Dimensions margins
 * (e.g. core/buttons margin-top presets) must not add extra gap on top of
 * Layout band spacing controls.
 */
.rsm-rsf-band__inner > :where(
	.rsm-rsf-block,
	.wp-block-buttons,
	.wp-block-group,
	.wp-block-heading,
	.wp-block-paragraph,
	section.rsm-cw
) {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}

.block-editor-block-list__block.rsm-rsf-band--full
	.block-editor-block-list__block-edit
	> :where(.block-editor-block-list__block, .wp-block) {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}
