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

.aeu-popup {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: grid;
	place-items: center;
	padding: 24px;
}

.aeu-popup__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(7, 17, 31, 0.72);
	backdrop-filter: blur(3px);
	opacity: 0;
	transition: opacity 180ms ease;
}

.aeu-popup__panel {
	position: relative;
	z-index: 1;
	width: min(100%, var(--aeu-popup-max-width, 720px));
	max-height: calc(100vh - 48px);
	max-height: calc(100dvh - 48px);
	filter: drop-shadow(0 22px 50px rgba(0, 0, 0, 0.35));
	opacity: 0;
	transform: translateY(12px) scale(0.97);
	transition: opacity 180ms ease, transform 180ms ease;
}

.aeu-popup.is-open .aeu-popup__backdrop,
.aeu-popup.is-open .aeu-popup__panel {
	opacity: 1;
}

.aeu-popup.is-open .aeu-popup__panel {
	transform: translateY(0) scale(1);
}

.aeu-popup__link,
.aeu-popup__image {
	display: block;
	width: 100%;
}

.aeu-popup__link {
	border-radius: 16px;
	outline-offset: 4px;
}

.aeu-popup__image {
	height: auto;
	max-height: calc(100vh - 48px);
	max-height: calc(100dvh - 48px);
	object-fit: contain;
	border-radius: 16px;
}

.aeu-popup__close {
	position: absolute;
	top: -14px;
	right: -14px;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 2px solid #fff;
	border-radius: 999px;
	background: #13233a;
	color: #fff;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
	cursor: pointer;
	transition: background-color 150ms ease, transform 150ms ease;
}

.aeu-popup__close:hover {
	background: #1fb08a;
	transform: scale(1.06);
}

.aeu-popup__close:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 3px;
}

.aeu-popup__close svg {
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-width: 2.2;
}

body.aeu-popup-is-open {
	overflow: hidden;
}

@media (max-width: 600px) {
	.aeu-popup {
		padding: 18px;
	}

	.aeu-popup__panel,
	.aeu-popup__image {
		max-height: calc(100vh - 36px);
		max-height: calc(100dvh - 36px);
	}

	.aeu-popup__close {
		top: -11px;
		right: -11px;
		width: 38px;
		height: 38px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.aeu-popup__backdrop,
	.aeu-popup__panel,
	.aeu-popup__close {
		transition: none;
	}
}
