/* VK7K Lightbox Frontend Styles */

/* Prevent scroll on body when modal is open */
body.vk7k-lightbox-open {
	overflow: hidden !important;
}

/* Modal Dialog Reset & Base Styling */
dialog.vk7k-lightbox-dialog {
	padding: 0;
	border: none;
	border-radius: 12px;
	background: transparent;
	color: #fff;
	max-width: 90vw;
	max-height: 90vh;
	width: auto;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
	overflow: visible;
	margin: auto;
}

/* Open Animation */
dialog.vk7k-lightbox-dialog[open] {
	animation: vk7k-lightbox-fade-in 0.25s ease-out forwards;
}

@keyframes vk7k-lightbox-fade-in {
	from {
		opacity: 0;
		transform: scale(0.95);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

/* Backdrop Styling */
dialog.vk7k-lightbox-dialog::backdrop {
	background-color: rgba(0, 0, 0, 0.82);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	animation: vk7k-backdrop-fade-in 0.25s ease-out forwards;
}

@keyframes vk7k-backdrop-fade-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* Container Wrapper */
.vk7k-lightbox-container {
	position: relative;
	background: #0f172a;
	border-radius: 12px;
	padding: 0;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	max-width: 100%;
	max-height: 90vh;
	border: 1px solid rgba(255, 255, 255, 0.1);
	overflow: hidden;
}

/* Content Area */
.vk7k-lightbox-content {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #000;
}

/* Responsive 16:9 Video Wrapper for YouTube & Vimeo */
.vk7k-lightbox-video-wrapper {
	position: relative;
	width: 85vw;
	max-width: 960px;
	aspect-ratio: 16 / 9;
	background: #000;
}

/* YouTube Shorts / Vertical Video Wrapper (9:16 aspect ratio) */
.vk7k-lightbox-video-wrapper.vk7k-lightbox-shorts-wrapper {
	width: 85vw;
	max-width: 420px;
	height: 80vh;
	max-height: 720px;
	aspect-ratio: 9 / 16;
	margin: 0 auto;
}

.vk7k-lightbox-video-wrapper iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* Image Display */
.vk7k-lightbox-content img {
	max-width: 85vw;
	max-height: 80vh;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
	margin: 0 auto;
}

/* iFrame Display */
.vk7k-lightbox-iframe-wrapper {
	width: 85vw;
	max-width: 1000px;
	height: 80vh;
}

.vk7k-lightbox-iframe-wrapper iframe {
	width: 100%;
	height: 100%;
	border: 0;
}

/* Close Button */
.vk7k-lightbox-close {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 10;
	width: 38px;
	height: 38px;
	background: rgba(15, 23, 42, 0.75);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 50%;
	color: #fff;
	font-size: 24px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.vk7k-lightbox-close:hover,
.vk7k-lightbox-close:focus {
	background: #ef4444;
	color: #fff;
	transform: scale(1.1);
	outline: none;
}

/* Spinner Loading State */
.vk7k-lightbox-loader {
	display: none;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 5;
}

.vk7k-lightbox-loader.is-active {
	display: block;
}

.vk7k-lightbox-spinner {
	width: 40px;
	height: 40px;
	border: 4px solid rgba(255, 255, 255, 0.2);
	border-top-color: #3b82f6;
	border-radius: 50%;
	display: inline-block;
	box-sizing: border-box;
	animation: vk7k-spin 0.8s linear infinite;
}

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

/* Caption Footer */
.vk7k-lightbox-caption {
	padding: 12px 16px;
	background: #0f172a;
	color: #cbd5e1;
	font-size: 14px;
	text-align: center;
	border-top: 1px solid rgba(255, 255, 255, 0.05);
}
