/* Saraswaan Floating Video Widget */

.sfv-root {
	--sfv-width: 132px;
	--sfv-radius: 14px;
	--sfv-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
	--sfv-z-index: 99990;
	--sfv-offset-x: 20px;
	--sfv-offset-y: 96px;
}

.sfv-root:not([hidden]) {
	display: block;
}

.sfv-widget {
	position: fixed;
	right: var(--sfv-offset-x);
	bottom: var(--sfv-offset-y);
	z-index: var(--sfv-z-index);
	width: var(--sfv-width);
	border-radius: var(--sfv-radius);
	overflow: hidden;
	box-shadow: var(--sfv-shadow);
	background: #111;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sfv-widget:hover {
	transform: translateY(-2px);
	box-shadow: 0 14px 34px rgba(0, 0, 0, 0.32);
}

.sfv-close {
	position: absolute;
	top: 6px;
	right: 6px;
	z-index: 3;
	width: 26px;
	height: 26px;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.72);
	color: #fff;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.sfv-close:hover,
.sfv-close:focus {
	background: rgba(0, 0, 0, 0.9);
	outline: none;
}

.sfv-preview {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	position: relative;
	aspect-ratio: 9 / 16;
}

.sfv-preview-video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: none;
	background: #000;
}

.sfv-play-indicator {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 42px;
	height: 42px;
	margin: -21px 0 0 -21px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.55);
	pointer-events: none;
}

.sfv-play-indicator::after {
	content: "";
	position: absolute;
	left: 16px;
	top: 12px;
	border-style: solid;
	border-width: 9px 0 9px 14px;
	border-color: transparent transparent transparent #fff;
}

.sfv-modal {
	position: fixed;
	inset: 0;
	z-index: calc(var(--sfv-z-index) + 1);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.sfv-modal[hidden] {
	display: none;
}

.sfv-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.72);
}

.sfv-modal-dialog {
	position: relative;
	z-index: 1;
	width: min(92vw, 420px);
	max-height: 90vh;
	border-radius: 16px;
	overflow: hidden;
	background: #000;
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.sfv-modal-close {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.72);
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.sfv-modal-close:hover,
.sfv-modal-close:focus {
	background: rgba(0, 0, 0, 0.9);
	outline: none;
}

.sfv-modal-video {
	display: block;
	width: 100%;
	height: auto;
	max-height: 90vh;
	object-fit: contain;
	background: #000;
}

@media (max-width: 767px) {
	.sfv-root {
		--sfv-width: 108px;
		--sfv-offset-x: 14px;
		--sfv-offset-y: 88px;
	}

	.sfv-play-indicator {
		width: 34px;
		height: 34px;
		margin: -17px 0 0 -17px;
	}

	.sfv-play-indicator::after {
		left: 13px;
		top: 10px;
		border-width: 7px 0 7px 11px;
	}

	.sfv-modal-dialog {
		width: min(94vw, 360px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.sfv-widget {
		transition: none;
	}
}

body.sfv-modal-open {
	overflow: hidden;
}
