/* Additions to the WordPress theme CSS for the EmDash port. */

/* Page bodies imported as inline HTML blocks keep the theme's own spacing. */
.emdash-html-block {
	margin: 0 !important;
}

/* [video] shortcode replacement: poster + play button, then the YouTube player */
.wp-video.yt-poster {
	max-width: 100%;
}
.yt-poster a {
	position: relative;
	display: block;
}
.yt-poster img,
.yt-poster iframe {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	border: 0;
}
.yt-play {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 68px;
	height: 48px;
	margin: -24px 0 0 -34px;
	border-radius: 12px;
	background: rgba(23, 35, 34, 0.75);
}
.yt-play::after {
	content: "";
	position: absolute;
	left: 27px;
	top: 14px;
	border-style: solid;
	border-width: 10px 0 10px 18px;
	border-color: transparent transparent transparent #fff;
}
.yt-poster a:hover .yt-play {
	background: #f00;
}

/* Replacement for the core image lightbox (Previous Schemes, Commendations) */
figure.wp-lightbox-container img {
	cursor: zoom-in;
}
.otn-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.95);
	cursor: zoom-out;
}
.otn-lightbox[hidden] {
	display: none;
}
.otn-lightbox img {
	max-width: 92vw;
	max-height: 92vh;
	object-fit: contain;
}
.otn-lightbox-close {
	position: absolute;
	top: 12px;
	right: 18px;
	border: 0;
	background: none;
	color: #000;
	font-size: 40px;
	line-height: 1;
	cursor: pointer;
}

/* Forms plugin laid out like the Contact Form 7 forms (classes added in site.js) */
.otn-form fieldset {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}
.otn-form .ec-form-field {
	margin: 0 0 10px;
}
.otn-form .ec-form-required {
	display: none;
}
.otn-form .ec-form-label {
	display: block;
	margin: 0 0 10px;
	font-weight: normal;
}
.otn-form select.ec-form-input {
	width: auto;
	max-width: 100%;
}
.otn-form .ec-form-radio-label,
.otn-form .ec-form-checkbox-label {
	display: block;
	margin: 0 0 10px;
	font-weight: normal;
	line-height: 20px;
}
.otn-form .ec-form-checkbox-label input,
.otn-form .ec-form-radio-label input {
	margin-right: 4px;
}
.otn-form .ec-form-error {
	display: block;
	color: #dc3232;
	font-size: 1em;
}
.otn-form .ec-form-status:not(:empty) {
	margin: 2em 0.5em 1em;
	padding: 0.2em 1em;
	border: 2px solid #46b450;
}
/* Forms whose CF7 fields had placeholders and no labels */
.otn-form .ec-form:is([data-form-id="planning-opinion"], [data-form-id="sales-registration"], [data-form-id="support-eagle-quarter"])
	:is(.ec-form-field--text, .ec-form-field--email, .ec-form-field--tel, .ec-form-field--textarea)
	> .ec-form-label {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}
/* Forms with visible CF7 labels (Bootstrap <label>) */
.otn-form .ec-form:is([data-form-id="register-for-news-updates"], [data-form-id="new-faq"]) .ec-form-label {
	margin-bottom: 5px;
	font-weight: bold;
}
/* CF7 leaves room for its spinner (24px margin + 24px icon + 24px) right of the Send button */
.otn-form .ec-form-submit {
	margin-right: 72px;
}
