/* Madtanterne Lightbox */

.mtlb-open,
.mtlb-open body {
	overflow: hidden;
}

.mtlb {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	animation: mtlb-fade 0.2s ease-out;
}

.mtlb[hidden] {
	display: none;
}

.mtlb__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, var(--mtlb-opacity, 0.5));
}

.mtlb__stage {
	position: relative;
	margin: 0;
	max-width: var(--mtlb-max-width, 95vw);
	max-height: 90vh;
	padding: 8px;
	background: #fff;
	border-radius: 4px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
	text-align: center;
	animation: mtlb-zoom 0.25s ease-out;
}

.mtlb__img {
	display: block;
	max-width: calc(var(--mtlb-max-width, 95vw) - 16px);
	max-height: calc(90vh - 60px);
	width: auto;
	height: auto;
	margin: 0 auto;
	cursor: pointer;
}

.mtlb__img[hidden],
.mtlb__error[hidden],
.mtlb__caption[hidden],
.mtlb__btn[hidden] {
	display: none;
}

.mtlb.is-loading .mtlb__img {
	visibility: hidden;
	min-width: 200px;
	min-height: 150px;
}

.mtlb__spinner {
	display: none;
	position: absolute;
	top: 50%;
	left: 50%;
	width: 36px;
	height: 36px;
	margin: -18px 0 0 -18px;
	border: 3px solid #ddd;
	border-top-color: #f8560e;
	border-radius: 50%;
	animation: mtlb-spin 0.8s linear infinite;
}

.mtlb.is-loading .mtlb__spinner {
	display: block;
}

.mtlb__caption {
	padding: 8px 4px 2px;
	color: #333;
	font-size: 15px;
	line-height: 1.4;
}

.mtlb__error {
	margin: 40px 20px;
	color: #333;
}

.mtlb__counter {
	position: absolute;
	top: 14px;
	left: 16px;
	color: #fff;
	font-size: 14px;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.mtlb__btn {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	font-size: 34px;
	line-height: 1;
	cursor: pointer;
}

.mtlb__btn:hover,
.mtlb__btn:focus-visible {
	background: #f8560e;
}

.mtlb__btn:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

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

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

.mtlb__close {
	top: 10px;
	right: 12px;
	font-size: 30px;
}

@media (max-width: 600px) {
	.mtlb__btn {
		width: 40px;
		height: 40px;
		font-size: 28px;
	}

	.mtlb__prev,
	.mtlb__next {
		top: auto;
		bottom: 16px;
		transform: none;
	}
}

@keyframes mtlb-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes mtlb-zoom {
	from { transform: scale(0.92); opacity: 0; }
	to { transform: scale(1); opacity: 1; }
}

@keyframes mtlb-spin {
	to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
	.mtlb,
	.mtlb__stage,
	.mtlb__spinner {
		animation: none;
	}
}
