/* Opt-in slot owned by this site theme. Custom template parts are unaffected. */
.aws-starter-header-slot {
	background: var(--wp--custom--aws--color--menu-background);
	color: var(--wp--custom--aws--color--menu-text);
}

.aws-starter-header-slot.is-aws-sticky {
	position: sticky;
	top: var(--aws-site-header-admin-offset, 0);
	z-index: 20;
}

.aws-starter-header-slot .aws-starter-header {
	padding-block: var(--wp--preset--spacing--20);
	border-bottom: 1px solid var(--wp--custom--aws--color--border);
}

.aws-starter-header-slot .aws-starter-header-inner > * {
	margin-block: 0;
}

.aws-starter-header-slot .wp-block-site-title {
	min-width: 0;
	overflow-wrap: anywhere;
}

.aws-starter-header-slot .wp-block-site-logo img {
	width: auto;
	max-height: 3.5rem;
}

.aws-starter-header-slot .aws-starter-navigation {
	flex-shrink: 0;
}

.aws-starter-header-slot .aws-starter-navigation .wp-block-navigation-item__content {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
}

.aws-starter-header-slot .aws-starter-navigation button {
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
}

html:has(.aws-starter-header-slot.is-aws-sticky) {
	--aws-site-header-admin-offset: 0px; /* stylelint-disable-line length-zero-no-unit -- Substituted as a length inside calc(). */
	scroll-padding-top: calc(var(--aws-site-header-height, 6rem) + var(--aws-site-header-admin-offset, 0px) + 1rem);
}

/* The native toolbar scrolls away on phones and stays fixed above 600 px. */
@media (min-width: 601px) {

	html:has(body.admin-bar .aws-starter-header-slot.is-aws-sticky) {
		--aws-site-header-admin-offset: var(--wp-admin--admin-bar--height, 32px);
	}
}

/* With no script, keep the full native navigation in the document flow. */
@media (scripting: none) {

	.aws-starter-header-slot :is(.wp-block-navigation__responsive-container-open, .wp-block-navigation__responsive-container-close) {
		display: none;
	}

	.aws-starter-header-slot.is-aws-sticky {
		position: static;
	}

	.aws-starter-header-slot .aws-starter-navigation {
		flex-basis: 100%;
		min-width: 0;
	}

	.aws-starter-header-slot .wp-block-navigation__container {
		flex-wrap: wrap;
		justify-content: flex-start;
	}

	html:has(.aws-starter-header-slot.is-aws-sticky) {
		scroll-padding-top: 1rem;
	}
}
