/*
 * Email sign-up pop-up (includes/welcomePopup.php).
 *
 * Every rule starts with .mpw-wp so it outranks the theme's element styles
 * for headings, paragraphs, inputs and buttons. Colours and fonts come from
 * the theme's custom properties; the blue is the logo's.
 */

.mpw-wp[hidden],
.mpw-wp [hidden] {
	display: none !important;
}

.mpw-wp,
.mpw-wp *,
.mpw-wp *::before,
.mpw-wp *::after {
	box-sizing: border-box;
}

html.mpw-wp-open {
	overflow: hidden;
}

.mpw-wp {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	color: var(--color-header, #171f25);
	font-family: var(--body-font-family, sans-serif);
	text-align: center;
}

.mpw-wp .mpw-wp__backdrop {
	position: absolute;
	inset: 0;
	background-color: rgba(23, 31, 37, 0.6);
	opacity: 0;
	transition: opacity 0.2s ease;
}

.mpw-wp .mpw-wp__dialog {
	position: relative;
	display: flex;
	width: 100%;
	max-width: 740px;
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	overflow: auto;
	background-color: #fff;
	border-radius: 14px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
	opacity: 0;
	transform: translateY(12px) scale(0.98);
	transition: opacity 0.2s ease, transform 0.2s ease;
	outline: none;
}

.mpw-wp.is-open .mpw-wp__backdrop,
.mpw-wp.is-open .mpw-wp__dialog {
	opacity: 1;
}

.mpw-wp.is-open .mpw-wp__dialog {
	transform: none;
}

/* Photo: left column on desktop, a strip across the top on phones. On desktop
   it is cropped from its left edge, so the pine and the candle show beside the
   glass. */
.mpw-wp .mpw-wp__media {
	position: relative;
	flex: 0 0 48%;
	overflow: hidden;
	background-color: #e9eef1;
}

.mpw-wp .mpw-wp__media picture,
.mpw-wp .mpw-wp__media img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	max-width: none;
	height: 100%;
	margin: 0;
}

.mpw-wp .mpw-wp__media img {
	object-fit: cover;
	object-position: 0 50%;
}

.mpw-wp .mpw-wp__body {
	flex: 1 1 52%;
	min-width: 0;
	padding: 30px 28px 20px;
}

