@charset "utf-8";
/*
 * Lightbox (js/lightbox.js): one photo at a time in a native <dialog>, on dark blue.
 * Square buttons: close top right, back and forward at the sides, counter below.
 */

html:has(.lightbox[open]) {
	overflow: hidden;
}

.lightbox {
	box-sizing: border-box;
	width: 100vw;
	height: 100dvh;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: max(12px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px))
		max(12px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
	border: 0;
	background: transparent;
	color: var(--weiss);
	font-family: var(--schriften);
	letter-spacing: 0.1em;
	overflow: hidden;
}
.lightbox[open] {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	grid-template-rows: auto minmax(0, 1fr) auto;
	grid-template-areas:
		".      .      zu"
		"zurueck buehne weiter"
		".      zahl   .";
	align-items: center;
	gap: 8px;
}
.lightbox::backdrop {
	background: rgb(0 8 60 / 0.98);
}

.lightbox-buehne {
	grid-area: buehne;
	align-self: stretch;
	min-height: 0;
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	touch-action: pan-y pinch-zoom;
}
.lightbox-bild {
	display: block;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	transition: opacity 200ms ease-out;
}
.lightbox-bild.laedt {
	opacity: 0.25;
}

.lightbox-knopf {
	box-sizing: border-box;
	width: 3rem;
	height: 3rem;
	padding: 0;
	border: 1px solid var(--weiss);
	border-radius: 0;
	background: transparent;
	color: var(--weiss);
	font: inherit;
	font-size: 1.6rem;
	line-height: 1;
	letter-spacing: 0;
	cursor: pointer;
}
.lightbox-knopf:hover {
	background: var(--weiss);
	color: var(--blau);
}
.lightbox-knopf:focus-visible {
	outline: 2px solid var(--weiss);
	outline-offset: 3px;
}
.lightbox-knopf[hidden] {
	display: block;
	visibility: hidden;
}
.lightbox-zu {
	grid-area: zu;
}
.lightbox-zurueck {
	grid-area: zurueck;
}
.lightbox-weiter {
	grid-area: weiter;
}

.lightbox-zahl {
	grid-area: zahl;
	margin: 0;
	text-align: center;
	font-size: 0.9rem;
	font-variant-numeric: tabular-nums;
}

/* Phones: buttons in one row below the photo, the photo gets the full width. */
@media (max-width: 600px) {
	.lightbox[open] {
		grid-template-columns: auto 1fr auto;
		grid-template-areas:
			".       .    zu"
			"buehne  buehne buehne"
			"zurueck zahl weiter";
	}
}

@media (prefers-reduced-motion: reduce) {
	.lightbox-bild {
		transition: none;
	}
}
