/* Dependency-free lightbox for native Gallery blocks, built on <dialog>. */

.wp-block-gallery a[href] { cursor: zoom-in; }

dialog.waitz-lb {
	margin: 0;
	padding: 0;
	border: 0;
	width: 100vw;
	height: 100vh;
	max-width: 100vw;
	max-height: 100vh;
	background: transparent;
	overflow: hidden;
}

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

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

.waitz-lb__stage {
	margin: 0;
	max-width: 92vw;
	max-height: 92vh;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.waitz-lb__img {
	max-width: 92vw;
	max-height: 82vh;
	width: auto;
	height: auto;
	object-fit: contain;
}

.waitz-lb__bar {
	margin-top: 0.9rem;
	display: flex;
	gap: 1.25rem;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	color: #fff;
	font-size: 0.9rem;
}

.waitz-lb__credit { opacity: 0.9; }

.waitz-lb__dl {
	color: #fff;
	text-decoration: none;
	background: rgba(255, 255, 255, 0.14);
	border: 1px solid rgba(255, 255, 255, 0.5);
	padding: 0.45rem 1.1rem;
	border-radius: 999px;
	white-space: nowrap;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.waitz-lb__dl:hover,
.waitz-lb__dl:focus-visible {
	background: rgba(255, 255, 255, 0.3);
	border-color: #fff;
}

/* Circular icon buttons. Scoped under .waitz-lb so these win over the theme's global
   button rule (button:not([role=tab]) { min-width:240px; height:45px; background:#fff … }). */
.waitz-lb .waitz-lb__close,
.waitz-lb .waitz-lb__nav {
	position: absolute;
	box-sizing: border-box;
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	margin: 0;
	min-width: 0;
	max-width: none;
	border: 0;
	border-radius: 50%;
	-webkit-appearance: none;
	appearance: none;
	background: rgba(255, 255, 255, 0.16);
	color: #fff;
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
	line-height: 1;
	transition: background 0.15s ease, transform 0.1s ease;
	-webkit-tap-highlight-color: transparent;
}

.waitz-lb .waitz-lb__icon {
	display: block;
	width: 52%;
	height: 52%;
}

.waitz-lb .waitz-lb__close:hover,
.waitz-lb .waitz-lb__nav:hover,
.waitz-lb .waitz-lb__close:focus-visible,
.waitz-lb .waitz-lb__nav:focus-visible {
	background: rgba(255, 255, 255, 0.32);
	color: #fff;
}

.waitz-lb .waitz-lb__nav:active { transform: translateY(-50%) scale(0.92); }

.waitz-lb .waitz-lb__close {
	top: 1rem;
	right: 1rem;
	width: 3rem;
	height: 3rem;
	font-size: 2.4rem;
}

.waitz-lb .waitz-lb__nav {
	top: 50%;
	transform: translateY(-50%);
	width: 3.25rem;
	height: 3.25rem;
	font-size: 2.8rem;
}

.waitz-lb .waitz-lb__prev { left: 1rem; }
.waitz-lb .waitz-lb__next { right: 1rem; }

@media (max-width: 600px) {
	.waitz-lb .waitz-lb__close { width: 2.4rem; height: 2.4rem; font-size: 1.9rem; }
	.waitz-lb .waitz-lb__nav { width: 2.5rem; height: 2.5rem; font-size: 2rem; }
	.waitz-lb .waitz-lb__prev { left: 0.4rem; }
	.waitz-lb .waitz-lb__next { right: 0.4rem; }
}
