/**
 * Spotlight Frontend Styles
 * 
 * @package Spotlight
 */

/* Popup Wrapper */
.spotlight-popup-wrapper {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

/* When popup is visible */
.spotlight-popup-wrapper.spotlight-popup-visible {
	display: flex;
}

/* Overlay */
.spotlight-popup-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.8);
	cursor: pointer;
}

/* Popup Container */
.spotlight-popup {
	position: relative;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
	max-width: 800px;
	width: 100%;
	max-height: 90vh;
	overflow: hidden;
	z-index: 1;
}

/* Popup Image */
.spotlight-popup-image {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 8px;
}

/* Popup Content */
.spotlight-popup-content {
	padding: 0;
}

/* Close Button */
.spotlight-popup-close {
	position: absolute;
	top: 15px;
	right: 15px;
	width: 40px;
	height: 40px;
	border: none;
	background: rgba(0, 0, 0, 0.75);
	color: #fff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	border-radius: 50%;
	transition: all 0.3s ease;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.spotlight-popup-close:hover {
	background: rgba(0, 0, 0, 0.9);
	transform: rotate(90deg);
}

.spotlight-popup-close:focus {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

/* Popup Content */
.spotlight-popup-content {
	padding: 40px 30px 30px;
}

/* Popup Title (for screen readers) */
.spotlight-popup-title.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}

/* Animation: Fade */
.spotlight-animation-fade {
	animation: spotlightFadeIn 0.3s ease-out;
}

@keyframes spotlightFadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* Animation: Slide Up */
.spotlight-animation-slide-up {
	animation: spotlightSlideUp 0.4s ease-out;
}

@keyframes spotlightSlideUp {
	from {
		opacity: 0;
		transform: translateY(50px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Animation: Slide Down */
.spotlight-animation-slide-down {
	animation: spotlightSlideDown 0.4s ease-out;
}

@keyframes spotlightSlideDown {
	from {
		opacity: 0;
		transform: translateY(-50px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Animation: Zoom */
.spotlight-animation-zoom {
	animation: spotlightZoom 0.3s ease-out;
}

@keyframes spotlightZoom {
	from {
		opacity: 0;
		transform: scale(0.8);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

/* Mobile Fullscreen */
@media (max-width: 767px) {
	.spotlight-mobile-fullscreen .spotlight-popup {
		max-width: 100%;
		max-height: 100%;
		height: 100%;
		border-radius: 0;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}

	.spotlight-mobile-fullscreen {
		padding: 0;
	}

	.spotlight-popup-content {
		padding: 50px 20px 20px;
	}
}

/* Tablet */
@media (max-width: 1024px) and (min-width: 768px) {
	.spotlight-popup {
		max-width: 90%;
	}
}

/* Body class when popup is active (prevents scrolling) */
body.spotlight-popup-active {
	overflow: hidden;
}

/* Content Styling (basic defaults) */
.spotlight-popup-content h1,
.spotlight-popup-content h2,
.spotlight-popup-content h3 {
	margin-top: 0;
}

.spotlight-popup-content img {
	max-width: 100%;
	height: auto;
}

.spotlight-popup-content p:last-child {
	margin-bottom: 0;
}

/* Ensure popup is above other elements */
.spotlight-popup-wrapper {
	isolation: isolate;
}

/* Accessibility: Focus visible */
.spotlight-popup a:focus,
.spotlight-popup button:focus,
.spotlight-popup input:focus,
.spotlight-popup select:focus,
.spotlight-popup textarea:focus {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

/* Loading state (optional enhancement) */
.spotlight-popup-loading {
	pointer-events: none;
	opacity: 0.6;
}

/* Print: Hide popups */
@media print {
	.spotlight-popup-wrapper {
		display: none !important;
	}
}
