/*
 * HDR-9: floating pill. A rounded bar that floats over the top of the page and
 * stays there while the page scrolls. The first section of the page runs up
 * behind it (header-over.css).
 */

.wp-site-blocks:has(> header > .wprk-hdr-9) {
	--wprk-header-over: 5rem;
}

.wprk-hdr-9 {
	background: none;
	border-block-end: 0;
	padding-block-start: 0.75rem;
}

/* Only the bar itself takes the pointer: the page around it can be clicked. Not in the editor. */
.wp-site-blocks:not(.is-root-container) .wprk-hdr-9 {
	pointer-events: none;
}

.wprk-hdr-9 > .wprk-header__bar {
	border-radius: 2.25rem;
	isolation: isolate;
	min-height: 4rem;
	padding-block: 0.375rem;
	padding-inline: 1.5rem 0.5rem;
	pointer-events: auto;
	position: relative;
}

/*
 * The bar's own surface is drawn behind it, not on it. A blur on the bar itself
 * would make the bar the frame of the phone menu, which must fill the screen.
 */
.wprk-hdr-9 > .wprk-header__bar::before {
	-webkit-backdrop-filter: saturate(1.4) blur(14px);
	backdrop-filter: saturate(1.4) blur(14px);
	background-color: color-mix(in srgb, var(--wp--preset--color--base) 94%, transparent);
	border: 1px solid var(--wprk-border);
	border-radius: inherit;
	box-shadow:
		0 1rem 2.25rem -1rem color-mix(in srgb, var(--wp--preset--color--dark) 30%, transparent),
		0 1px 2px color-mix(in srgb, var(--wp--preset--color--dark) 8%, transparent);
	content: "";
	inset: 0;
	pointer-events: none;
	position: absolute;
	z-index: -1;
}

.wprk-hdr-9 .wprk-header__brand :where(.wp-block-site-title) {
	white-space: nowrap;
}

.wprk-hdr-9 .wp-block-site-logo img {
	height: auto;
	max-height: 2.5rem;
	object-fit: contain;
	width: auto;
}

/* The button of a pill is a pill, whatever the theme's buttons are. */
.wprk-hdr-9 .wprk-header__nav .wp-block-buttons {
	flex-shrink: 0;
}

.wprk-hdr-9 .wprk-header__nav .wp-block-button__link {
	border-radius: 999px;
	padding: 0.6em 1.35em;
	white-space: nowrap;
}

/*
 * A tablet: the menu alone; the menu has its own link to the contact page.
 * Under 900 px it stands a little closer together. Narrower than 782 px the
 * menu is behind its button (menu.css) and the pill's button has room again.
 * On the site only: in the editor, whose canvas is often this narrow, the
 * button stays in view and can be changed.
 */
@media (min-width: 782px) and (max-width: 1023px) {
	.wp-site-blocks:not(.is-root-container) .wprk-hdr-9 > .wprk-header__bar {
		padding-inline-end: 1.5rem;
	}

	.wp-site-blocks:not(.is-root-container) .wprk-hdr-9 .wprk-header__nav .wp-block-buttons {
		display: none;
	}
}

@media (min-width: 782px) and (max-width: 899px) {
	.wprk-hdr-9 .wp-block-navigation,
	.wprk-hdr-9 .wp-block-navigation .wp-block-navigation__container {
		column-gap: 1rem;
		font-size: 0.9375rem;
	}
}

@media (max-width: 599px) {
	.wprk-hdr-9 > .wprk-header__bar {
		min-height: 3.5rem;
		padding-inline: 1.1rem 0.4rem;
	}

	.wp-site-blocks:has(> header > .wprk-hdr-9) {
		--wprk-header-over: 4.5rem;
	}
}
