/* Scroll Growing Video Widget */

.sgv-section {
	position: relative;
	background: transparent;
	padding: 0;
	height: 200vh;
}

.sgv-container {
	height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	position: sticky;
	top: 0;
	background: transparent;
	overflow: visible;
}

/* On mobile, push video to top of sticky container instead of center */
@media (max-width: 767px) {
	.sgv-container {
		align-items: flex-start;
		padding-top: 16px;
	}
}

@media (min-width: 768px) and (max-width: 1023px) {
	.sgv-container {
		align-items: flex-start;
		padding-top: 24px;
	}
}

/* JS sets explicit px width + height on every scroll tick */
.sgv-video-wrapper {
	position: relative;
	width: 50%;
	min-height: 0;
	background: #000;
	border-radius: 20px;
	overflow: hidden;
	will-change: width, height;
	transition: width 0.1s ease-out, height 0.1s ease-out;
}

@media (max-width: 767px) {
	.sgv-video-wrapper {
		width: 90%;
	}
}

@media (min-width: 768px) and (max-width: 1023px) {
	.sgv-video-wrapper {
		width: 70%;
	}
}

/* ── Self-hosted video ── */
.sgv-video {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ── YouTube / Vimeo iframe ── */
.sgv-iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	min-height: 100%;
	border: 0;
	display: block;
}

/* ── Placeholder ── */
.sgv-placeholder {
	position: absolute;
	top: 0; left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #2a2a2a;
	color: #888;
	font-family: sans-serif;
	font-size: 14px;
	text-align: center;
	padding: 16px;
}

/* ── Overlay Play / Pause Button (self-hosted only) ── */
.sgv-play-btn {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.45);
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10;
	transition: background 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
	outline: none;
}

.sgv-play-btn:hover {
	background: rgba(0, 0, 0, 0.65);
	transform: translate(-50%, -50%) scale(1.08);
}

.sgv-play-btn svg {
	width: 40%;
	height: 40%;
	fill: #ffffff;
	pointer-events: none;
}

/* Auto-hide button while playing; reveal on hover */
.sgv-video-wrapper.sgv-playing .sgv-play-btn {
	opacity: 0;
}

.sgv-video-wrapper.sgv-playing:hover .sgv-play-btn {
	opacity: 1;
}
