/*
 * WordPress-specific additions. Kept apart from the original stylesheets so those stay byte-identical to the
 * approved site (easy to diff, easy to update). Nothing here should change how the original pages look.
 */

/* Visually hidden, still announced by screen readers (core class name used by WordPress itself). */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

/* Skip link: invisible until focused with the keyboard. Restyle with brand colours if the user asks. */
.skip-link:focus {
	clip: auto;
	clip-path: none;
	height: auto;
	width: auto;
	margin: 0;
	left: 8px;
	top: 8px;
	z-index: 100000;
	padding: 12px 18px;
	background: #fff;
	color: #111;
	font-size: 16px;
	line-height: 1.2;
	text-decoration: none;
	box-shadow: 0 0 0 2px #111;
}

/* Honeypot field of the contact form. */
.mpal-hp {
	position: absolute !important;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Result message of the contact form (empty until a submission). */
.form-status:empty {
	display: none;
}

/* Classes WordPress's classic editor can put inside the_content() of CPT entries and generic pages. */
.alignleft {
	float: left;
	margin: 0 1.5em 1em 0;
}

.alignright {
	float: right;
	margin: 0 0 1em 1.5em;
}

.aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.wp-caption {
	max-width: 100%;
}

.wp-caption-text {
	font-size: 0.875em;
}

@media (prefers-reduced-motion: reduce) {
	.skip-link:focus {
		transition: none;
	}
}

/* Contact enquiry (sent by the server): result line + invalid fields, in the site's colours. */
.enquiry .form-status {
	grid-column: 1 / -1;
	margin-top: 4px;
	font-size: 15px;
	color: #595959;
}

.enquiry .form-status--error,
.enquiry .form-status--invalid,
.enquiry .form-status--expired,
.enquiry .form-status--limited,
.enquiry .form-status--failed {
	color: #d0103a;
}

.enquiry [aria-invalid="true"] {
	border-color: #d0103a !important;
}

.enquiry[aria-busy="true"] .pill {
	opacity: 0.6;
	cursor: progress;
}

/* Tablet portrait (761-899px): the footer's 4 columns don't fit (the social icons ran off the screen) -> 2 x 2,
   as the original already does below 761px. */
@media (min-width: 761px) and (max-width: 899px) {
	#mp-footer > div:first-child {
		grid-template-columns: 1fr 1fr !important;
		gap: 48px 36px !important;
	}
}

/* The opening titles slide in from the side: clip that motion so the page never scrolls sideways while it plays. */
.page-head,
.about-opening {
	overflow-x: clip;
}
