/**
 * Custom-skinned YouTube player.
 *
 * Shared by every block that calls wolfpack_video(): the vertical Shorts frame,
 * its poster stack, the diamond play button, the click shield and the
 * play/pause control the script appends once the embed is running.
 */

.wp-video-wrap {
	margin: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
}

.wp-video {
	position: relative;
	aspect-ratio: 9 / 16;
	width: min(320px, 80vw);
	border-radius: 26px;
	overflow: hidden;
	box-shadow: 0 14px 34px rgba(35, 41, 48, 0.22);
	background: var(--wp--preset--color--ink);
	cursor: pointer;
}

.wp-video-poster {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.wp-video:hover .wp-video-poster {
	transform: scale(1.04);
}

.wp-video-scrim {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		180deg,
		color-mix(in srgb, var(--wp--preset--color--ink) 12%, transparent),
		color-mix(in srgb, var(--wp--preset--color--ink) 50%, transparent)
	);
}

/* The two diamond controls share a shape: a rounded square turned 45deg with
   its icon counter-rotated so the glyph stays upright. */
.wp-video-play,
.wp-video-ctrl {
	position: absolute;
	border: none;
	cursor: pointer;
	background: color-mix(in srgb, var(--wp--preset--color--cream) 16%, transparent);
	backdrop-filter: blur(4px);
	display: flex;
	align-items: center;
	justify-content: center;
	transform: rotate(45deg);
	transition: background 0.2s ease;
}

.wp-video-play svg,
.wp-video-ctrl svg {
	transform: rotate(-45deg);
	color: var(--wp--preset--color--cream);
	display: block;
}

.wp-video-play:hover,
.wp-video-ctrl:hover {
	background: var(--wp--preset--color--honey);
}

.wp-video-play:hover svg,
.wp-video-ctrl:hover svg {
	color: var(--wp--preset--color--ink);
}

.wp-video-play {
	top: 50%;
	left: 50%;
	width: 64px;
	height: 64px;
	margin: -32px 0 0 -32px;
	border-radius: 20px;
}

.wp-video-play-icon {
	display: block;
	width: 0;
	height: 0;
	transform: rotate(-45deg);
	border-top: 9px solid transparent;
	border-bottom: 9px solid transparent;
	border-left: 15px solid var(--wp--preset--color--cream);
	margin-left: 4px;
	transition: border-left-color 0.2s ease;
}

.wp-video-play:hover .wp-video-play-icon {
	border-left-color: var(--wp--preset--color--ink);
}

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

/* The shield swallows every pointer event aimed at the iframe, so YouTube's own
   chrome never appears. It is a button so it is keyboard reachable as well. */
.wp-video-shield {
	position: absolute;
	inset: 0;
	background: transparent;
	border: none;
	padding: 0;
	cursor: pointer;
	z-index: 2;
}

.wp-video-ctrl {
	left: 14px;
	bottom: 14px;
	width: 44px;
	height: 44px;
	border-radius: 14px;
	z-index: 3;
}

.wp-video-label {
	display: inline-block;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 800;
	font-size: 0.78rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	padding: 7px 16px;
	border-radius: 99px;
	background: var(--wp--preset--color--honey-soft);
	color: var(--wp--preset--color--ink);
}

@media (prefers-reduced-motion: reduce) {
	.wp-video-poster {
		transition: none;
	}

	.wp-video:hover .wp-video-poster {
		transform: none;
	}
}
