/* Checklist popup ("Your Next Step"). Loaded only when the popup is on or previewed (inc/checklist-popup.php).
   Design pixels: Figma 559:139, desktop card 978 x 514 (node 368:32) and mobile 440 x 956 (node 559:98). */
html.ffp-popup-open { overflow: hidden; }

.ffp-cp {
	box-sizing: border-box;
	position: fixed;
	width: min(978px, calc(100% - 2rem));
	max-width: none;
	max-height: calc(100dvh - 2rem);
	margin: auto;
	padding: 28px 41px 46px 45px;
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	color: var(--wp--preset--color--cream);
	text-align: left;
	background-color: var(--wp--preset--color--navy-900);
	border: 2px solid #906525;
	box-shadow: 0 40px 90px rgba(0, 0, 0, 0.45);
	isolation: isolate;
}
.ffp-cp:focus { outline: 0; }
.ffp-cp::backdrop { background: rgba(5, 15, 26, 0.8); }
/* The soft blue glow behind the tablet and the heading (Figma "Ellipse 16": 586px, blur). */
.ffp-cp::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: url("../images/popup/glow.svg") no-repeat calc(412px - 593px) calc(257px - 593px) / 1186px 1186px;
	pointer-events: none;
}
.ffp-cp[open] {
	display: grid;
	grid-template-columns: 294px minmax(0, 1fr);
	grid-template-rows: auto auto;
	align-items: start;
}

.ffp-cp__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	color: var(--wp--preset--color--cream);
	background: transparent;
	border: 0;
	cursor: pointer;
}
.ffp-cp__close svg { width: 14px; height: 12px; }
.ffp-cp__close:hover { color: var(--wp--preset--color--gold-light); }
.ffp-cp__close:focus-visible,
.ffp-cp .ffpf-button:focus-visible { outline: 2px solid var(--wp--preset--color--gold-light); outline-offset: 2px; }

.ffp-cp__media { grid-column: 1; grid-row: 1; margin: 0 0 0 3px; }
.ffp-cp__media picture,
.ffp-cp__media img { display: block; width: 297px; max-width: none; height: auto; }

