/*
 * Vero Gallery — front end.
 *
 * Styled entirely with the theme's "Lakeside Field Guide" design tokens
 * (wordpress/themes/vero-resort/style.css: --paper, --ink, --spruce, --amber,
 * --radius-sm/md/lg, --mono/--body). Those custom properties are redefined
 * wholesale under html[data-theme="dark"], so referencing var(--token) here
 * gets dark mode for free — nothing dark-mode-specific needs to live in this
 * file. Radii stick to --radius-sm/md/lg on purpose: no pills.
 */

.vero-gallery {
	margin: 40px 0;
}

.vero-gallery-empty {
	padding: 60px 24px;
	text-align: center;
	color: var(--muted);
	font-family: var(--body);
}

.vero-gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 20px;
}

.vero-gallery-item {
	display: block;
	width: 100%;
	padding: 0;
	margin: 0;
	border: 0;
	background: none;
	cursor: zoom-in;
	text-align: left;
	font: inherit;
	color: inherit;
}

.vero-gallery-item:focus-visible {
	outline: 2px solid var(--live);
	outline-offset: 2px;
	border-radius: var(--radius-sm);
}

.vero-gallery-thumb {
	display: block;
	width: 100%;
	height: 220px;
	object-fit: cover;
	border-radius: var(--radius-md);
	background: var(--surface);
	transition: transform 0.3s ease;
}

.vero-gallery-item:hover .vero-gallery-thumb {
	transform: scale(1.03);
}

.vero-gallery-caption {
	display: block;
	padding: 8px 2px 0;
	font-family: var(--mono);
	font-size: 0.72rem;
	letter-spacing: 0.05em;
	color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
	.vero-gallery-thumb {
		transition: none;
	}
}

/* ---- lightbox --------------------------------------------------------- */

.vero-gallery-lightbox {
	max-width: min(92vw, 1100px);
	max-height: 88vh;
	padding: 0;
	border: 0;
	background: var(--surface);
	color: var(--ink);
	border-radius: var(--radius-lg);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

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

.vero-gallery-lightbox::backdrop {
	background: rgba(8, 26, 24, 0.82);
}

.vero-gallery-lightbox-inner {
	position: relative;
	display: flex;
	flex-direction: column;
	max-height: 88vh;
}

.vero-gallery-lightbox-img {
	display: block;
	max-width: 100%;
	max-height: 70vh;
	margin: 0 auto;
	object-fit: contain;
	background: var(--paper);
	border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.vero-gallery-lightbox-caption {
	margin: 0;
	padding: 16px 56px;
	text-align: center;
	font-family: var(--body);
	color: var(--ink);
}

.vero-gallery-close,
.vero-gallery-prev,
.vero-gallery-next {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: var(--radius-sm);
	background: var(--spruce);
	color: #fff;
	font-size: 1.3rem;
	line-height: 1;
	cursor: pointer;
}

.vero-gallery-close:hover,
.vero-gallery-prev:hover,
.vero-gallery-next:hover,
.vero-gallery-close:focus-visible,
.vero-gallery-prev:focus-visible,
.vero-gallery-next:focus-visible {
	background: var(--live);
}

.vero-gallery-close:focus-visible,
.vero-gallery-prev:focus-visible,
.vero-gallery-next:focus-visible {
	outline: 2px solid var(--amber);
	outline-offset: 2px;
}

.vero-gallery-close {
	top: 12px;
	right: 12px;
}

.vero-gallery-prev {
	top: 50%;
	left: 12px;
	transform: translateY(-50%);
}

.vero-gallery-next {
	top: 50%;
	right: 12px;
	transform: translateY(-50%);
}
