/**
 * LH 2015: layout for pages rendered through a block template.
 *
 * Block templates render inside .wp-site-blocks rather than #page, and their
 * main element has no .site-content, .site-main or .hentry wrappers. These
 * rules make main a content card like a classic page's .hentry at each
 * breakpoint. The sidebar column (#sidebar) and footer (.site-footer) keep
 * Twenty Fifteen's own rules, since the chrome blocks output the same markup.
 * The small-screen header behaviour is shared with classic pages, so it is
 * printed inline on every page (LH_2015_Block_Templates::header_part_css()).
 *
 * .wp-site-blocks clears its floats like #page, so its height includes the
 * floated footer: scripts/functions.js pins the sidebar only when the page
 * wrapper is taller than the sidebar, and without the clearing a short page
 * (no search results, the 404) measured no taller, left the sidebar in the
 * flow and pushed the footer below it.
 *
 * Percentages are of .wp-site-blocks, derived from Twenty Fifteen's
 * .site-content, .site-main, .hentry and .entry-content values, with LH 2015's
 * zero top padding on .site-main at desktop widths.
 *
 * Since 2.14.0 classic cards use core's constrained layout, and constrained
 * blocks get the theme.json root padding. main supplies the card padding
 * here, so a constrained block directly inside it (post-content) does not
 * add the padding again, and main's other children (post title, meta
 * blocks) sit in the same centred content column as the post content. A
 * template whose main group is itself constrained would make these two
 * rules unnecessary.
 *
 * Loaded only when a block template is rendering.
 */

.wp-site-blocks::after {
	clear: both;
	content: "";
	display: table;
}

/* Small screens: a full-width card, like .hentry with .entry-content padding. */
.wp-site-blocks > main {
	background-color: #fff;
	padding: 7.6923%;
}

/* post-content carries .entry-content for its typography; main supplies the padding. */
.wp-site-blocks > main .entry-content {
	padding: 0;
}

.wp-site-blocks > main > .has-global-padding {
	padding-right: 0;
	padding-left: 0;
}

.wp-site-blocks > main > :not(.has-global-padding):not(.alignfull):not(.alignwide) {
	margin-right: auto;
	margin-left: auto;
	max-width: var(--wp--style--global--content-size);
}

/* Tablet: an inset card with a shadow. */
@media screen and (min-width: 38.75em) {
	.wp-site-blocks > main {
		box-shadow: 0 0 1px rgba(0, 0, 0, 0.15);
		margin: 7.6923%;
	}
}

/* Desktop: centred like .site, the card filling the content column beside the sidebar. */
@media screen and (min-width: 59.6875em) {
	.wp-site-blocks {
		margin: 0 auto;
		max-width: 1403px;
	}

	.wp-site-blocks > main {
		float: left;
		margin: 0 0 5.4299% 29.4118%;
		padding: 5.8824% var(--lh-2015-card-padding);
		width: 70.5882%;
	}
}
