/*
 * Stand-in: the phone header bar hides on scroll down and returns on scroll up (Nova Blocks Header). See
 * nova-mobile-header-autohide.php for the issue. Keyed on the Header block's token `has-mobile-bar-autohide`, reached
 * from the bar and the menu button (preceding siblings of the header element) with `:has(~ …)`; below 1024 px only.
 * The script sets `data-pxg-mobile-bar="hidden"` on the root element; the bar and the button move up by their own
 * height plus the bar's shadow (Nova's --shadow-y-offset and --shadow-blur on the bar), with the theme's transition
 * duration and easing, on `transform` only. Under reduced motion nothing animates (and the script never hides).
 */
@media not screen and (min-width: 1024px) {
	:is(.nb-header--mobile, .c-menu-toggle):has(~ .nb-header--main.has-mobile-bar-autohide) {
		transition: transform var(--theme-transition-duration, 0.4s) var(--theme-transition-easing, ease);
	}

	:root[data-pxg-mobile-bar="hidden"] :is(.nb-header--mobile, .c-menu-toggle):has(~ .nb-header--main.has-mobile-bar-autohide) {
		transform: translateY(calc(-100% - var(--shadow-y-offset, 0px) - var(--shadow-blur, 0px)));
	}
}

@media (prefers-reduced-motion: reduce) {
	:is(.nb-header--mobile, .c-menu-toggle):has(~ .nb-header--main.has-mobile-bar-autohide) {
		transition: none;
	}
}
