.vso-sticky-video {
	position: relative;
	width: 100%;
	max-width: 100%;
}

.vso-sticky-video iframe,
.vso-sticky-video video {
	display: block;
	width: 100%;
	max-width: 100%;
}

.vso-sticky-video iframe {
	aspect-ratio: 16 / 9;
	height: auto;
}

.vso-sticky-video__placeholder {
	display: none;
}

.vso-sticky-video__placeholder.is-active {
	display: block;
}

.vso-sticky-video.is-sticky {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 99999;
	width: min(400px, calc(100vw - 48px));
	max-width: none;
	background: #000;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.vso-sticky-video.is-sticky iframe,
.vso-sticky-video.is-sticky video {
	width: 100%;
	aspect-ratio: 16 / 9;
	height: auto;
	object-fit: contain;
	background: #000;
}

.vso-sticky-video__close {
	position: absolute;
	top: -12px;
	right: -12px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 2px solid #fff;
	border-radius: 50%;
	background: #111;
	color: #fff;
	font: inherit;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.vso-sticky-video__close:hover,
.vso-sticky-video__close:focus-visible {
	background: #333;
}

.vso-sticky-video__close:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

@media (max-width: 767px) {
	.vso-sticky-video.is-sticky {
		right: 12px;
		bottom: 12px;
		width: min(320px, calc(100vw - 24px));
	}

	.vso-sticky-video__close {
		top: -10px;
		right: -6px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.vso-sticky-video,
	.vso-sticky-video * {
		scroll-behavior: auto !important;
	}
}

/* Smooth travel between the inline position and the floating corner. */
.vso-sticky-video.is-moving {
	transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
	will-change: transform;
}

.vso-sticky-video.is-no-transition {
	transition: none !important;
}

/* Preserve the article's video footprint while the active player floats. */
.vso-sticky-video__placeholder.is-active {
	background: #eeeeee;
}
