/**
 * ChopSkills Voting Lightbox — Overlay Styles.
 *
 * Paired with assets/js/cs-lightbox.js.
 *
 * @package ChopSkills
 * @since   1.5.0
 */

/* ── Body lock ─────────────────────────────────────────────────────── */
body.cs-lb-open {
	overflow: hidden;
}

/* ── Overlay ───────────────────────────────────────────────────────── */
.cs-lb-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	animation: cs-lb-fadein 0.18s ease;
}

.cs-lb-overlay[hidden] {
	display: none;
}

@keyframes cs-lb-fadein {
	from { opacity: 0; }
	to   { opacity: 1; }
}

/* ── Backdrop ──────────────────────────────────────────────────────── */
.cs-lb-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(4, 6, 16, 0.88);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

/* ── Inner container (centres image, above backdrop) ──────────────── */
.cs-lb-inner {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	max-width: 92vw;
	max-height: 92vh;
	overflow: hidden;
}

/* ── Image ─────────────────────────────────────────────────────────── */
.cs-lb-img {
	display: block;
	max-width: 90vw;
	max-height: 90vh;
	object-fit: contain;
	border-radius: 6px;
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
	transform-origin: center center;
	transition: transform 0.08s ease;
	will-change: transform;
	user-select: none;
	-webkit-user-drag: none;
	cursor: zoom-in;
}

/* ── Close button ──────────────────────────────────────────────────── */
.cs-lb-close {
	position: fixed;
	top: 1rem;
	right: 1rem;
	z-index: 2;
	width: 2.25rem;
	height: 2.25rem;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 50%;
	color: #fff;
	font-size: 1rem;
	cursor: pointer;
	transition: background 0.15s, transform 0.15s;
	backdrop-filter: blur(8px);
}

.cs-lb-close:hover {
	background: rgba(255, 255, 255, 0.22);
	transform: scale(1.1);
}

/* ── Zoom percentage label ─────────────────────────────────────────── */
.cs-lb-zoom-label {
	position: fixed;
	bottom: 1rem;
	left: 50%;
	transform: translateX(-50%);
	z-index: 2;
	background: rgba(0, 0, 0, 0.55);
	color: rgba(255, 255, 255, 0.75);
	font-size: 0.75rem;
	font-family: ui-monospace, monospace;
	padding: 0.2rem 0.6rem;
	border-radius: 20px;
	pointer-events: none;
	min-width: 3.5rem;
	text-align: center;
}

/* ── Hint text ─────────────────────────────────────────────────────── */
.cs-lb-zoom-label:empty {
	display: none;
}

/* ── Drag cursor (applied via JS) ──────────────────────────────────── */
.cs-lb-img[style*="grab"] {
	cursor: grab;
}
