/*
 * A header that lies over the top of the page: the floating pill (HDR-9), the
 * overlay header (HDR-10), and any header whose outer Group has the class
 * wprk-header-over.
 *
 * The header region takes no room of its own. The first thing on the page
 * makes the room inside its own background, so a picture or a tinted section
 * runs up to the top edge of the screen. The header says how much room it
 * needs in --wprk-header-over, as a fixed size: a measured one would move the
 * page after it had been drawn.
 *
 * Not in the editor (its page has the class is-root-container), where the
 * header stands in the page like any other.
 */

.wp-site-blocks:not(.is-root-container) > header.wp-block-template-part:has(> .wprk-header-over) {
	box-shadow: none;
	height: 0;
}

/* A header that does not stick still lies over the page. */
.wp-site-blocks:not(.is-root-container) > header.wp-block-template-part:has(> .wprk-header-over.wprk-header-static) {
	position: relative;
	z-index: 50;
}

/* A section makes the room with a see-through border: its background fills it. */
.wp-site-blocks:not(.is-root-container) > header:has(> .wprk-header-over) + main > :first-child:not(.entry-content),
.wp-site-blocks:not(.is-root-container) > header:has(> .wprk-header-over) + main > .entry-content:first-child > :first-child {
	border-block-start: var(--wprk-header-over, 5rem) solid transparent;
}

/*
 * A picture does not reach under a border, so a Cover makes the room inside
 * itself. The slideshow hero (HERO-4) is a row of Covers: each slide does.
 */
.wp-site-blocks:not(.is-root-container) > header:has(> .wprk-header-over) + main > :is(.wp-block-cover, .wprk-hero-4):first-child,
.wp-site-blocks:not(.is-root-container) > header:has(> .wprk-header-over) + main > .entry-content:first-child > :is(.wp-block-cover, .wprk-hero-4):first-child {
	border-block-start: 0;
}

.wp-site-blocks:not(.is-root-container) > header:has(> .wprk-header-over) + main > .wp-block-cover:first-child > .wp-block-cover__inner-container,
.wp-site-blocks:not(.is-root-container) > header:has(> .wprk-header-over) + main > .entry-content:first-child > .wp-block-cover:first-child > .wp-block-cover__inner-container,
.wp-site-blocks:not(.is-root-container) > header:has(> .wprk-header-over) + main > .wprk-hero-4:first-child .wprk-hero-4__slide > .wp-block-cover__inner-container,
.wp-site-blocks:not(.is-root-container) > header:has(> .wprk-header-over) + main > .entry-content:first-child > .wprk-hero-4:first-child .wprk-hero-4__slide > .wp-block-cover__inner-container {
	padding-block-start: var(--wprk-header-over, 5rem);
}
