/*
 * Marketing screenshot lightbox.
 *
 * Trigger source: `feature-tile.php` emits <button data-lightbox-src>
 * around the screenshot image. The JS at js/entry/site/marketing/lightbox.js
 * mounts <div#pc-lightbox-modal> on first click.
 *
 * Design goals:
 *   - Dark backdrop matches dark dashboard screenshots (no white→black jolt)
 *   - Max image at min(1600px, 96vw) with object-fit: contain
 *   - ESC + click-outside + close-button dismiss
 *   - Smooth opacity transition (180ms)
 *   - Mobile: tight padding, smaller close button
 */
.pc-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(2, 6, 15, 0.92);
	z-index: 9000;
	display: grid;
	place-items: center;
	padding: 4vmin;
	opacity: 0;
	transition: opacity 0.18s ease;
}

.pc-lightbox.is-open {
	opacity: 1;
}

.pc-lightbox[hidden] {
	display: none;
}

.pc-lightbox__figure {
	max-width: min(1600px, 96vw);
	max-height: 92vh;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.pc-lightbox__img {
	width: 100%;
	height: auto;
	max-height: 84vh;
	object-fit: contain;
	border-radius: 8px;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.pc-lightbox__caption {
	color: rgba(255, 255, 255, 0.7);
	font-size: 0.875rem;
	text-align: center;
	font-weight: 500;
}

.pc-lightbox__close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 0;
	background: rgba(255, 255, 255, 0.1);
	color: #ffffff;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
	transition: background 0.15s ease;
}

.pc-lightbox__close:hover,
.pc-lightbox__close:focus-visible {
	background: rgba(255, 255, 255, 0.2);
	outline: 2px solid rgba(255, 255, 255, 0.4);
	outline-offset: 2px;
}

/* Make screenshot triggers look like buttons but read as images */
.pc-feature-tile__screenshot-link {
	display: block;
	width: 100%;
	background: transparent;
	border: 0;
	padding: 0;
	cursor: zoom-in;
}

.pc-feature-tile__screenshot-link:focus-visible {
	outline: 2px solid var(--nllm-violet, #8b5cf6);
	outline-offset: 4px;
	border-radius: 8px;
}

@media (max-width: 600px) {
	.pc-lightbox {
		padding: 2vmin;
	}

	.pc-lightbox__close {
		top: 0.5rem;
		right: 0.5rem;
		width: 40px;
		height: 40px;
	}
}
