/* Lapozható képgaléria a Contact Drama főoldalon */
html.gallery-open { overflow: hidden; }

#galeria { scroll-margin-top: 6.5em; }

.gallery-dialog {
	border: 0;
	padding: 0;
	margin: 0;
	width: 100vw;
	height: 100vh;
	height: 100dvh;
	max-width: none;
	max-height: none;
	background: rgba(0, 0, 0, 0.92);
	color: #fff;
}

.gallery-dialog::backdrop { background: rgba(0, 0, 0, 0.92); }

.gallery-dialog[open] {
	display: flex;
	align-items: center;
	justify-content: center;
}

.gallery-figure {
	margin: 0;
	max-width: calc(100vw - 7em);
	text-align: center;
}

.gallery-figure img {
	display: block;
	margin: 0 auto;
	max-width: 100%;
	max-height: calc(100vh - 8em);
	max-height: calc(100dvh - 8em);
	width: auto;
	height: auto;
}

.gallery-figure figcaption {
	margin-top: 0.6em;
	font-size: 0.9em;
	line-height: 1.35;
	color: #ddd;
}

.gallery-counter {
	position: absolute;
	top: 0.9em;
	left: 1em;
	font-size: 0.9em;
	color: #ddd;
}

.gallery-dialog button {
	position: absolute;
	min-width: 0;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	box-shadow: none;
	color: #fff;
	font-size: 1.75rem;
	line-height: 2.75rem;
	text-align: center;
	cursor: pointer;
}

.gallery-dialog button:hover,
.gallery-dialog button:focus-visible { background: rgba(255, 255, 255, 0.3); }

.gallery-close { top: 0.5rem; right: 0.5rem; }
.gallery-prev { left: 0.5rem; top: 50%; transform: translateY(-50%); }
.gallery-next { right: 0.5rem; top: 50%; transform: translateY(-50%); }

@media (max-width: 40em) {
	.gallery-figure { max-width: 100vw; padding: 0 0.5em; }
	.gallery-prev, .gallery-next { top: auto; bottom: 0.5rem; transform: none; }
	.gallery-figure img { max-height: calc(100vh - 11em); max-height: calc(100dvh - 11em); }
}
