/* Click-to-load YouTube facade.
   Nothing contacts Google until the visitor presses play. */

.ck-video {
	position: relative;
	width: 100%;
	margin: 0 0 1em;
	background: #000;
	overflow: hidden;
}

/* Reserve the 16:9 box so the page doesn't jump as the thumbnail loads. */
.ck-video::before {
	content: "";
	display: block;
	padding-top: 56.25%;
}

.ck-video__btn {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	color: inherit;
	font: inherit;
}

.ck-video__thumb {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* YouTube-style play button. */
.ck-video__play {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 68px;
	height: 48px;
	transform: translate(-50%, -50%);
	background: rgba(18, 18, 18, 0.75);
	border-radius: 12px;
	transition: background-color 0.15s ease;
}

.ck-video__play::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-40%, -50%);
	border-style: solid;
	border-width: 11px 0 11px 19px;
	border-color: transparent transparent transparent #fff;
}

.ck-video__btn:hover .ck-video__play,
.ck-video__btn:focus-visible .ck-video__play {
	background: #f00;
}

.ck-video__btn:focus-visible {
	outline: 3px solid #fff;
	outline-offset: -6px;
}

/* Small print shown under the thumbnail so the data transfer isn't a surprise.
   text-transform/letter-spacing are reset because the theme uppercases small text. */
.ck-video__note {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	margin: 0;
	padding: 5px 8px;
	background: rgba(18, 18, 18, 0.66);
	color: #fff;
	font-size: 11px;
	line-height: 1.3;
	font-weight: 400;
	text-align: left;
	text-transform: none;
	letter-spacing: 0;
	pointer-events: none;
}

/* Visually hidden label for the button, in case the theme's own rule changes. */
.ck-video .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

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

@media (prefers-reduced-motion: reduce) {
	.ck-video__play {
		transition: none;
	}
}
