/* Homepage 30%-off promo modal — Figma node 3176-1880 */

/* Band A — base (effective >= 1269px). `min()` collapses fixed-above/fluid-below
   into one rule: exactly 1173px at >=1269px viewport, 48px gutters below that. */
#homepagePromoModal.ui.modal.homepage-promo-modal {
	width: min(1173px, 100vw - 96px);
	max-width: none;
	margin: 0;
	border-radius: 16px;
	overflow: hidden;
	background: #032549; /* fallback while the bg image loads, over Semantic's default #fff */
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.homepage-promo-modal__close {
	position: absolute;
	top: 53px;
	right: 40px;
	width: 24px;
	height: 24px;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	z-index: 5;
}
.homepage-promo-modal__close::before,
.homepage-promo-modal__close::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 0;
	width: 100%;
	height: 1.5px;
	background: #ffffff;
}
.homepage-promo-modal__close::before { transform: rotate(45deg); }
.homepage-promo-modal__close::after { transform: rotate(-45deg); }

.homepage-promo-modal__bg {
	border-radius: inherit;
	min-height: 573px;
	display: flex;
	align-items: center;
	background-color: #032549;
	/* C412 — --promo-bg is set inline per-rule (content/homepage-promo-modal/_modal.php)
	   when an admin uploads a custom background; var()'s 2nd arg keeps the C410
	   stock photo as the fallback when no rule/upload sets the property. */
	/* Overlay re-tuned against the real Figma comp (Group 869, node 3176-1880): the
	   design's background is a single image layer with no separate tint/gradient shape
	   on top — the photo reads clearly everywhere, including behind the text. The
	   original 0.96-peak scrim here was crushing it into a flat navy block. Kept as a
	   much lighter gradient (peak ~0.3, gone by mid-width) purely as a legibility aid
	   for the white text, not a design tint. */
	background-image:
		linear-gradient(100deg, rgba(3, 37, 73, 0.30) 0%, rgba(3, 37, 73, 0.22) 22%, rgba(3, 37, 73, 0.10) 40%, rgba(3, 37, 73, 0) 58%, rgba(3, 37, 73, 0) 100%),
		var(--promo-bg, url('/images/page/homepage-promo-modal-bg-desktop.jpg'));
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
}

.homepage-promo-modal__content {
	font-family: 'Poppins', sans-serif;
	color: #ffffff;
	padding: 32px 64px;
	box-sizing: border-box;
}

.homepage-promo-modal__heading {
	font-family: 'Poppins', sans-serif;
	font-weight: 600;
	font-size: 24px;
	line-height: 38px;
	margin: 0 0 16px;
	color: #ffffff;
	max-width: 610px;
}

.homepage-promo-modal__copy {
	font-weight: 400;
	font-size: 15px;
	line-height: 28px;
	color: #ffffff;
	margin-bottom: 24px;
	max-width: 510px;
}
.homepage-promo-modal__copy p {
	margin: 0 0 16px;
}
.homepage-promo-modal__copy p:last-child {
	margin-bottom: 0;
}

.homepage-promo-modal__form {
	max-width: 510px;
}

.homepage-promo-modal__field {
	margin-bottom: 22px;
}
.homepage-promo-modal__field input {
	width: 100%;
	background: transparent;
	border: none;
	border-bottom: 1px solid #ffffff;
	color: #ffffff;
	font-family: 'Poppins', sans-serif;
	font-weight: 400;
	font-size: 15px;
	line-height: 28px;
	padding: 8px 4px;
	outline: none;
	box-sizing: border-box;
}
.homepage-promo-modal__field input::placeholder {
	color: rgba(255, 255, 255, 0.85);
}
.homepage-promo-modal__field input:-webkit-autofill,
.homepage-promo-modal__field input:-webkit-autofill:hover,
.homepage-promo-modal__field input:-webkit-autofill:focus {
	-webkit-text-fill-color: #ffffff;
	-webkit-box-shadow: 0 0 0 1000px transparent inset;
	transition: background-color 9999s ease-in-out 0s;
}

