/**
 * Youfriend Community - Zero-Dependency Lightbox CSS
 */

.yf-lightbox-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(13, 19, 29, 0.94);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
	user-select: none;
	touch-action: none;
}

.yf-lightbox-modal.yf-active {
	opacity: 1;
	visibility: visible;
}

/* Contenitore Immagine */
.yf-lightbox-container {
	position: relative;
	max-width: 92vw;
	max-height: 88vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.yf-lightbox-image {
	max-width: 92vw;
	max-height: 84vh;
	object-fit: contain;
	border-radius: 6px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
	transform: scale(0.96);
	transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
	display: block;
}

.yf-lightbox-modal.yf-active .yf-lightbox-image {
	transform: scale(1);
}

/* Barra Didascalia e Contatore */
.yf-lightbox-footer {
	margin-top: 12px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	color: #ffffff;
	font-family: 'Poppins', sans-serif;
	font-size: 14px;
	padding: 0 6px;
}

.yf-lightbox-caption {
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 75%;
}

.yf-lightbox-counter {
	font-size: 13px;
	color: #94a3b8;
}

/* Pulsante Chiusura */
.yf-lightbox-close {
	position: absolute;
	top: 20px;
	right: 25px;
	width: 44px;
	height: 44px;
	background: rgba(255, 255, 255, 0.12);
	color: #ffffff;
	border: none;
	border-radius: 50%;
	font-size: 26px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.2s, transform 0.2s;
	z-index: 1000000;
}

.yf-lightbox-close:hover {
	background: rgba(255, 255, 255, 0.25);
	transform: scale(1.1);
}

/* Pulsanti Precedente / Successivo */
.yf-lightbox-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 52px;
	height: 52px;
	background: rgba(255, 255, 255, 0.12);
	color: #ffffff;
	border: none;
	border-radius: 50%;
	font-size: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.2s, transform 0.2s;
	z-index: 1000000;
}

.yf-lightbox-nav:hover {
	background: rgba(255, 255, 255, 0.25);
	transform: translateY(-50%) scale(1.1);
}

.yf-lightbox-prev {
	left: 20px;
}

.yf-lightbox-next {
	right: 20px;
}

/* Spinner di caricamento */
.yf-lightbox-spinner {
	position: absolute;
	width: 40px;
	height: 40px;
	border: 3px solid rgba(255, 255, 255, 0.2);
	border-top-color: #80c740;
	border-radius: 50%;
	animation: yf-spin 0.8s linear infinite;
}

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

@media (max-width: 768px) {
	.yf-lightbox-nav {
		width: 40px;
		height: 40px;
		font-size: 20px;
	}
	.yf-lightbox-prev { left: 10px; }
	.yf-lightbox-next { right: 10px; }
	.yf-lightbox-close { top: 15px; right: 15px; width: 38px; height: 38px; }
}
