.wpems-popup,
.wpems-modal-section--frontend {
	position: fixed !important;
	top: 50% !important;
	left: 50% !important;
	z-index: 1000001 !important;
	max-width: calc(100vw - 32px);
	max-height: calc(100vh - 32px);
	overflow: auto;
	box-sizing: border-box;
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
	transform: translate(-50%, -50%) !important;
	transition: opacity 220ms ease, visibility 220ms ease;
}

.wpems-popup.wpems-is-open,
.wpems-modal-section--frontend.wpems-is-open {
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
}

.wpems-modal-backdrop {
	position: fixed;
	inset: 0;
	z-index: 1000000;
	background: rgba(0, 0, 0, 0.67);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 220ms ease, visibility 220ms ease;
}

.wpems-modal-backdrop.wpems-is-visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

body.wpems-modal-open {
	overflow: hidden;
}

.wpems-modal-trigger--active:focus,
.wpems-modal-trigger--active:focus-visible {
	outline: none !important;
	box-shadow: none !important;
}

.wpems-modal-close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(17, 17, 17, 0.72);
	color: #fff;
	font: inherit;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	appearance: none;
	transition: background-color 160ms ease, transform 160ms ease;
}

.wpems-modal-close:hover,
.wpems-modal-close:focus {
	background: rgba(17, 17, 17, 0.9);
}

.wpems-modal-close:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.wpems-modal-close:active {
	transform: scale(0.96);
}

.wpems-modal-section--editor {
	position: relative;
	outline: 2px dashed rgba(105, 114, 125, 0.7);
	outline-offset: -2px;
}

.wpems-modal-section--editor::before {
	content: "Popup";
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 100;
	padding: 4px 8px;
	border-radius: 999px;
	background: #1f2937;
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0;
	pointer-events: none;
	text-transform: uppercase;
}