.homepage-promo-modal__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 225px;
	height: 44px;
	border-radius: 26px;
	background: #2684ff;
	border: none;
	color: #ffffff;
	font-family: 'Poppins', sans-serif;
	font-weight: 500;
	font-size: 13px;
	cursor: pointer;
	margin-top: 8px;
}
.homepage-promo-modal__submit span {
	font-weight: 700;
	margin-left: 6px;
}
.homepage-promo-modal__submit:hover {
	background: #1f6fd6;
}

.homepage-promo-modal__thankyou {
	font-family: 'Poppins', sans-serif;
	font-weight: 400;
	font-size: 15px;
	line-height: 28px;
	color: #a7c1fd;
	max-width: 510px;
}

/* A bare `.hidden` hides nothing — Fomantic only defines `.hidden.transition`.
   Without this the empty error label still occupies a line box + its inline
   12px margin, injecting dead space between the email field and the button. */
#homepagePromoEmailError.hidden {
	display: none !important;
}
#homepagePromoEmailError {
	color: #ff6b6b !important;
	background: transparent !important;
	border: none !important;
	padding: 0 !important;
	font-size: 13px;
}
#homepagePromoEmailError::before {
	display: none !important;
}

/* Band B — fluid two-column, tablet. `background-position` is intentionally
   NOT `right center` here: once the box gets relatively taller than the
   2.047:1 image, `cover` re-crops horizontally and `right` would drag the
   figure back left, under the text. 62% keeps him clear across the band. */
@media only screen and (max-width: 1199.98px) {
	.homepage-promo-modal__bg {
		min-height: 500px;
		background-position: 62% center;
	}
	.homepage-promo-modal__heading {
		font-size: 24px;
		line-height: 38px;
		max-width: 56%;
	}
	.homepage-promo-modal__copy,
	.homepage-promo-modal__form,
	.homepage-promo-modal__thankyou {
		max-width: 56%;
	}
}

/* Band C — stacked mobile. 767.98px matches Fomantic's own .ui.modal
   breakpoint so this layout never sits inside Fomantic's width:95% band. */
@media only screen and (max-width: 767.98px) {
	#homepagePromoModal.ui.modal.homepage-promo-modal {
		width: min(332px, 100vw - 48px);
		border-radius: 16px;
	}
	.homepage-promo-modal__bg {
		min-height: 0;
		align-items: stretch;
		/* Cascade: mobile upload -> desktop upload -> stock mobile photo. */
		/* Re-tuned against the Figma mobile comp — same finding as Band A: no separate
		   tint shape in the design, photo reads clearly top-to-bottom with only a mild
		   darkening toward the form/button. Light gradient here is a legibility aid. */
		background-image:
			linear-gradient(180deg, rgba(3, 37, 73, 0.10) 0%, rgba(3, 37, 73, 0.18) 45%, rgba(3, 37, 73, 0.32) 100%),
			var(--promo-bg-mobile, var(--promo-bg, url('/images/page/homepage-promo-modal-bg-mobile.jpg')));
		background-position: center center;
	}
	.homepage-promo-modal__content {
		padding: 60px 32px 47px;
	}
	.homepage-promo-modal__heading {
		font-size: 24px;
		line-height: 38px;
		max-width: 100%;
		margin-bottom: 36px;
	}
	.homepage-promo-modal__copy,
	.homepage-promo-modal__form,
	.homepage-promo-modal__thankyou {
		max-width: 100%;
	}
	.homepage-promo-modal__copy {
		margin-bottom: 25px;
	}
	.homepage-promo-modal__copy p {
		margin: 0 0 28px;
	}
	.homepage-promo-modal__field {
		margin-bottom: 0;
	}
	.homepage-promo-modal__field + .homepage-promo-modal__field {
		margin-top: 19px;
	}
	.homepage-promo-modal__field input {
		font-size: 15px;
		line-height: 27px;
		padding: 10px 10px 32px;
	}
	.homepage-promo-modal__submit {
		width: 225px;
		margin-top: 43px;
	}
	.homepage-promo-modal__close {
		top: 19px;
		right: 19px;
		width: 34px;
		height: 34px;
	}
	.homepage-promo-modal__close::before,
	.homepage-promo-modal__close::after {
		width: 16px;
		left: 9px;
	}
}
