/* Only this theme shell enlarges. Viewport overlays and native WP chrome do not. */
:root {
	--nh-display-ready: 1;
}

html.nh-display-enabled.nh-display-classic-scrollbar {
	scrollbar-gutter: stable;
}

.nh-display-host {
	position: relative;
}

.nh-display-host > *,
.nh-display-canvas > * {
	margin-block-start: 0;
}

@media screen {
	.nh-display-canvas {
		/* A reserved root gutter changes native vw resolution. Preserve the
		 * original viewport lengths in ordinary/Compact and the logical Full
		 * composition, without changing any real viewport media queries. */
		--nh-canvas-vw: var(--nh-display-vw, 1vw);
	}

	html[data-nh-display="full"] .nh-display-canvas {
		width: 1280px;
		zoom: var(--nh-display-scale);
	}

	/* The original footer is full bleed in Compact; its logical Full gutters
	 * match the 1280px composition instead of using the enlarged viewport. */
	html[data-nh-display="full"] .nh-footer {
		padding-inline: 20px;
	}
}

.nh-display-select {
	display: flex;
	width: 184px;
	height: 26px;
	min-height: 26px;
	margin-block-start: 10px;
	padding: 1px 10px;

	/* Keep readable viewport-sized controls inside the enlarged footer. */
	zoom: calc(1 / var(--nh-display-scale, 1));
	border: 1px solid var(--nh-teal);
	border-radius: 6px;
	background: #fff;
	color: var(--nh-teal);
	font: 14px/1.3 'Inter Tight', Arial, sans-serif;
	transition: background-color 160ms ease, color 160ms ease;
}

.nh-footer-brand:has(> .nh-display-select:not([hidden])) {
	/* Keep the existing 60px logo and description positions. The first footer
	 * row is 206px plus the legal text's 20px inset; center in the remainder
	 * independently of font wrapping and the viewport-sized select. */
	display: grid;
	grid-template-rows: 60px auto 1fr;
	min-height: 226px;
}

.nh-footer .nh-display-select {
	align-self: center;
	margin-block: 0;
}

.nh-display-select:hover {
	background: var(--nh-cream);
}

.nh-display-select:focus-visible {
	outline: 3px solid var(--nh-teal);
	outline-offset: 4px;
}

.nh-footer .nh-display-select:focus-visible {
	outline-color: #fff;
}

.nh-display-select[hidden] {
	display: none;
}

.nh-display-select-standalone {
	position: relative;
	margin: 12px 20px;
}

@supports (appearance: base-select) {
	.nh-display-select,
	.nh-display-select::picker(select) {
		appearance: base-select;
	}

	.nh-display-select::picker(select) {
		border: 1px solid var(--nh-teal);
		border-radius: 6px;
		background: #fff;
		color: var(--nh-teal);
		opacity: 0;
		transition: opacity 160ms ease, display 160ms allow-discrete, overlay 160ms allow-discrete;
	}

	.nh-display-select::picker(select):popover-open {
		opacity: 1;
	}

	.nh-display-select option {
		padding: 10px;
	}

	@starting-style {
		.nh-display-select::picker(select):popover-open {
			opacity: 0;
		}
	}
}

@media (prefers-reduced-motion: reduce) {
	.nh-display-select,
	.nh-display-select::picker(select) {
		transition: none;
	}
}

@media (forced-colors: active) {
	.nh-display-select {
		border-color: ButtonText;
	}
}

@media print {
	.nh-display-select {
		display: none;
	}
}
