html.mkpm-popup-open,
html.mkpm-popup-open body {
	overflow: hidden;
}

.mkpm-popup[hidden] {
	display: none !important;
}

.mkpm-popup {
	position: fixed;
	z-index: 2147483000;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgb(0 0 0 / 68%);
	opacity: 0;
	box-sizing: border-box;
	transition: opacity 180ms ease;
}

.mkpm-popup.is-visible {
	opacity: 1;
}

.mkpm-popup__dialog {
	position: relative;
	width: min(var(--mkpm-desktop-width, 561px), calc(100vw - 48px));
	max-height: calc(100vh - 48px);
	max-height: calc(100dvh - 48px);
	transform: translateY(12px) scale(0.985);
	transition: transform 180ms ease;
}

.mkpm-popup.is-visible .mkpm-popup__dialog {
	transform: translateY(0) scale(1);
}

.mkpm-popup__link,
.mkpm-popup picture,
.mkpm-popup__image {
	display: block;
	width: 100%;
}

.mkpm-popup__link {
	color: inherit;
	text-decoration: none;
}

.mkpm-popup__image {
	max-width: 100%;
	max-height: calc(100vh - 48px);
	max-height: calc(100dvh - 48px);
	width: 100%;
	height: auto;
	border: 0;
	object-fit: contain;
	box-shadow: 0 18px 60px rgb(0 0 0 / 35%);
}

.mkpm-popup button.mkpm-popup__close {
	position: absolute;
	z-index: 2;
	top: -14px;
	right: -14px;
	display: grid;
	place-items: center;
	width: 38px;
	min-width: 0;
	max-width: none;
	height: 38px;
	min-height: 0;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 2px solid #fff;
	border-radius: 50%;
	background-color: var(--mkpm-close-color, #111);
	background-image: none;
	color: var(--mkpm-close-icon-color, #fff);
	box-shadow: 0 4px 15px rgb(0 0 0 / 30%);
	box-sizing: border-box;
	font: inherit;
	font-size: 0;
	font-weight: 400;
	line-height: 1;
	letter-spacing: normal;
	text-align: center;
	text-decoration: none;
	text-transform: none;
	white-space: normal;
	cursor: pointer;
	user-select: none;
	overflow: visible;
	transition: filter 180ms ease;
	-webkit-appearance: none;
	appearance: none;
}

.mkpm-popup button.mkpm-popup__close:hover,
.mkpm-popup button.mkpm-popup__close:focus-visible {
	background-color: var(--mkpm-close-color, #111);
	color: var(--mkpm-close-icon-color, #fff);
	filter: brightness(1.15);
}

.mkpm-popup button.mkpm-popup__close:focus-visible {
	outline: 3px solid #72aee6;
	outline-offset: 2px;
}

.mkpm-popup button.mkpm-popup__close svg {
	display: block;
	width: 22px;
	max-width: none;
	height: 22px;
	fill: currentcolor;
}

@media (max-width: 767px) {
	.mkpm-popup {
		padding: 16px;
	}

	.mkpm-popup__dialog {
		width: min(var(--mkpm-mobile-width, 420px), calc(100vw - 32px));
		max-height: calc(100vh - 32px);
		max-height: calc(100dvh - 32px);
	}

	.mkpm-popup__image {
		max-height: calc(100vh - 32px);
		max-height: calc(100dvh - 32px);
	}

	.mkpm-popup button.mkpm-popup__close {
		top: -11px;
		right: -11px;
		width: 36px;
		height: 36px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mkpm-popup,
	.mkpm-popup__dialog {
		transition: none;
	}
}
