/*
 * Davis & Associates - accessibility & performance corrections
 * Loaded by wp-content/novamira-sandbox/gld-pagespeed-fixes.php
 *
 * DESIGN CONSTRAINT: the site must look exactly as it did before this work.
 * Nothing in this file may change the rendered appearance of the page.
 *
 * That rules out the CSS fixes for three Lighthouse audits, which are left
 * failing on purpose and reported to the client instead:
 *   - color-contrast      body copy is #9b9b9b on white (2.77:1) and the gold
 *                         CTA buttons are #ffffff on #c8a472 (2.33:1). Both
 *                         need a colour change, which is a brand decision.
 *   - link-in-text-block  in-copy links are told apart by colour alone; the
 *                         fix is an underline, which is visible.
 *   - target-size         the review slider dots are 4-8px; enlarging the hit
 *                         area shifts the pager layout.
 *
 * Everything that remains here is invisible to a sighted visitor.
 */

/* ------------------------------------------------------------------
 * YouTube facade (audits: third-party-summary, total-byte-weight,
 * bootup-time, third-party-cookies)
 *
 * The embedded videos pulled ~2 MB and 4.3 s of main-thread time on every page
 * load before anyone pressed play - 10 of them on the FAQ page alone. The PHP
 * filter swaps each iframe for this poster; the real player is injected on
 * click.
 *
 * Styled to match what an unplayed YouTube embed already looks like: the same
 * video thumbnail, 16:9, on black, with a centred play button.
 * ------------------------------------------------------------------ */
.gld-yt {
	position: relative;
	width: 100%;
	max-width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
	overflow: hidden;
}

.gld-yt__btn {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	padding: 0;
	margin: 0;
	border: 0;
	background: none;
	cursor: pointer;
}

.gld-yt__thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.gld-yt__icon {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 68px;
	height: 48px;
	margin: -24px 0 0 -34px;
	border-radius: 12px;
	background: rgba(33, 33, 33, 0.8);
	transition: background 0.15s ease-in-out;
}

.gld-yt__icon::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	margin: -10px 0 0 -5px;
	border-style: solid;
	border-width: 10px 0 10px 17px;
	border-color: transparent transparent transparent #fff;
}

.gld-yt__btn:hover .gld-yt__icon,
.gld-yt__btn:focus-visible .gld-yt__icon {
	background: #f00;
}

.gld-yt iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}
