/**
 * AITP Gallery Lightbox — Styles
 *
 * Design tokens:
 *   Navy:       #1E3A5C
 *   Teal:       #6BB8AC
 *   Steel Blue: #3D6F8F
 *   Cream:      #F5F0EB
 *   White:      #FFFFFF
 */

/* ---------------------------------------------------------------
 * Overlay
 * --------------------------------------------------------------- */

.aitp-lightbox-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(30, 58, 92, 0.95);
	opacity: 0;
	visibility: hidden;
	transition: opacity 300ms ease, visibility 300ms ease;
	cursor: pointer;
}

.aitp-lightbox-overlay.aitp-lightbox--open {
	opacity: 1;
	visibility: visible;
}

/* Prevent body scroll when lightbox is open */
body.aitp-lightbox-no-scroll {
	overflow: hidden;
}

/* ---------------------------------------------------------------
 * Image container
 * --------------------------------------------------------------- */

.aitp-lightbox-image-wrap {
	position: relative;
	max-width: 90vw;
	max-height: 80vh;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: default;
}

.aitp-lightbox-image {
	max-width: 90vw;
	max-height: 80vh;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 8px;
	opacity: 0;
	transition: opacity 300ms ease;
}

.aitp-lightbox-image.aitp-lightbox--loaded {
	opacity: 1;
}

/* ---------------------------------------------------------------
 * Close button
 * --------------------------------------------------------------- */

.aitp-lightbox-close {
	position: fixed;
	top: 16px;
	right: 16px;
	z-index: 100000;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 0;
	transition: transform 300ms ease, opacity 300ms ease;
}

.aitp-lightbox-close svg {
	width: 28px;
	height: 28px;
	stroke: #FFFFFF;
	stroke-width: 2;
	fill: none;
}

.aitp-lightbox-close:hover {
	transform: scale(1.15);
	opacity: 0.85;
}

/* ---------------------------------------------------------------
 * Navigation arrows
 * --------------------------------------------------------------- */

.aitp-lightbox-prev,
.aitp-lightbox-next {
	position: fixed;
	top: 50%;
	transform: translateY(-50%);
	z-index: 100000;
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 0;
	transition: transform 300ms ease, filter 300ms ease;
}

.aitp-lightbox-prev {
	left: 12px;
}

.aitp-lightbox-next {
	right: 12px;
}

.aitp-lightbox-prev svg,
.aitp-lightbox-next svg {
	width: 32px;
	height: 32px;
	stroke: #FFFFFF;
	stroke-width: 2.5;
	fill: none;
}

.aitp-lightbox-prev:hover,
.aitp-lightbox-next:hover {
	transform: translateY(-50%) scale(1.15);
	filter: drop-shadow(0 0 8px rgba(107, 184, 172, 0.6));
}

/* Hide arrows when only one image */
.aitp-lightbox-overlay[data-total="1"] .aitp-lightbox-prev,
.aitp-lightbox-overlay[data-total="1"] .aitp-lightbox-next {
	display: none;
}

/* ---------------------------------------------------------------
 * Caption
 * --------------------------------------------------------------- */

.aitp-lightbox-caption {
	position: fixed;
	bottom: 48px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 100000;
	max-width: 80vw;
	text-align: center;
	color: #FFFFFF;
	font-family: 'Inter', sans-serif;
	font-size: 15px;
	line-height: 1.5;
	padding: 8px 16px;
	opacity: 0;
	transition: opacity 300ms ease;
}

.aitp-lightbox-caption.aitp-lightbox--visible {
	opacity: 1;
}

/* ---------------------------------------------------------------
 * Counter
 * --------------------------------------------------------------- */

.aitp-lightbox-counter {
	position: fixed;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 100000;
	color: rgba(255, 255, 255, 0.85);
	font-family: 'Inter', sans-serif;
	font-size: 13px;
	letter-spacing: 0.5px;
}

/* ---------------------------------------------------------------
 * Loading spinner
 * --------------------------------------------------------------- */

.aitp-lightbox-spinner {
	position: absolute;
	width: 36px;
	height: 36px;
	border: 3px solid rgba(255, 255, 255, 0.2);
	border-top-color: #6BB8AC;
	border-radius: 50%;
	animation: aitp-lightbox-spin 0.8s linear infinite;
}

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

/* ---------------------------------------------------------------
 * Clickable images indicator
 * --------------------------------------------------------------- */

.entry-content img {
	cursor: zoom-in;
}

/* ---------------------------------------------------------------
 * Responsive adjustments
 * --------------------------------------------------------------- */

@media (max-width: 600px) {
	.aitp-lightbox-image {
		max-width: 96vw;
		max-height: 75vh;
		border-radius: 4px;
	}

	.aitp-lightbox-image-wrap {
		max-width: 96vw;
		max-height: 75vh;
	}

	.aitp-lightbox-prev {
		left: 4px;
	}

	.aitp-lightbox-next {
		right: 4px;
	}

	.aitp-lightbox-prev svg,
	.aitp-lightbox-next svg {
		width: 28px;
		height: 28px;
	}

	.aitp-lightbox-caption {
		font-size: 13px;
		bottom: 44px;
		max-width: 90vw;
	}

	.aitp-lightbox-counter {
		font-size: 12px;
		bottom: 16px;
	}
}
