/* Front end only: these rules would get in the way inside the editor. */

:root { --mor-header: 145px; --mor-adminbar: 0px; }
.admin-bar { --mor-adminbar: 32px; }

html { scroll-padding-top: calc(var(--mor-header) - 40px); }

@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}

/* No lighter strip under the footer when the contact page is shorter than the window. */
body:has(.mor-contact) { background-color: #000; }

header.wp-block-template-part {
	position: fixed;
	top: var(--mor-adminbar);
	left: 0;
	right: 0;
	z-index: 1000;
	background-color: rgba(0, 0, 0, 0);
}

html.mor-scrolled header.wp-block-template-part {
	background-color: rgba(0, 0, 0, 0.25);
}

@media (prefers-reduced-motion: no-preference) {
	header.wp-block-template-part { transition: background-color 0.3s ease; }
}

@media (max-width: 899px) {
	:root { --mor-header: 88px; }
}

@media (max-width: 782px) {
	.admin-bar { --mor-adminbar: 46px; }
}

@media (max-width: 600px) {
	/* The WordPress toolbar scrolls away on small screens. */
	html.mor-scrolled .admin-bar { --mor-adminbar: 0px; }
}
