@keyframes fade-in-up {
	0% {
		opacity: 0;
   }
	100% {
		transform: translateY(0);
		opacity: 1;
   }
}

/* Higher specificity to override Astra theme - only when stuck */
body .video-wrap .video.stuck iframe {
	max-width: 100% !important;
	max-height: 100% !important;
}

/* Override Astra theme's oembed container styles */
body .video-wrap .video.stuck,
body .ast-oembed-container .video.stuck,
.video.stuck {
	position: fixed !important;
	transform: translateY(0) !important;
	animation: fade-in-up 0.25s ease forwards !important;
	z-index: 999999 !important;
	opacity: 1 !important;
	/* Position and size will be set by JavaScript from admin settings */
}

/* Ensure iframe inside stuck video maintains proper positioning */
body .video-wrap .video.stuck iframe,
body .ast-oembed-container .video.stuck iframe {
	position: relative !important;
	top: 0 !important;
	left: 0 !important;
	width: 100% !important;
	height: 100% !important;
}

/* Additional override for maximum compatibility */
.video.stuck {
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
}

/* Ensure video-wrap doesn't interfere and maintains proper height */
.video-wrap {
	position: relative;
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
	width: 100%;
	height: auto;
	min-height: inherit;
}

/* Normal video state (non-sticky) - ensure proper display */
.video-wrap .video:not(.stuck) {
	position: relative !important;
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
	width: 100%;
	height: auto;
	line-height: 0;
}

/* Ensure iframe displays properly in normal state */
.video-wrap .video:not(.stuck) iframe {
	position: relative !important;
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
}

/* Fix WordPress responsive embed padding issue - prevents 75% padding-top */
.wp-embed-responsive .wp-embed-aspect-4-3 .wp-block-embed__wrapper:before,
.wp-embed-responsive .wp-embed-aspect-16-9 .wp-block-embed__wrapper:before,
.wp-embed-responsive .wp-embed-aspect-21-9 .wp-block-embed__wrapper:before {
	padding-top: 0 !important;
}

/* Fix WordPress responsive embed iframe height - allow natural height */
.wp-embed-responsive .wp-has-aspect-ratio iframe {
	height: revert-layer !important;
}

/* Only remove WordPress responsive embed padding when video is stuck 
   This prevents breaking normal video aspect ratios */
.video.stuck:before,
.video.stuck:after {
	display: none !important;
	content: none !important;
	padding-top: 0 !important;
}

.video-wrap .video.stuck {
	position: fixed !important;
}

/* Top Bar - Facebook Style */
.video.stuck .wpj-video-top-bar {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	height: 40px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	padding: 0 10px !important;
	z-index: 1000001 !important;
	border-radius: 4px 4px 0 0 !important;
}



/* Close button styles - in top bar */
.video.stuck .wpj-close-btn {
	position: relative !important;
	width: 28px !important;
	height: 28px !important;
	background: rgba(255, 255, 255, 0.2) !important;
	border: none !important;
	border-radius: 4px !important;
	cursor: pointer !important;
	z-index: 1000002 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	transition: all 0.2s ease !important;
	flex-shrink: 0 !important;
}

/* CSS-drawn X using pseudo-elements */
.video.stuck .wpj-close-btn::before,
.video.stuck .wpj-close-btn::after {
	content: '' !important;
	position: absolute !important;
	width: 12px !important;
	height: 2px !important;
	background: white !important;
	border-radius: 1px !important;
}

.video.stuck .wpj-close-btn::before {
	transform: rotate(45deg) !important;
}

.video.stuck .wpj-close-btn::after {
	transform: rotate(-45deg) !important;
}

.video.stuck .wpj-close-btn:hover {
	background: rgba(255, 255, 255, 0.3) !important;
}

/* Hide close button on normal videos */
.video:not(.stuck) .wpj-close-btn {
	display: none !important;
}

/* Hide top bar on normal videos */
.video:not(.stuck) .wpj-video-top-bar {
	display: none !important;
}

/* Mobile adjustments for top bar */
@media (max-width: 768px) {
	.video.stuck .wpj-video-top-bar {
		height: 35px !important;
		padding: 0 8px !important;
	}
	

	
	.video.stuck .wpj-close-btn {
		width: 26px !important;
		height: 26px !important;
	}
}