/*
 * Meridian location pages: WordPress fit.
 * Loaded only on the 14 location pages, after meridian-content.css.
 * Nothing here targets the site header, menus or footer.
 */

/* Let the page body run edge to edge between the existing header and footer. */
body.meridian-location-page .site-main,
body.meridian-location-page .site-main > .page-content {
	max-width: 100% !important;
	width: 100%;
	margin: 0;
	padding-inline: 0 !important;
}

/* The body already carries the page's single H1. */
body.meridian-location-page .site-main > .page-header {
	display: none;
}

/* Keep the page's own layering below the site's sticky header and dropdowns. */
#meridian-page {
	position: relative;
	isolation: isolate;
	overflow-wrap: break-word;
	/* Start from browser defaults rather than the theme's body typography. */
	font-size: 1rem;
	font-weight: 400;
	font-style: normal;
	letter-spacing: normal;
	word-spacing: normal;
	text-transform: none;
	text-align: start;
	text-shadow: none;
}

#meridian-page summary {
	cursor: pointer;
}

/*
 * The site header floats over the top of the page, so the first section starts
 * below it. The script printed after the header supplies the measured height
 * (0 for a header that sits in the normal flow); the values here are this site's
 * header heights, used until the script has run.
 */
#meridian-page > div > section:first-child {
	padding-top: var(--meridian-header-offset, 112px);
}
@media (max-width: 1024px) {
	#meridian-page > div > section:first-child {
		padding-top: var(--meridian-header-offset, 98px);
	}
}
@media (max-width: 767px) {
	#meridian-page > div > section:first-child {
		padding-top: var(--meridian-header-offset, 90px);
	}
}

/* FAQ open / close motion (the original accordion animation), for native <details>. */
@supports (interpolate-size: allow-keywords) {
	#meridian-page {
		interpolate-size: allow-keywords;
	}
	#meridian-page details::details-content {
		block-size: 0;
		opacity: 0;
		overflow: hidden;
		transition: block-size 0.25s ease-out, opacity 0.25s ease-out, content-visibility 0.25s allow-discrete;
	}
	#meridian-page details[open]::details-content {
		block-size: auto;
		opacity: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	#meridian-page details::details-content {
		transition: none;
	}
}

/*
 * Theme and Elementor global styles usually set heading / text colour, font,
 * case and spacing site-wide. Inside the design these follow the design instead.
 * (:where keeps these weaker than every class in meridian-content.css.)
 */
#meridian-page :where(h1, h2, h3, h4, h5, h6, p, a, li, dt, dd, summary, button, blockquote, figcaption) {
	color: inherit;
	font-family: inherit;
	line-height: inherit;
	text-transform: inherit;
	letter-spacing: inherit;
	font-style: inherit;
	word-spacing: inherit;
	text-shadow: none;
}
#meridian-page :where(img, svg) {
	border-radius: 0;
	box-shadow: none;
}

/* Photo frames show a soft tone, not a white block, while a photo is still loading. */
#meridian-page img[src*="meridian-"] {
	background-color: hsl(205 30% 88%);
}
