/**
 * Mevotech Parts: page-level values of the results and part pages (the previous site's body and
 * Bootstrap container: text colour, line height 1.5, the body font sizes by breakpoint, the container
 * widths). Scoped to the parts pages; the theme's values stay everywhere else.
 *
 * @license GPL-2.0-or-later
 */

/* Two ladders: the outer container (the bar padding) and the content width inside main (container − 30). */
.mevo-parts-page,
.mevo-parts-section--bar {
	--mevo-parts-container: 100%;
	--mevo-parts-content: none;
}
@media (min-width: 576px) {
	.mevo-parts-page,
	.mevo-parts-section--bar {
		--mevo-parts-container: 540px;
		--mevo-parts-content: 510px;
	}
}
@media (min-width: 768px) {
	.mevo-parts-page,
	.mevo-parts-section--bar {
		--mevo-parts-container: 720px;
		--mevo-parts-content: 690px;
	}
}
@media (min-width: 992px) {
	.mevo-parts-page,
	.mevo-parts-section--bar {
		--mevo-parts-container: 960px;
		--mevo-parts-content: 930px;
	}
}
@media (min-width: 1200px) {
	.mevo-parts-page,
	.mevo-parts-section--bar {
		--mevo-parts-container: 1140px;
		--mevo-parts-content: 1110px;
	}
}
@media (min-width: 1400px) {
	.mevo-parts-page,
	.mevo-parts-section--bar {
		--mevo-parts-container: 1320px;
		--mevo-parts-content: 1290px;
	}
}
@media (min-width: 1600px) {
	.mevo-parts-page,
	.mevo-parts-section--bar {
		--mevo-parts-container: 1380px;
		--mevo-parts-content: 1350px;
	}
}

/* The container's 15 px gutters; no top padding (the side column and the part block carry the old offsets). */
.mevo-parts-page.has-global-padding {
	padding-top: 0;
	padding-right: 15px;
	padding-left: 15px;
}
.mevo-parts-page.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
	max-width: var(--mevo-parts-content);
}

/* Bar and spacer are direct children of the site root: no root block gap above them. */
.wp-site-blocks > .mevo-parts-section--bar,
.wp-site-blocks > .mevo-parts-bar-spacer {
	margin-block-start: 0;
}

/* Body values of the previous site (Bootstrap 1.5, #25282a; 16 / 14 / 13 / 15 / 16 px by breakpoint). */
.mevo-parts-page {
	display: flow-root; /* the part block's 48 px stay inside main (main's top = the bar's bottom) */
	color: #25282a;
	font-size: 16px;
	line-height: 1.5;
}
@media (min-width: 768px) {
	.mevo-parts-page {
		font-size: 14px;
	}
}
@media (min-width: 992px) {
	.mevo-parts-page {
		font-size: 13px;
	}
}
@media (min-width: 1200px) {
	.mevo-parts-page {
		font-size: 15px;
	}
}
@media (min-width: 1440px) {
	.mevo-parts-page {
		font-size: 16px;
	}
}

/* In-page links scroll smoothly, as on the previous site (its style.css 19-21: html { scroll-behavior: smooth });
   instant with reduced motion. bar.js scrolls with behavior "instant" explicitly. */
@media (prefers-reduced-motion: no-preference) {
	html:has(.mevo-parts-page) {
		scroll-behavior: smooth;
	}
}

/* Headings: Bootstrap's line height 1.2 and the body text colour (the theme's 1.15 and dark token stay elsewhere).
   Block rules for headings with their own colour (category, filter and documents titles) load later and win. */
.mevo-parts-page :where(h1, h2, h3, h4, h5, h6) {
	color: inherit;
	line-height: 1.2;
}

/* Focus and jump targets land below the bar wherever it can be fixed (bar.js sets the closed bar's height, so an
   open panel never enlarges the padding). Applied whether or not the bar is fixed at that moment: a jump from the
   top fixes the bar on arrival. */
@media (min-width: 768px) and (min-height: 600px) {
	html:has(.mevo-parts-section--bar) {
		scroll-padding-top: var(--mevo-parts-bar-h, 0px);
	}
}
