/* Popup Subscribe Form */

#mpf-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(0, 0, 0, .55);
	opacity: 0;
	transition: opacity .3s ease;
}
#mpf-overlay.mpf-visible {
	display: flex;
	opacity: 1;
}

#mpf-panel {
	position: fixed;
	left: 50%;
	bottom: var(--mpf-offset, 24px);
	transform: translateX(-50%);
	z-index: 99999;
	display: none;
	max-height: 90vh;
	overflow: auto;
}
#mpf-panel.mpf-visible {
	display: block;
	animation: mpfSlideUp .35s ease;
}
@keyframes mpfSlideUp {
	from { opacity: 0; transform: translate(-50%, 30px); }
	to   { opacity: 1; transform: translate(-50%, 0); }
}

.mpf-box {
	box-sizing: border-box;
	width: min(var(--mpf-w, 420px), 95vw);
	height: var(--mpf-h, auto);
	background: var(--mpf-bg, #fff);
	color: var(--mpf-text, #222);
	border-radius: var(--mpf-radius, 12px);
	padding: 30px;
	overflow: auto;
	box-shadow: 0 12px 40px rgba(0, 0, 0, .3);
}
#mpf-overlay .mpf-box {
	transform: translateY(24px);
	transition: transform .3s ease;
}
#mpf-overlay.mpf-visible .mpf-box {
	transform: none;
}

.mpf-close {
	position: absolute;
	top: 8px;
	right: 10px;
	border: 0;
	background: none;
	color: inherit;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	opacity: .6;
	padding: 4px;
}
.mpf-close:hover {
	opacity: 1;
}

.mpf-title {
	margin: 0 0 8px;
	font-size: 22px;
	font-weight: 600;
	color: inherit;
}
.mpf-desc {
	margin: 0 0 18px;
	font-size: 15px;
	line-height: 1.5;
	opacity: .85;
}

.mpf-form {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.mpf-form input[type="text"],
.mpf-form input[type="email"] {
	box-sizing: border-box;
	width: 100%;
	padding: 11px 14px;
	border: 1px solid rgba(0, 0, 0, .2);
	border-radius: calc(var(--mpf-radius, 12px) / 2);
	font-size: 15px;
	background: rgba(255, 255, 255, .9);
	color: inherit;
}
.mpf-form input:focus {
	outline: 2px solid var(--mpf-btn-bg, #2271b1);
	outline-offset: 1px;
}
.mpf-submit {
	padding: 12px 18px;
	border: 0;
	border-radius: calc(var(--mpf-radius, 12px) / 2);
	background: var(--mpf-btn-bg, #2271b1);
	color: var(--mpf-btn-text, #fff);
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: filter .2s ease;
}
.mpf-submit:hover {
	filter: brightness(1.1);
}

.mpf-msg {
	display: none;
	margin: 4px 0 0;
	font-size: 14px;
}
.mpf-msg.mpf-ok {
	display: block;
	color: #2e7d32;
}
.mpf-msg.mpf-err {
	display: block;
	color: #c62828;
}

.mpf-privacy {
	margin-top: 2px;
	font-size: 13px;
	line-height: 1.45;
	opacity: .9;
}
.mpf-privacy label {
	display: flex;
	gap: 8px;
	align-items: flex-start;
	cursor: pointer;
}
.mpf-privacy input[type="checkbox"] {
	margin-top: 2px;
	flex: none;
	width: auto;
}
.mpf-privacy a {
	color: var(--mpf-btn-bg, #2271b1);
	text-decoration: underline;
}

.mpf-extra {
	margin-top: 14px;
	font-size: 13px;
	line-height: 1.45;
}

/* Содержимое режима «Свой HTML»: базовая типографика,
   чтобы формы сторонних сервисов не разваливались. */
.mpf-custom,
.mpf-custom input,
.mpf-custom textarea,
.mpf-custom select,
.mpf-custom button {
	font-family: inherit;
	box-sizing: border-box;
}
.mpf-custom a {
	color: var(--mpf-btn-bg, #2271b1);
	text-decoration: underline;
}
.mpf-custom p {
	margin: 0 0 10px;
	line-height: 1.5;
}

body.mpf-lock {
	overflow: hidden;
}

@media (max-width: 480px) {
	.mpf-box {
		padding: 22px;
	}
}
