/* MOPI - Popup: stesso aspetto della finestra di Popup Anything (design 1). */

.mopi-popup {
	box-sizing: border-box;
	width: 95%;
	max-width: 800px;
	max-height: none;
	padding: 0;
	border: 0;
	overflow: visible;
	background: #fff;
	color: #333;
	line-height: normal;
	box-shadow: 0 11px 15px -7px rgba(0, 0, 0, .2), 0 24px 38px 3px rgba(0, 0, 0, .14), 0 9px 46px 8px rgba(0, 0, 0, .12);
	animation: mopi-popup-in .5s ease;
}

.mopi-popup::backdrop {
	background: rgba(0, 0, 0, .5);
}

@keyframes mopi-popup-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

/* La finestra non esce più dallo schermo: scorre il contenuto, non la pagina. */
.mopi-popup-body {
	box-sizing: border-box;
	max-height: calc(100vh - 40px);
	max-height: calc(100dvh - 40px);
	padding: 20px;
	overflow-y: auto;
}

.mopi-popup-heading,
.mopi-popup-subheading {
	margin-bottom: 15px;
	line-height: normal;
}

.mopi-popup-heading {
	font-size: 26px;
	font-weight: 700;
	color: #000;
}

.mopi-popup-subheading {
	font-size: 20px;
	font-weight: 500;
	color: #333;
}

.mopi-popup-content,
.mopi-popup-content p {
	color: #444;
}

.mopi-popup-content p {
	margin-bottom: 15px;
}

.mopi-popup-content p:last-child {
	margin-bottom: 0;
}

.mopi-popup textarea {
	max-height: 80px;
	resize: vertical;
}

.mopi-popup img {
	max-width: 100%;
	height: auto;
}

.mopi-popup-close {
	position: absolute;
	top: -10px;
	right: -10px;
	z-index: 1;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 35px;
	height: 35px;
	padding: 0;
	border: 3px solid #fff;
	border-radius: 50%;
	background: #000;
	color: #fff;
	cursor: pointer;
}

.mopi-popup-close:focus-visible {
	outline: 2px solid #008d87;
	outline-offset: 2px;
}

html:has(.mopi-popup[open]) {
	overflow: hidden;
}
