/* GAL-1: gallery with lightbox */

/*
 * Core takes the gallery gap from this variable, on the front end and in the editor,
 * and works out the column widths from it. The gap itself is set to the same value.
 */
.wprk-gal-1 .wp-block-gallery.has-nested-images {
	--wp--style--gallery-gap-default: var(--wp--preset--spacing--20);
	gap: var(--wp--preset--spacing--20);
}

/* Even tiles, whatever the shape of each upload. Core already crops with object-fit. */
.wprk-gal-1 .wp-block-gallery.has-nested-images figure.wp-block-image img {
	aspect-ratio: 4 / 3;
}

/* Enlarge button: finger-sized, in the theme's shape. Core shows it on hover and on focus. */
.wprk-gal-1 .wp-lightbox-container button {
	border-radius: var(--wp--custom--radius--sm);
	height: 2.75rem;
	width: 2.75rem;
}

.wprk-gal-1 .wp-lightbox-container button svg {
	height: 1rem;
	width: 1rem;
}

/* Keyboard focus: a two-tone ring on the button, which shows on any photo, and a ring around the tile. */
.wprk-gal-1 .wp-lightbox-container button:focus-visible {
	box-shadow: 0 0 0 4px var(--wprk-focus);
	outline: 2px solid var(--wprk-bg);
	outline-offset: 0;
}

.wprk-gal-1 .wp-lightbox-container:has(button:focus-visible) img {
	outline: 2px solid var(--wprk-focus);
	outline-offset: 2px;
}

@media (min-width: 782px) {
	.wprk-gal-1 .wp-block-gallery.has-nested-images {
		--wp--style--gallery-gap-default: var(--wp--preset--spacing--40);
		gap: var(--wp--preset--spacing--40);
	}
}
