/* ==========================================================================
   Block: SL Media Video
   ========================================================================== */

.sl-media-video {
	background-color: var(--sl-color-white);
	padding: 120px 0;
}

.sl-media-video__inner {
	max-width: var(--sl-content-width);
	margin: 0 auto;
	padding: 0 var(--sl-content-padding);
}

/* --------------------------------------------------------------------------
   Player Container
   -------------------------------------------------------------------------- */

.sl-media-video__player {
	position: relative;
	cursor: pointer;
}

/* --------------------------------------------------------------------------
   16:9 Ratio Container
   -------------------------------------------------------------------------- */

.sl-media-video__ratio {
	position: relative;
	width: 100%;
	padding-bottom: 56.25%; /* 16:9 */
	overflow: hidden;
	border-radius: 4px;
	background-color: var(--sl-color-grey);
}

.sl-media-video__thumb {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Embedded iframe (replaces thumbnail on play) */
.sl-media-video__ratio iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: none;
	border-radius: 4px;
}

/* --------------------------------------------------------------------------
   Play Button
   -------------------------------------------------------------------------- */

.sl-media-video__play {
	position: absolute;
	bottom: 24px;
	left: 24px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background-color: var(--sl-color-yellow);
	color: var(--sl-color-green);
	border: none;
	cursor: pointer;
	padding: 0;
	z-index: 2;
	transition: opacity 0.2s ease;
}

.sl-media-video__play:hover,
.sl-media-video__play:focus {
	opacity: 0.85;
}

.sl-media-video__play:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px var(--sl-color-green);
}

.sl-media-video__play svg {
	width: 24px;
	height: 24px;
}

/* Hide play button when video is playing */
.sl-media-video__player.is-playing .sl-media-video__play {
	display: none;
}

/* --------------------------------------------------------------------------
   Mobile
   -------------------------------------------------------------------------- */

@media (max-width: 767px) {
	.sl-media-video {
		padding: 80px 0;
	}

	.sl-media-video__inner {
		padding: 0 22px;
	}

	.sl-media-video__play {
		bottom: 16px;
		left: 16px;
		width: 44px;
		height: 44px;
	}
}
