.qe-popup {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	transition: opacity .3s ease;
}
.qe-popup[hidden] { display: none !important; }
.qe-popup.is-open { opacity: 1; }

.qe-popup__overlay {
	position: absolute;
	inset: 0;
}
.qe-popup__overlay[data-qe-close] { cursor: pointer; }

.qe-popup__dialog {
	position: relative;
	width: 100%;
	max-height: calc(100vh - 40px);
	max-height: calc(100dvh - 40px);
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	border-radius: 14px;
	transform: translateY(18px) scale(.98);
	transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}
.qe-popup.is-open .qe-popup__dialog { transform: none; }

.qe-popup__content > *:first-child { margin-top: 0; }
.qe-popup__content > *:last-child { margin-bottom: 0; }

.qe-popup button.qe-popup__close {
	position: sticky;
	top: 10px;
	float: right;
	z-index: 2;
	width: 36px;
	height: 36px;
	margin: 10px 10px -46px 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .92);
	color: #3d3a36;
	font: 400 24px/36px Arial, sans-serif;
	text-align: center;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
	transition: transform .2s, background .2s;
}
.qe-popup button.qe-popup__close:hover,
.qe-popup button.qe-popup__close:focus-visible {
	background: #fff;
	transform: rotate(90deg);
	outline: none;
}

html.qe-popup-lock,
html.qe-popup-lock body { overflow: hidden; }

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