/*
 * The form builder fills the window below WordPress's bar and beside its
 * menu, as the email editor does (docs/form-builder.md §7): 160px from the
 * left, 36px with the menu folded (by hand, or by WordPress between 783px
 * and 960px), 0 under 782px where the bar is 46px tall. It sits under
 * WordPress's menu and bar, so their flyouts and the phone menu open over
 * it; the kit's dialogs, menus and the Media library sit above it.
 */
.mailpuff-builder {
	position: fixed;
	top: 32px;
	right: 0;
	bottom: 0;
	left: 160px;
	z-index: 9989;
	display: flex;
	flex-direction: column;
	background: var(--page, #f5f5f8);
}

.folded .mailpuff-builder {
	left: 36px;
}

.rtl .mailpuff-builder {
	right: 160px;
	left: 0;
}

.rtl.folded .mailpuff-builder {
	right: 36px;
}

@media screen and (max-width: 960px) {
	.auto-fold .mailpuff-builder {
		left: 36px;
	}

	.rtl.auto-fold .mailpuff-builder {
		right: 36px;
		left: 0;
	}
}

@media screen and (max-width: 782px) {
	.mailpuff-builder,
	.folded .mailpuff-builder,
	.auto-fold .mailpuff-builder,
	.rtl .mailpuff-builder {
		top: 46px;
		right: 0;
		left: 0;
	}
}

/* While it is open, the page under it stays still and WordPress's footer
   stays out of the way. */
body.mailpuff-builder-open {
	overflow: hidden;
}

body.mailpuff-builder-open #wpfooter {
	display: none;
}