.ffp-cp__copy { grid-column: 2; grid-row: 1; padding-top: 43px; min-width: 0; }
.ffp-cp__tag {
	margin: 0;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 24px;
	font-style: italic;
	line-height: 1.3;
	letter-spacing: -0.6px;
	background: linear-gradient(50deg, #f2c179 1.3%, #deb971 26.7%, #e3bc7c 52.9%, #caa15a 74.5%, #f2c179 96.3%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}
.ffp-cp__title {
	margin: 7px 0 0;
	padding-bottom: 5px;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 48px;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.6px;
	text-transform: capitalize;
	color: var(--wp--preset--color--cream);
	background: url("../images/popup/underline.svg") no-repeat 2% bottom / 83.6% 5px;
	white-space: nowrap;
}
.ffp-cp__text { max-width: 551px; margin-top: 20px; font-size: 16px; line-height: 1.5; }
.ffp-cp__text p { margin: 0 0 24px; }
.ffp-cp__text p:last-child { margin-bottom: 0; }

/* Form (FFP Forms, id 5): first name, last name, email and the gold button on one row; the optional phone field is left out here. */
.ffp-cp__form { grid-column: 1 / -1; grid-row: 2; margin-top: 3px; }
.ffp-cp .ffpf-wrapper {
	--ffpf-radius: 0;
	--ffpf-border: #d9d9d9;
	--ffpf-focus: var(--wp--preset--color--gold-light);
	--ffpf-input-bg: var(--wp--preset--color--cream);
	--ffpf-input-color: var(--wp--preset--color--navy-900);
	--ffpf-ok-bg: transparent;
	--ffpf-ok-color: var(--wp--preset--color--cream);
	--ffpf-ok-border: transparent;
	--ffpf-error: #ff8a7a;
	margin: 0;
}
.ffp-cp .ffpf-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 219px; column-gap: 4px; align-items: start; }
.ffp-cp .ffpf-body { display: contents; }
.ffp-cp .ffpf-body > .ffpf-field { grid-column: auto; grid-row: 1; min-width: 0; margin: 0; }
.ffp-cp .ffpf-field--phone { display: none; }
.ffp-cp .ffpf-input { max-width: none; }
.ffp-cp .ffpf-input input { box-sizing: border-box; width: 100%; min-height: 0; height: 48px; padding: 0 1.2rem; font-size: 16px; color: var(--wp--preset--color--navy-900); background: var(--wp--preset--color--cream); border: 1px solid #d9d9d9; border-radius: 0; }
.ffp-cp .ffpf-input input::placeholder { color: var(--wp--preset--color--navy-900); opacity: 1; }
.ffp-cp .ffpf-footer { grid-column: 4; grid-row: 1; margin: 0; }
.ffp-cp .ffpf-button { width: 100%; height: 50px; padding: 0 1rem; border: 0; }
.ffp-cp .ffpf-body > .ffpf-consent { grid-column: 1 / -1; grid-row: 2; margin-top: 14px; }
.ffp-cp .ffpf-consent__text { margin: 0; font-size: 0.8125rem; line-height: 1.4; color: var(--wp--preset--color--cream); opacity: 0.85; }
.ffp-cp .ffpf-consent__text a { color: var(--wp--preset--color--gold-light); }
.ffp-cp .ffpf-messages,
.ffp-cp .ffpf-error-banner { grid-column: 1 / -1; grid-row: 3; }
.ffp-cp .ffpf-error-banner { margin-top: 12px; padding: 0; color: #ffc2b8; background: none; border: 0; font-weight: 600; }
.ffp-cp .ffpf-validation { display: block; margin: 6px 0 0; padding: 0; color: #ffc2b8; background: none; border: 0; border-radius: 0; font-weight: 600; }
.ffp-cp .ffpf-has-error .ffpf-input input { border-color: #ff8a7a; box-shadow: inset 0 0 0 1px #ff8a7a; }
.ffp-cp .ffpf-confirmation__message { padding: 1rem 0; font-size: 1.125rem; font-weight: 600; text-align: center; border: 0; }

/* Narrow desktop / tablet: the three inputs and the button stack into two rows before the layout gets cramped. */
@media (max-width: 900px) {
	.ffp-cp .ffpf-form { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 8px; }
	.ffp-cp .ffpf-footer { grid-column: 1 / -1; grid-row: 2; }
	.ffp-cp .ffpf-button { max-width: 360px; }
	.ffp-cp .ffpf-body > .ffpf-consent { grid-row: 3; }
	.ffp-cp .ffpf-messages,
	.ffp-cp .ffpf-error-banner { grid-row: 4; }
	.ffp-cp__title { font-size: 42px; }
	.ffp-cp__form { margin-top: 20px; }
}

/* Phones: the full-height sheet from the mobile design (440 x 956). */
@media (max-width: 767px) {
	.ffp-cp {
		width: 100%;
		height: 100dvh;
		max-height: none;
		padding: 0 clamp(16px, 9.5vw, 42px) 40px;
		border: 0;
		box-shadow: none;
	}
	.ffp-cp::before { background-position: 50% calc(373px - 593px); }
	.ffp-cp[open] { display: flex; flex-direction: column; align-items: stretch; }
	.ffp-cp__close { top: 20px; right: 14px; }
	.ffp-cp__close svg { width: 19px; height: 16px; }
	.ffp-cp__copy { display: contents; }
	.ffp-cp__tag { order: 1; margin-top: 90px; font-size: 24px; text-align: center; }
	.ffp-cp__title { order: 2; align-self: center; margin-top: 2px; font-size: clamp(2rem, 10.6vw, 3rem); }
	.ffp-cp__media { order: 3; align-self: center; margin: -14px 0 0; }
	.ffp-cp__media picture,
	.ffp-cp__media img { width: min(219px, 62vw); }
	.ffp-cp__text { order: 4; max-width: none; margin-top: -5px; font-size: 15px; }
	.ffp-cp__form { order: 5; margin-top: 22px; }
	.ffp-cp .ffpf-form { grid-template-columns: minmax(0, 1fr); row-gap: 11px; }
	.ffp-cp .ffpf-body > .ffpf-field { grid-column: 1; grid-row: auto; order: 1; }
	.ffp-cp .ffpf-footer { grid-column: 1; grid-row: auto; order: 2; margin-top: 0; }
	.ffp-cp .ffpf-button { max-width: none; }
	.ffp-cp .ffpf-body > .ffpf-consent { grid-column: 1; grid-row: auto; order: 3; margin-top: 3px; }
	.ffp-cp .ffpf-messages,
	.ffp-cp .ffpf-error-banner { grid-column: 1; grid-row: auto; order: 4; }
}

@media (prefers-reduced-motion: no-preference) {
	.ffp-cp[open] { animation: ffp-cp-in 0.25s ease-out; }
	@keyframes ffp-cp-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
}
