.pangaea-popup {
	position: fixed;
	inset: 0;
	display: none;
	z-index: 99999;
}

.pangaea-popup.is-mounted {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.pangaea-popup__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(7, 12, 20, 0.42);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	opacity: 0;
	transition: opacity 300ms ease;
}

.pangaea-popup__dialog {
	position: relative;
	width: auto;
	max-width: none;
	margin: 0;
	border-radius: 0;
	overflow: visible;
	box-shadow: none;
	background: transparent !important;
	max-height: none;
}

.pangaea-popup__link {
	display: block;
	width: auto;
	line-height: 0;
	background: transparent !important;
}

.pangaea-popup__media {
	position: relative;
	max-width: min(var(--pangaea-popup-width, 96vw), calc(100vw - 40px));
	transform: translate3d(115vw, -18vh, 0) rotate(-11deg) scale(0.72);
	transform-origin: top right;
	opacity: 0;
	transition: transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 520ms ease;
	will-change: transform, opacity;
}

.pangaea-popup__image {
	display: block;
	width: auto !important;
	height: auto !important;
	max-width: 100% !important;
	max-height: calc(100vh - 40px) !important;
	object-fit: contain !important;
	background: transparent !important;
	border-radius: 16px;
}

.pangaea-popup__close {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.65);
	color: #fff;
	font-size: 24px;
	line-height: 36px;
	cursor: pointer;
	z-index: 3;
}

.pangaea-popup__close:hover {
	background: rgba(0, 0, 0, 0.8);
}

.pangaea-popup.is-visible .pangaea-popup__backdrop {
	opacity: 1;
}

.pangaea-popup.is-visible .pangaea-popup__media {
	transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
	opacity: 1;
}

.pangaea-popup.is-closing .pangaea-popup__backdrop {
	opacity: 0;
}

.pangaea-popup.is-closing .pangaea-popup__media {
	transform: translate3d(-112vw, 16vh, 0) rotate(10deg) scale(0.74);
	opacity: 0;
}

@media (max-width: 767px) {
	.pangaea-popup.is-mounted {
		padding: 12px;
	}

	.pangaea-popup__media {
		max-width: min(var(--pangaea-popup-width, 96vw), calc(100vw - 24px));
	}

	.pangaea-popup__image {
		max-height: calc(100vh - 24px) !important;
	}
}
