.naturamed-site-form-popup-trigger-wrap {
	display: inline-flex;
	vertical-align: middle;
}

.naturamed-site-form-popup-trigger {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	white-space: normal !important;
	line-height: 1.25;
	text-align: center;
}

.naturamed-site-form-popup-trigger__text {
	display: inline-block;
	white-space: normal !important;
	line-height: 1.25;
	text-align: center;
}

/* Окно */
.popup-window.naturamed-site-form-popup-window {
	--nsf-popup-pad-x: 24px;
	--nsf-popup-pad-y: 20px;
	--nsf-popup-radius: 12px;
	--nsf-popup-border: rgba(33, 37, 41, 0.08);
	--nsf-popup-shadow: 0 18px 48px rgba(15, 23, 42, 0.22);
	--nsf-popup-title: var(--text-color, #1a1a1a);

	width: min(380px, calc(100vw - 32px));
	max-width: calc(100vw - 32px);
	border: 1px solid var(--nsf-popup-border);
	border-radius: var(--nsf-popup-radius);
	box-shadow: var(--nsf-popup-shadow);
	overflow: hidden;
	background: #fff;
}

@media (min-width: 768px) {
	.popup-window.naturamed-site-form-popup-window {
		width: min(400px, calc(100vw - 48px));
	}
}

.popup-window.naturamed-site-form-popup-window .popup-window-content {
	padding: 8px var(--nsf-popup-pad-x) var(--nsf-popup-pad-y);
	box-sizing: border-box;
	background: #fff;
}

/* Заголовок */
.popup-window.naturamed-site-form-popup-window .popup-window-titlebar,
.popup-window.naturamed-site-form-popup-window .popup-window-titlebar-text-wrp {
	min-height: 56px;
	background: #fff;
	border-bottom: 1px solid var(--nsf-popup-border);
}

.popup-window.naturamed-site-form-popup-window .popup-window-titlebar-text {
	font-size: 1.35rem;
	font-weight: 900;
	line-height: 1.25;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--nsf-popup-title);
	padding: 16px 48px 16px var(--nsf-popup-pad-x);
}

/* Крестик: рисуем CSS-ом — ui-icon-set на публичной части часто не подгружается */
.popup-window.naturamed-site-form-popup-window .popup-window-close-icon {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 32px;
	height: 32px;
	margin: 0;
	padding: 0;
	border: 0;
	opacity: 0.65;
	cursor: pointer;
	background: transparent !important;
	background-image: none !important;
	z-index: 5;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.popup-window.naturamed-site-form-popup-window .popup-window-close-icon .ui-icon-set {
	display: none !important;
}

.popup-window.naturamed-site-form-popup-window .popup-window-close-icon::before,
.popup-window.naturamed-site-form-popup-window .popup-window-close-icon::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 18px;
	height: 2px;
	background-color: #1a1a1a;
	border-radius: 1px;
}

.popup-window.naturamed-site-form-popup-window .popup-window-close-icon::before {
	transform: translate(-50%, -50%) rotate(45deg);
}

.popup-window.naturamed-site-form-popup-window .popup-window-close-icon::after {
	transform: translate(-50%, -50%) rotate(-45deg);
}

.popup-window.naturamed-site-form-popup-window .popup-window-close-icon:hover {
	opacity: 1;
	transform: scale(1.05);
}

/* Оверлей */
.popup-window-overlay.popup-window-overlay-naturamed-site-form-popup-window,
.bx-popup-overlay {
	backdrop-filter: blur(2px);
}

/* Контент формы */
.naturamed-site-form-root--popup {
	width: 100%;
}

.naturamed-site-form-root--popup .powermail_fieldset {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.naturamed-site-form-root--popup .powermail_fieldwrap_input {
	margin-bottom: 0.85rem;
}

.naturamed-site-form-root--popup .form-control,
.naturamed-site-form-root--popup .powermail_input,
.naturamed-site-form-root--popup .powermail_textarea {
	min-height: 44px;
	border-radius: 6px;
	border-color: #ced4da;
	box-shadow: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.naturamed-site-form-root--popup .form-control:focus,
.naturamed-site-form-root--popup .powermail_input:focus,
.naturamed-site-form-root--popup .powermail_textarea:focus {
	border-color: #86b7fe;
	box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.naturamed-site-form-root--popup .powermail_textarea {
	min-height: 110px;
	resize: vertical;
}

.naturamed-site-form-root--popup .powermail_check_outer {
	margin: 4px 0 12px;
	padding: 12px 14px;
	border-radius: 8px;
	background: #f7f8fa;
	border: 1px solid var(--nsf-popup-border, rgba(33, 37, 41, 0.08));
}

.naturamed-site-form-root--popup .powermail_check_inner label {
	font-size: 0.75rem;
	line-height: 1.4;
	color: #495057;
	margin-bottom: 0;
}

.naturamed-site-form-root--popup .powermail_check_inner a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.naturamed-site-form-root--popup .powermail_fieldwrap_submit {
	margin-top: 4px;
}

.naturamed-site-form-root--popup .powermail_submit {
	width: 100%;
	min-height: 46px;
	font-weight: 600;
	border-radius: 6px;
}

.naturamed-site-form-root--popup .naturamed-site-form__errors {
	margin-bottom: 14px;
	padding: 10px 12px;
	border-radius: 6px;
	background: #fdecea;
	border: 1px solid #f5c2c7;
}

.naturamed-site-form-root--popup > .success {
	margin: 8px 0 4px;
	text-align: center;
}

.naturamed-site-form-root--popup > .success .notetext,
.naturamed-site-form-root--popup > .success [data-role="success-text"] {
	font-size: 1.2rem;
	line-height: 1.4;
	font-weight: 600;
}

.naturamed-site-form-root--popup .naturamed-site-form__field-error {
	margin-top: 6px;
}

.naturamed-site-form-root--popup .naturamed-site-form__captcha {
	margin-top: 4px;
	margin-bottom: 8px;
}

@media (max-width: 575.98px) {
	.popup-window.naturamed-site-form-popup-window .popup-window-titlebar-text {
		font-size: 1.1rem;
		padding-right: 44px;
	}

	.popup-window.naturamed-site-form-popup-window .popup-window-content {
		padding-left: 16px;
		padding-right: 16px;
		padding-bottom: 16px;
	}
}
