.wp-block-ma-popup {
	--ma-accent: var(--accent, #5b21b6);
	--ma-text: var(--contrast, #e8e6ee);
	--ma-bg: var(--base, #0f0e11);
	--ma-teal: #2dd4bf;
	box-sizing: border-box;
	width: calc(100% - 2rem);
	max-width: var(--ma-popup-w, 640px);
	max-height: calc(100vh - 2rem);
	overflow: auto;
	margin: auto;
	padding: 2rem 1.5rem 1.5rem;
	border: 1px solid rgba(128, 128, 128, 0.35);
	border-radius: 14px;
	background: var(--ma-bg);
	color: var(--ma-text);
}
dialog.wp-block-ma-popup:not([open]) {
	display: none;
}
dialog.wp-block-ma-popup::backdrop {
	background: rgba(0, 0, 0, 0.7);
}
.ma-popup__body > :first-child {
	margin-top: 0;
}
.ma-popup__body > :last-child {
	margin-bottom: 0;
}
.ma-popup__close {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
}
.ma-popup__close:hover {
	background: rgba(128, 128, 128, 0.25);
}
.ma-popup__close:focus-visible {
	outline: 3px solid var(--ma-teal);
	outline-offset: 2px;
}
body:has(dialog.wp-block-ma-popup[open]) {
	overflow: hidden;
}
@media (prefers-reduced-motion: no-preference) {
	dialog.wp-block-ma-popup[open] {
		animation: ma-popup-in 0.2s ease;
	}
	@keyframes ma-popup-in {
		from { opacity: 0; transform: translateY(8px); }
		to { opacity: 1; transform: none; }
	}
}
