.sm-popup {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 48px 5vw;
}

.sm-popup.sm-popup--active {
	display: flex;
}

.sm-popup__overlay {
	position: absolute;
	inset: 0;
	background: rgba(16, 24, 40, 0.64);
}

.sm-popup__dialog {
	position: relative;
	z-index: 1;
	width: min(90vw, var(--sm-popup-width, 458px));
	max-height: min(88vh, 820px);
	background: var(--sm-popup-bg, #ffffff);
	border-radius: 24px;
	box-shadow: 0 24px 80px rgba(16, 24, 40, 0.28);
	outline: none;
}

.sm-popup__close {
	position: absolute;
	top: -18px;
	right: -18px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	color: #1d2939;
	background: #ffffff;
	border: 0;
	border-radius: 999px;
	box-shadow: 0 12px 32px rgba(16, 24, 40, 0.22);
	cursor: pointer;
}

.sm-popup__close:hover,
.sm-popup__close:focus-visible {
	color: #111827;
}

.sm-popup__close:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

.sm-popup__close svg {
	display: block;
	width: 24px;
	height: 24px;
}

.sm-popup__content {
	max-height: min(88vh, 820px);
	overflow: auto;
	padding: 32px;
	border-radius: inherit;
}

.sm-popup__title {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.sm-popup__body > :first-child {
	margin-top: 0;
}

.sm-popup__body > :last-child {
	margin-bottom: 0;
}

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

@media (max-width: 544px) {
	.sm-popup {
		padding: 40px 5vw;
	}

	.sm-popup__dialog {
		width: 90vw;
		max-height: 86vh;
		border-radius: 18px;
	}

	.sm-popup__close {
		top: -16px;
		right: -8px;
	}

	.sm-popup__content {
		max-height: 86vh;
		padding: 24px;
	}
}
