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

.apm-popup {
	--apm-accent: #1e73be;
	--apm-surface: #ffffff;
	--apm-text: #1f2937;
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: grid;
	place-items: center;
	padding: clamp(16px, 4vw, 40px);
	box-sizing: border-box;
	font-family: inherit;
}

.apm-popup *,
.apm-popup *::before,
.apm-popup *::after {
	box-sizing: border-box;
}

.apm-popup__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.72);
	opacity: 0;
	transition: opacity 180ms ease;
}

.apm-popup__dialog {
	position: relative;
	z-index: 1;
	width: min(100%, 620px);
	max-height: min(88vh, 800px);
	overflow: auto;
	overscroll-behavior: contain;
	padding: clamp(28px, 5vw, 48px);
	border-radius: 16px;
	background: var(--apm-surface);
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
	color: var(--apm-text);
	opacity: 0;
	transform: translateY(18px) scale(0.98);
	transition: opacity 180ms ease, transform 180ms ease;
}

.apm-popup--open .apm-popup__backdrop,
.apm-popup--open .apm-popup__dialog {
	opacity: 1;
}

.apm-popup--open .apm-popup__dialog {
	transform: translateY(0) scale(1);
}

.apm-popup__dialog:focus {
	outline: none;
}

.apm-popup__close {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	box-shadow: none;
	color: currentColor;
	font: inherit;
	font-size: 32px;
	font-weight: 300;
	line-height: 1;
	cursor: pointer;
	opacity: 0.65;
	transition: background-color 150ms ease, opacity 150ms ease;
}

.apm-popup__close:hover,
.apm-popup__close:focus-visible {
	background: rgba(15, 23, 42, 0.08);
	opacity: 1;
}

.apm-popup__close:focus-visible {
	outline: 2px solid var(--apm-accent);
	outline-offset: 2px;
}

.apm-popup__content > :first-child {
	margin-top: 0;
}

.apm-popup__content > :last-child {
	margin-bottom: 0;
}

.apm-popup__content img,
.apm-popup__content iframe,
.apm-popup__content video {
	max-width: 100%;
}

.apm-popup__content input:not([type="checkbox"]):not([type="radio"]),
.apm-popup__content select,
.apm-popup__content textarea {
	max-width: 100%;
}

.apm-popup-is-open {
	overflow: hidden;
}

@media (max-width: 600px) {
	.apm-popup {
		align-items: end;
		padding: 12px;
	}

	.apm-popup__dialog {
		width: 100%;
		max-height: calc(100dvh - 24px);
		padding: 36px 22px 26px;
		border-radius: 16px 16px 10px 10px;
		transform: translateY(24px);
	}
}

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