/**
 * CM Artist Gallery - Lightbox Styles
 *
 * WICHTIG: WEIßER Hintergrund, nicht schwarz!
 * Schwarze feine Schrift für Infos.
 */

/* ============================================
   Lightbox Overlay - WEIß!
   ============================================ */

.cm-lightbox {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 99999;

	/* WICHTIG: WEIßER Hintergrund! */
	background: rgba(255, 255, 255, 0.97);

	display: flex;
	align-items: center;
	justify-content: center;

	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;

	cursor: pointer;
}

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

/* ============================================
   Lightbox Content Container
   ============================================ */

.cm-lightbox-content {
	position: relative;
	max-width: 90%;
	max-height: 90%;
	display: flex;
	flex-direction: column;
	align-items: center;
	cursor: default !important;
    margin-top: 10vh;
}

/* ============================================
   Image Container
   ============================================ */

.cm-lightbox-image-container {
	position: relative;
	max-width: 100%;
	max-height: 400px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cm-lightbox-image {
	max-width: 100%;
	max-height: 400px;
	width: auto;
	height: auto;
	display: block;
	box-shadow: 0 10px 50px rgba(0, 0, 0, 0.15);
}

/* Loading Animation */
.cm-lightbox-loading {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 300px;
}

.cm-lightbox-loader {
	width: 50px;
	height: 50px;
	border: 3px solid rgba(0, 0, 0, 0.1);
	border-top-color: #000;
	border-radius: 50%;
	animation: cm-lb-spin 0.8s linear infinite;
}

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

/* ============================================
   Image Info - Schwarze feine Schrift
   ============================================ */

.cm-lightbox-info {
	margin-top: 25px;
	padding: 0;

	/* Transparent, keine Box */
	background: transparent;

	text-align: center;
	max-width: 100%;
	width: 100%;
}

.cm-lightbox-title {
	/* Schwarze feine Schrift */
	color: #000;
	font-size: 15px;
	font-weight: 300;
	letter-spacing: 0.5px;
	margin: 0 0 0 0;
    padding-bottom: 0px;
}

.cm-lightbox-meta {
	display: flex;
	flex-direction: column;
	gap: 5px;
	align-items: center;
	justify-content: center;
	margin-top: 8px;
}

.cm-lightbox-meta-item {
	/* Schwarze feine Schrift */
	color: #000;
	font-size: 15px;
	font-weight: 300;
	letter-spacing: 0.3px;
}

.cm-lightbox-description {
	color: #333;
	font-size: 14px;
	font-weight: 300;
	line-height: 1.6;
	margin-top: 15px;
}

/* ============================================
   Navigation Arrows - Am Bildschirmrand mittig
   ============================================ */

.cm-lightbox-nav {
	position: fixed;
	top: 50%;
	transform: translateY(-50%);
	width: 60px;
	height: 60px;

	/* TRANSPARENT - kein Background! */
	background: transparent;
	border: none;

	display: flex;
	align-items: center;
	justify-content: center;

	cursor: pointer;
	transition: all 0.3s ease;

	z-index: 10;
	opacity: 0.6;
}

.cm-lightbox-nav:hover {
	transform: translateY(-50%) scale(1.15);
	opacity: 1;
}

.cm-lightbox-nav.cm-disabled {
	opacity: 0;
	pointer-events: none;
}

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

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

.cm-lightbox-nav svg {
	width: 28px;
	height: 28px;
	fill: none;
	stroke: #bbb;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	filter: drop-shadow(0 1px 2px rgba(255, 255, 255, 0.9));
}

/* ============================================
   Close Button - Rechte obere Ecke am Bildschirmrand
   ============================================ */

.cm-lightbox-close {
	position: fixed;
	top: 15px;
	right: 15px;
	width: 50px;
	height: 50px;

	/* TRANSPARENT - kein Background! */
	background: transparent;
	border: none;

	display: flex;
	align-items: center;
	justify-content: center;

	cursor: pointer;
	transition: all 0.3s ease;

	z-index: 100;
	opacity: 0.6;
}

/* Admin-Bar Offset (Desktop) */
.admin-bar .cm-lightbox-close {
	top: 47px; /* 32px Admin-Bar + 15px Abstand */
}

.cm-lightbox-close:hover {
	transform: scale(1.15);
	opacity: 1;
}

.cm-lightbox-close svg {
	width: 24px;
	height: 24px;
	stroke: #bbb;
	stroke-width: 2;
	stroke-linecap: round;
	filter: drop-shadow(0 1px 2px rgba(255, 255, 255, 0.9));
}

/* ============================================
   Counter (1 / 10)
   ============================================ */

.cm-lightbox-counter {
	position: fixed;
	top: 40px;
	left: 30px;

	/* Schwarze feine Schrift */
	color: #000;
	font-size: 16px;
	font-weight: 300;
	letter-spacing: 0.5px;

	background: rgba(255, 255, 255, 0.9);
	padding: 8px 15px;
	border-radius: 20px;
	border: 1px solid rgba(0, 0, 0, 0.1);
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
	.cm-lightbox-content {
		max-width: 95%;
		max-height: 95%;
	}

	.cm-lightbox-image-container {
		max-height: 400px;
	}

	.cm-lightbox-image {
		max-height: 400px;
	}

	.cm-lightbox-nav {
		width: 50px;
		height: 50px;
	}

	.cm-lightbox-prev {
		left: 10px;
	}

	.cm-lightbox-next {
		right: 10px;
	}

	.cm-lightbox-close {
		top: 10px;
		right: 10px;
		width: 45px;
		height: 45px;
	}

	/* Admin-Bar Offset (Mobile < 783px = 46px hoch) */
	.admin-bar .cm-lightbox-close {
		top: 56px; /* 46px Admin-Bar + 10px Abstand */
	}

	.cm-lightbox-counter {
		top: 15px;
		left: 15px;
		font-size: 14px;
		padding: 6px 12px;
	}

	.cm-lightbox-title {
		font-size: 15px;
	}

	.cm-lightbox-meta-item {
		font-size: 14px;
	}

	.cm-lightbox-info {
		margin-top: 15px;
		padding: 10px;
	}
}

@media (max-width: 480px) {
	.cm-lightbox-nav {
		width: 40px;
		height: 40px;
	}

	.cm-lightbox-nav svg {
		width: 22px;
		height: 22px;
	}

	.cm-lightbox-prev {
		left: 5px;
	}

	.cm-lightbox-next {
		right: 5px;
	}

	.cm-lightbox-close {
		width: 40px;
		height: 40px;
		top: 5px;
		right: 5px;
	}

	/* Admin-Bar Offset überschreibt für sehr kleine Screens */
	.admin-bar .cm-lightbox-close {
		top: 51px; /* 46px Admin-Bar + 5px Abstand */
	}

	.cm-lightbox-close svg {
		width: 22px;
		height: 22px;
	}

	.cm-lightbox-counter {
		font-size: 13px;
		padding: 5px 10px;
	}

	.cm-lightbox-title {
		font-size: 16px;
	}

	.cm-lightbox-meta {
		gap: 10px;
		font-size: 13px;
	}
}

/* ============================================
   Prevent Body Scroll when Lightbox Open
   ============================================ */

body.cm-lightbox-open {
	overflow: hidden;
}