.mpw-wp .mpw-wp__close {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	background-color: rgba(255, 255, 255, 0.92);
	border: 0;
	border-radius: 50%;
	box-shadow: none;
	color: var(--color-header, #171f25);
	cursor: pointer;
}

.mpw-wp .mpw-wp__close svg {
	display: block;
	width: 22px;
	height: 22px;
	fill: currentColor;
}

.mpw-wp .mpw-wp__close:hover {
	background-color: #eef2f4;
}

.mpw-wp .mpw-wp__close:focus-visible,
.mpw-wp .mpw-wp__submit:focus-visible {
	outline: 3px solid var(--color-secondary-dark, #3b7e97);
	outline-offset: 2px;
}

/* Logo, with the tagline set as text under the dark wordmark. */
.mpw-wp .mpw-wp__brand {
	margin: 0 0 14px;
}

.mpw-wp .mpw-wp__logo {
	display: block;
	width: 190px;
	max-width: 70%;
	height: auto;
	margin: 0 auto;
}

.mpw-wp .mpw-wp__tagline {
	display: block;
	margin-top: 5px;
	color: #1c9fbd;
	font-family: var(--heading-font-family, inherit);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.28em;
	line-height: 1;
	text-transform: uppercase;
}

.mpw-wp .mpw-wp__eyebrow {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 10px;
	color: inherit;
	font-family: var(--heading-font-family, inherit);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.16em;
	line-height: 1.3;
	text-transform: uppercase;
}

.mpw-wp .mpw-wp__eyebrow::before,
.mpw-wp .mpw-wp__eyebrow::after {
	content: "";
	flex: 1 1 auto;
	height: 2px;
	background-color: #1c9fbd;
}

.mpw-wp .mpw-wp__title {
	margin: 0 0 10px;
	padding: 0;
	color: inherit;
	font-family: var(--heading-font-family, inherit);
	font-size: 30px;
	font-weight: 800;
	letter-spacing: 0;
	line-height: 1.12;
	text-transform: none;
	text-wrap: balance;
}

.mpw-wp .mpw-wp__lead {
	margin: 0 0 18px;
	font-size: 17px;
	line-height: 1.45;
}

/* Form. */
.mpw-wp .mpw-wp__form {
	margin: 0;
}

.mpw-wp .mpw-wp__field {
	position: relative;
	margin: 0 0 12px;
}

.mpw-wp .mpw-wp__field svg {
	position: absolute;
	top: 50%;
	left: 15px;
	width: 20px;
	height: 20px;
	fill: #5b6b75;
	transform: translateY(-50%);
	pointer-events: none;
}

.mpw-wp .mpw-wp__input {
	display: block;
	width: 100%;
	height: 52px;
	margin: 0;
	padding: 0 14px 0 46px;
	background-color: #fff;
	border: 1.5px solid #8fb9cc;
	border-radius: 10px;
	box-shadow: none;
	color: var(--color-header, #171f25);
	font-family: inherit;
	font-size: 17px;
	line-height: normal;
}

.mpw-wp .mpw-wp__input::placeholder {
	color: #6b7a83;
	opacity: 1;
}

.mpw-wp .mpw-wp__input:focus {
	border-color: var(--color-secondary-dark, #3b7e97);
	box-shadow: 0 0 0 3px rgba(77, 156, 185, 0.25);
	outline: none;
}

.mpw-wp .mpw-wp__input[aria-invalid="true"] {
	border-color: #b42318;
}

.mpw-wp .mpw-wp__submit {
	display: block;
	width: 100%;
	min-height: 52px;
	margin: 0;
	padding: 12px 20px;
	/* The theme's primary gold, lighter at the top as in the mockup. */
	background: #bc9442 linear-gradient(180deg, #cdaa62 0%, #bc9442 100%);
	border: 0;
	border-radius: 999px;
	box-shadow: 0 2px 6px rgba(151, 118, 53, 0.35);
	color: var(--color-header, #171f25);
	cursor: pointer;
	font-family: var(--heading-font-family, inherit);
	font-size: 20px;
	font-weight: 700;
	letter-spacing: 0;
	line-height: 1.2;
	text-transform: none;
}

.mpw-wp .mpw-wp__submit:hover {
	background: #b08a3c;
	color: var(--color-header, #171f25);
}

.mpw-wp .mpw-wp__submit[disabled] {
	cursor: progress;
	opacity: 0.75;
}

.mpw-wp .mpw-wp__error {
	margin: -4px 0 10px;
	color: #b42318;
	font-size: 15px;
	line-height: 1.4;
}

.mpw-wp .mpw-wp__note {
	margin: 10px 0 0;
	font-size: 16px;
	line-height: 1.4;
}

.mpw-wp .mpw-wp__legal {
	margin: 14px 0 0;
	padding-top: 10px;
	border-top: 1px solid #e3e8eb;
	color: #5b6b75;
	font-size: 13px;
	font-style: italic;
	font-synthesis: style;
	line-height: 1.4;
}

/* After signing up. */
.mpw-wp .mpw-wp__done {
	outline: none;
}

.mpw-wp .mpw-wp__done-title {
	margin: 4px 0 6px;
	font-family: var(--heading-font-family, inherit);
	font-size: 24px;
	font-weight: 800;
	line-height: 1.2;
}

.mpw-wp .mpw-wp__done-text {
	margin: 0 0 16px;
	font-size: 17px;
	line-height: 1.45;
	overflow-wrap: anywhere;
}

.mpw-wp.is-done .mpw-wp__legal {
	display: none;
}

/* Hidden from people, there for screen readers and bots respectively. */
.mpw-wp .mpw-wp__sr,
.mpw-wp .mpw-wp__hp {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Phones: about 90% of the screen wide, photo above the offer. */
@media (max-width: 599px) {
	.mpw-wp {
		padding: 5vw;
	}

	.mpw-wp .mpw-wp__dialog {
		flex-direction: column;
		max-width: 420px;
		max-height: calc(100vh - 10vw);
		max-height: calc(100dvh - 10vw);
		border-radius: 12px;
	}

	.mpw-wp .mpw-wp__media {
		flex: 0 0 auto;
		height: 120px;
	}

	.mpw-wp .mpw-wp__media img {
		object-position: 45% 60%;
	}

	.mpw-wp .mpw-wp__body {
		padding: 16px 18px 14px;
	}

	.mpw-wp .mpw-wp__close {
		top: 8px;
		right: 8px;
		width: 44px;
		height: 44px;
	}

	.mpw-wp .mpw-wp__brand {
		margin-bottom: 10px;
	}

	.mpw-wp .mpw-wp__logo {
		width: 150px;
	}

	.mpw-wp .mpw-wp__title {
		font-size: 24px;
	}

	.mpw-wp .mpw-wp__lead {
		margin-bottom: 14px;
		font-size: 16px;
	}

	.mpw-wp .mpw-wp__lead em {
		font-size: 14px;
	}

	.mpw-wp .mpw-wp__submit {
		font-size: 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mpw-wp .mpw-wp__backdrop,
	.mpw-wp .mpw-wp__dialog {
		transition: none;
	}
}
