/**
 * Click-to-play YouTube players. Loaded only on pages that use the
 * [rc_youtube] shortcode (see inc/youtube.php). Depends on the custom
 * properties style.css sets on :root (--rc-paper, --rc-ink, --rc-rule, …).
 */

.rc-yt {
	position: relative;
	width: 100%;
	max-width: 32rem;
	aspect-ratio: 16 / 9;
	background: var(--rc-wash);
	border: 1px solid var(--rc-rule);
}

.rc-yt__btn {
	display: block;
	position: relative;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	font: inherit;
	color: var(--rc-ink);
}

.rc-yt__poster {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* The one mark allowed on the thumbnail: a thin outlined circle and
   triangle, no fill, on a small paper-colored disc for contrast — never a
   dark scrim over the whole image. */
.rc-yt__play {
	position: absolute;
	top: 50%;
	left: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	background: rgba(237, 241, 234, 0.88); /* --rc-paper, translucent */
	color: var(--rc-ink);
}

.rc-yt__play svg {
	width: 100%;
	height: 100%;
}

.rc-yt__btn:hover .rc-yt__play {
	color: var(--rc-red);
}

.rc-yt__btn:focus-visible {
	outline: 2px solid var(--rc-red);
	outline-offset: 3px;
}

.rc-yt__btn:focus-visible .rc-yt__play {
	color: var(--rc-red);
}

.rc-yt--playing {
	border-color: var(--rc-rule-strong);
}

.rc-yt iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

@media (prefers-reduced-motion: no-preference) {
	.rc-yt__play {
		transition: color 120ms ease;
	}
}

/* Lists of players, as used on the music and restoration entries. */
.rc-yt-list {
	list-style: none;
	margin: 1.5rem 0;
	padding: 0;
	display: grid;
	gap: 1.75rem;
}

.rc-yt-list li {
	margin: 0;
}

.rc-yt-cap {
	margin: 0.5rem 0 0;
	font-size: 0.95rem;
	color: var(--rc-ink-soft);
}

