html.mpub-open {
	overflow: hidden;
}

#mpub-modal {
	box-sizing: border-box;
	position: fixed;
	inset: 0;
	margin: auto;
	width: min(48rem, calc(100% - 2rem));
	max-width: none;
	max-height: calc(100% - 2rem);
	max-height: calc(100dvh - 2rem);
	overflow: auto;
	overscroll-behavior: contain;
	padding: 0;
	border: 0;
	border-radius: 1rem;
	background: #fff;
	color: #17263a;
	box-shadow: 0 1rem 4rem rgba(0, 0, 0, 0.32);
}

#mpub-modal.mpub-show-form {
	width: min(40rem, calc(100% - 2rem));
}

#mpub-modal:is(.mpub-sticker, .mpub-auto):not(.mpub-show-form),
#mpub-modal:is(.mpub-sticker, .mpub-auto):not(.mpub-show-form) :is(.mpub-main, .mpub-banner, .mpub-media, .mpub-message, .mpub-actions) {
	background: transparent !important;
	box-shadow: none !important;
	border: 0 !important;
	border-radius: 0 !important;
}

#mpub-modal.mpub-sticker:not(.mpub-show-form)::backdrop {
	background: rgba(10, 19, 31, 0.48);
}

#mpub-modal.mpub-sticker:not(.mpub-show-form) .mpub-message {
	color: #fff;
	text-shadow: 0 1px 4px #101c2a;
}

#mpub-modal::backdrop {
	background: rgba(10, 19, 31, 0.72);
}

#mpub-modal[hidden],
#mpub-modal:not([open]),
#mpub-modal [hidden] {
	display: none !important;
}

#mpub-modal .mpub-main {
	position: relative;
	padding: 3.25rem clamp(0.75rem, 3vw, 1.5rem) 1rem;
}

#mpub-modal .mpub-close {
	position: absolute;
	inset-block-start: 0.35rem;
	inset-inline-end: 0.45rem;
	display: grid;
	place-items: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #eaf0f6;
	color: #17263a;
	font: 1.65rem/1 sans-serif;
	cursor: pointer;
}

#mpub-modal .mpub-media {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 68vh;
	max-height: 68dvh;
	margin: 0 auto;
	border-radius: 0.5rem;
	object-fit: contain;
}

#mpub-modal .mpub-message,
#mpub-modal .mpub-actions {
	margin: 0.85rem 0 0;
	text-align: center;
	overflow-wrap: anywhere;
}

#mpub-modal .mpub-cta {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	max-width: 100%;
	padding: 0.6rem 1.25rem;
	border: 0;
	border-radius: 0.55rem;
	background: #18466e;
	color: #fff;
	font: inherit;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
}

#mpub-modal .mpub-cta:hover {
	background: #103250;
	color: #fff;
}

#mpub-modal .mpub-back {
	min-height: 44px;
	padding: 0 0.5rem;
	border: 0;
	background: transparent;
	color: #18466e;
	font: inherit;
	text-decoration: underline;
	cursor: pointer;
}

#mpub-modal :focus-visible {
	outline: 2px solid #145d98;
	outline-offset: 2px;
}

#mpub-form-panel :is(input, textarea, select, iframe, button) {
	box-sizing: border-box;
	max-width: 100%;
}

#mpub-modal #mpub-form-panel {
	--mpub-form-text: #19365d;
	--mpub-form-line: #9eafc8;
	--mpub-form-red: #bf0014;
	color: var(--mpub-form-text);
}

#mpub-modal #mpub-form-panel h2 {
	margin: 0.5rem 0 1rem;
	color: inherit;
}

#mpub-modal #mpub-form-panel :is(label, .wpforms-field-label, .wpforms-field-label-inline) {
	color: var(--mpub-form-text);
	font-size: 0.875rem;
	font-weight: 400;
}

#mpub-modal #mpub-form-panel :is(input:not([type]), input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="number"], input[type="date"], textarea, select) {
	display: block;
	width: 100%;
	max-width: 100%;
	min-height: 2.5rem;
	padding: 0.45rem 0.125rem;
	border: 0;
	border-bottom: 1px solid var(--mpub-form-line);
	border-radius: 0;
	box-shadow: none;
	background: transparent;
	color: var(--mpub-form-text);
	font: inherit;
}

#mpub-modal #mpub-form-panel textarea {
	min-height: 9rem;
	resize: vertical;
}

#mpub-modal #mpub-form-panel :is(button[type="submit"], input[type="submit"]) {
	min-height: 2.5rem;
	padding: 0.5rem 1rem;
	border: 0;
	border-radius: 0.35rem;
	box-shadow: none;
	background: var(--mpub-form-red);
	color: #fff;
	font-weight: 700;
	cursor: pointer;
}

#mpub-modal #mpub-form-panel :is(button[type="submit"], input[type="submit"]):hover {
	background: #990010;
}

#mpub-modal #mpub-form-panel :is([aria-invalid="true"], .wpforms-error:not(label)) {
	border-bottom-color: var(--mpub-form-red);
}
