/**
 * Lightbox styles.
 *
 * @package    ACT_Gallery
 * @subpackage ACT_Gallery/public/css
 */

.act-lightbox {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.95);
	z-index: 999999;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.act-lightbox.active {
	display: flex;
	opacity: 1;
}

.act-lightbox-content {
	position: relative;
	margin: auto;
	max-width: 90%;
	max-height: 90%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.act-lightbox-image {
	max-width: 100%;
	max-height: 80vh;
	object-fit: contain;
}

.act-lightbox-info {
	color: #fff;
	text-align: center;
	padding: 20px;
	max-width: 600px;
}

.act-lightbox-title {
	font-size: 24px;
	font-weight: 600;
	margin-bottom: 10px;
}

.act-lightbox-caption {
	font-size: 16px;
	opacity: 0.9;
}

.act-lightbox-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(255, 255, 255, 0.2);
	border: none;
	color: #fff;
	width: 50px;
	height: 50px;
	min-width: 44px; /* Touch-friendly minimum size */
	min-height: 44px; /* Touch-friendly minimum size */
	border-radius: 50%; /* Default round shape */
	cursor: pointer;
	font-size: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.3s ease, outline 0.2s ease;
	z-index: 10;
	-webkit-tap-highlight-color: transparent;
}

/* Focus styles for lightbox navigation */
.act-lightbox-nav:focus {
	outline: 2px solid #fff;
	outline-offset: 2px;
	background: rgba(255, 255, 255, 0.4);
}

.act-lightbox-nav:hover {
	background: rgba(255, 255, 255, 0.3);
}

.act-lightbox-nav-prev {
	left: 20px;
}

.act-lightbox-nav-next {
	right: 20px;
}

.act-lightbox-close {
	position: absolute;
	top: 20px;
	right: 20px;
	background: rgba(255, 255, 255, 0.2);
	border: none;
	color: #fff;
	width: 44px; /* Touch-friendly minimum size */
	height: 44px; /* Touch-friendly minimum size */
	border-radius: 50%; /* Default round shape */
	cursor: pointer;
	font-size: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.3s ease, outline 0.2s ease;
	z-index: 10;
	-webkit-tap-highlight-color: transparent;
}

/* Focus styles for lightbox close button */
.act-lightbox-close:focus {
	outline: 2px solid #fff;
	outline-offset: 2px;
	background: rgba(255, 255, 255, 0.4);
}

/* Rectangle shape for lightbox navigation icons */
.act-lightbox.act-nav-icon-rectangle .act-lightbox-nav,
.act-lightbox.act-nav-icon-rectangle .act-lightbox-close {
	border-radius: 0 !important;
}

.act-lightbox-close:hover {
	background: rgba(255, 255, 255, 0.3);
}

.act-lightbox-thumbnails {
	position: absolute;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 10px;
	max-width: 90%;
	overflow-x: auto;
	padding: 10px;
	background: rgba(0, 0, 0, 0.5);
	border-radius: 4px;
}

.act-lightbox-thumbnail {
	width: 80px;
	height: 80px;
	border-radius: 4px;
	cursor: pointer;
	opacity: 0.6;
	transition: opacity 0.3s ease, outline 0.2s ease;
	border: 2px solid transparent;
	background: transparent;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 44px; /* Touch-friendly minimum size */
	min-height: 44px; /* Touch-friendly minimum size */
	-webkit-tap-highlight-color: transparent;
	overflow: hidden;
}

.act-lightbox-thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.act-lightbox-thumbnail:hover {
	opacity: 1;
}

.act-lightbox-thumbnail.active {
	opacity: 1;
	border-color: #fff;
}

/* Focus styles for lightbox thumbnails */
.act-lightbox-thumbnail:focus {
	outline: 2px solid #fff;
	outline-offset: 2px;
	opacity: 1;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
	.act-lightbox-nav {
		width: 48px;
		height: 48px;
		min-width: 48px;
		min-height: 48px;
		font-size: 28px;
	}

	.act-lightbox-nav-prev {
		left: 10px;
	}

	.act-lightbox-nav-next {
		right: 10px;
	}

	.act-lightbox-close {
		width: 48px;
		height: 48px;
		font-size: 28px;
		top: 10px;
		right: 10px;
	}

	.act-lightbox-content {
		max-width: 95%;
		max-height: 95%;
		padding: 10px;
	}

	.act-lightbox-image {
		max-height: 70vh;
	}

	.act-lightbox-info {
		padding: 15px;
		font-size: 14px;
	}

	.act-lightbox-title {
		font-size: 18px;
	}

	.act-lightbox-caption {
		font-size: 14px;
	}

	.act-lightbox-thumbnail {
		width: 60px;
		height: 60px;
	}

	.act-lightbox-thumbnails {
		bottom: 10px;
		padding: 8px;
		gap: 8px;
	}
}

