/**
 * Ganga Video Player Stylesheet
 */

.ganga-video-player-widget {
	position: relative;
	width: 100%;
	display: block;
	box-sizing: border-box;
}

.ganga-video-wrapper {
	position: relative;
	width: 100%;
	overflow: hidden;
	background: #000000;
	transform: translate3d(0, 0, 0);
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
}

/* Aspect Ratio presets */
.ganga-video-container,
.ganga-embed-video-container {
	position: relative;
	width: 100%;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Default 16:9 Aspect Ratio */
.ganga-ratio-16-9 .ganga-video-container,
.ganga-ratio-16-9 .ganga-embed-video-container {
	aspect-ratio: 16 / 9;
}

/* 9:16 Vertical Aspect Ratio (Mobile / Reels) */
.ganga-ratio-9-16 .ganga-video-container,
.ganga-ratio-9-16 .ganga-embed-video-container {
	aspect-ratio: 9 / 16;
}

/* 4:3 Standard */
.ganga-ratio-4-3 .ganga-video-container,
.ganga-ratio-4-3 .ganga-embed-video-container {
	aspect-ratio: 4 / 3;
}

/* 21:9 Ultrawide */
.ganga-ratio-21-9 .ganga-video-container,
.ganga-ratio-21-9 .ganga-embed-video-container {
	aspect-ratio: 21 / 9;
}

/* 1:1 Square */
.ganga-ratio-1-1 .ganga-video-container,
.ganga-ratio-1-1 .ganga-embed-video-container {
	aspect-ratio: 1 / 1;
}

/* Responsive aspect ratios via Elementor generated classes */
@media (max-width: 1024px) {
	.ganga-ratio-tablet-16-9 .ganga-video-container { aspect-ratio: 16 / 9; }
	.ganga-ratio-tablet-9-16 .ganga-video-container { aspect-ratio: 9 / 16; }
	.ganga-ratio-tablet-4-3 .ganga-video-container { aspect-ratio: 4 / 3; }
	.ganga-ratio-tablet-1-1 .ganga-video-container { aspect-ratio: 1 / 1; }
}

@media (max-width: 767px) {
	.ganga-ratio-mobile-9-16 .ganga-video-container { aspect-ratio: 9 / 16; }
	.ganga-ratio-mobile-16-9 .ganga-video-container { aspect-ratio: 16 / 9; }
	.ganga-ratio-mobile-1-1 .ganga-video-container { aspect-ratio: 1 / 1; }
}

/* Video Element */
.ganga-video-element {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	z-index: 1;
	transform: translateZ(0);
	will-change: transform;
	transition: opacity 0.4s ease-in-out;
}

.ganga-embed-iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
	z-index: 1;
}

/* Overlay Mask */
.ganga-video-overlay-mask {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 2;
	pointer-events: none;
	background: rgba(0, 0, 0, 0.25);
	transition: opacity 0.3s ease;
}

/* Sound Toggle Button */
.ganga-sound-toggle-btn {
	position: absolute;
	z-index: 10;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 50%;
	background: rgba(15, 23, 42, 0.75);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	color: #ffffff;
	cursor: pointer;
	box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	outline: none;
}

.ganga-sound-toggle-btn:hover {
	background: rgba(0, 0, 0, 0.9);
	border-color: rgba(255, 255, 255, 0.5);
	transform: scale(1.08);
}

.ganga-sound-toggle-btn svg {
	width: 20px;
	height: 20px;
	transition: transform 0.2s ease;
}

.ganga-sound-toggle-btn:active svg {
	transform: scale(0.9);
}

/* Position presets for Sound Button */
.ganga-sound-toggle-btn.pos-bottom-right {
	bottom: 20px;
	right: 20px;
}

.ganga-sound-toggle-btn.pos-bottom-left {
	bottom: 20px;
	left: 20px;
}

.ganga-sound-toggle-btn.pos-top-right {
	top: 20px;
	right: 20px;
}

.ganga-sound-toggle-btn.pos-top-left {
	top: 20px;
	left: 20px;
}

/* Sound Tooltip */
.ganga-sound-tooltip {
	position: absolute;
	bottom: 120%;
	left: 50%;
	transform: translateX(-50%) translateY(6px);
	background: rgba(0, 0, 0, 0.85);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	padding: 4px 8px;
	border-radius: 4px;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.ganga-sound-toggle-btn:hover .ganga-sound-tooltip {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

/* Play/Pause Center Overlay Button */
.ganga-play-center-btn {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 5;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 70px;
	height: 70px;
	border: 2px solid rgba(255, 255, 255, 0.6);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.25);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	color: #ffffff;
	cursor: pointer;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	opacity: 0;
	pointer-events: auto;
}

.ganga-video-container:hover .ganga-play-center-btn,
.ganga-play-center-btn.is-paused {
	opacity: 1;
}

.ganga-play-center-btn:hover {
	transform: translate(-50%, -50%) scale(1.12);
	background: rgba(255, 255, 255, 0.4);
	border-color: #ffffff;
}

.ganga-play-center-btn svg {
	margin-left: 3px; /* visual center for play icon */
}

/* Optional Content / Text Overlay */
.ganga-video-content-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 4;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	text-align: center;
	padding: 30px;
	box-sizing: border-box;
	pointer-events: none;
}

.ganga-video-content-overlay > * {
	pointer-events: auto;
}

.ganga-overlay-title {
	font-family: inherit;
	font-size: 38px;
	font-weight: 700;
	line-height: 1.2;
	color: #ffffff;
	margin: 0 0 12px 0;
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.ganga-overlay-subtitle {
	font-family: inherit;
	font-size: 16px;
	line-height: 1.6;
	color: #e2e8f0;
	max-width: 650px;
	margin: 0 0 24px 0;
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.ganga-overlay-cta-btn {
	display: inline-block;
	padding: 12px 28px;
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1px;
	text-decoration: none;
	color: #ffffff;
	background: #c59d5f;
	border-radius: 4px;
	transition: all 0.3s ease;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.ganga-overlay-cta-btn:hover {
	background: #b38848;
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Buffering Spinner */
.ganga-video-buffering-indicator {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 3;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.ganga-video-buffering-indicator.is-buffering {
	opacity: 1;
}

.ganga-spinner {
	width: 40px;
	height: 40px;
	border: 3px solid rgba(255, 255, 255, 0.3);
	border-radius: 50%;
	border-top-color: #ffffff;
	animation: ganga-spin 0.8s linear infinite;
}

@keyframes ganga-spin {
	to { transform: rotate(360deg); }
}

@media (max-width: 767px) {
	.ganga-overlay-title {
		font-size: 24px;
	}
	.ganga-overlay-subtitle {
		font-size: 14px;
	}
	.ganga-sound-toggle-btn {
		width: 40px;
		height: 40px;
	}
	.ganga-sound-toggle-btn svg {
		width: 16px;
		height: 16px;
	}
}
