/* STL Promos front-end styles.
   Uses the stl-blocks design tokens when present, with the same values as fallbacks. */

.stl-promo {
	--p-red: var(--stl-red, #E3051C);
	--p-red-dark: #c00417;
	--p-orange: var(--stl-orange, #F39200);
	--p-cream: var(--stl-cream, #FFD494);
	--p-navy: var(--stl-navy, #2A314D);
	--p-navy-deep: var(--stl-burgundy-deep, #1A2040);
	--p-white: #FFFFFF;
	--p-grey-100: var(--stl-grey-100, #EEF0F2);
	--p-grey-300: var(--stl-grey-300, #BDC1CA);
	--p-grey-500: var(--stl-grey-500, #5E6378);
	--p-heading: var(--stl-font-heading, "PT Sans", "Helvetica Neue", Arial, sans-serif);
	--p-body: var(--stl-font-body, "Roboto", "Helvetica Neue", Arial, sans-serif);
	--p-radius: 16px;
	--p-width: 380px;
	--p-gap: 24px;

	position: fixed;
	z-index: 2147483000;
	font-family: var(--p-body);
	font-size: 15px;
	line-height: 1.45;
	-webkit-font-smoothing: antialiased;
	box-sizing: border-box;
}
.stl-promo *,
.stl-promo *::before,
.stl-promo *::after {
	box-sizing: inherit;
}

/* ---------- Placement ---------- */

.stl-promo--floating {
	bottom: var(--p-gap);
	right: var(--p-gap);
	width: var(--p-width);
	max-width: calc(100vw - var(--p-gap) * 2);
}
.stl-promo--floating.stl-promo--bottom-left {
	right: auto;
	left: var(--p-gap);
}

.stl-promo--modal {
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}
.stl-promo--modal .stl-promo__card {
	width: 520px;
	max-width: 100%;
	max-height: calc(100vh - 48px);
	overflow: auto;
}
.stl-promo__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(26, 32, 64, 0.62);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
}
.stl-promo-lock {
	overflow: hidden;
}

/* ---------- Card ---------- */

.stl-promo__card {
	position: relative;
	border-radius: var(--p-radius);
	overflow: hidden;
	box-shadow: 0 24px 60px rgba(26, 32, 64, 0.35), 0 2px 6px rgba(26, 32, 64, 0.18);
	animation: stlPromoIn 0.36s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.stl-promo--navy .stl-promo__card {
	color: var(--p-white);
	background: linear-gradient(160deg, var(--p-navy) 0%, var(--p-navy-deep) 100%);
}
.stl-promo--white .stl-promo__card {
	color: var(--p-navy);
	background: var(--p-white);
}
/* Brand accent bar along the top. */
.stl-promo__card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, var(--p-red) 0%, var(--p-orange) 100%);
	z-index: 2;
}
.stl-promo--image .stl-promo__card::before {
	display: none;
}

.stl-promo__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 3;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: inherit;
	background: rgba(255, 255, 255, 0.12);
	transition: background 0.15s ease, transform 0.15s ease;
}
.stl-promo--white .stl-promo__close,
.stl-promo--image .stl-promo__close {
	color: var(--p-navy);
	background: rgba(255, 255, 255, 0.9);
	box-shadow: 0 1px 4px rgba(26, 32, 64, 0.2);
}
.stl-promo__close:hover {
	background: rgba(255, 255, 255, 0.22);
	transform: scale(1.05);
}
.stl-promo--white .stl-promo__close:hover,
.stl-promo--image .stl-promo__close:hover {
	background: var(--p-white);
}
.stl-promo__close:focus-visible,
.stl-promo__cta:focus-visible,
.stl-promo__imagelink:focus-visible,
.stl-promo__form input:focus-visible {
	outline: 3px solid var(--p-orange);
	outline-offset: 2px;
}

/* ---------- Designed content ---------- */

.stl-promo__cover {
	aspect-ratio: 2 / 1;
	overflow: hidden;
	background: var(--p-grey-100);
}
.stl-promo__cover img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.stl-promo__body {
	padding: 28px 28px 26px;
}
.stl-promo__cover + .stl-promo__body {
	padding-top: 22px;
}

.stl-promo__eyebrow {
	margin: 0 0 10px;
	padding-right: 36px;
	font-family: var(--p-body);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--p-orange);
}
.stl-promo__headline {
	margin: 0 0 10px;
	padding-right: 20px;
	font-family: var(--p-heading);
	font-size: 26px;
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.01em;
	color: inherit;
}
.stl-promo__sub {
	margin: 0 0 18px;
	font-size: 15px;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.82);
}
.stl-promo--white .stl-promo__sub {
	color: var(--p-grey-500);
}

.stl-promo__stats {
	list-style: none;
	margin: 0 0 20px;
	padding: 14px 6px;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.07);
	border: 1px solid rgba(255, 255, 255, 0.1);
}
.stl-promo--white .stl-promo__stats {
	background: var(--stl-navy-tint-2, #F2F3F6);
	border-color: var(--stl-navy-tint-3, #E3E5EC);
}
.stl-promo__stats--3 { grid-template-columns: repeat(3, 1fr); }
.stl-promo__stats--2 { grid-template-columns: repeat(2, 1fr); }
.stl-promo__stats--1 { grid-template-columns: 1fr; }

.stl-promo__stat {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 0 4px;
	border-left: 1px solid rgba(255, 255, 255, 0.12);
}
.stl-promo--white .stl-promo__stat {
	border-left-color: var(--stl-navy-tint-3, #E3E5EC);
}
.stl-promo__stat:first-child {
	border-left: 0;
}
.stl-promo__stat-value {
	font-family: var(--p-heading);
	font-size: 24px;
	font-weight: 700;
	line-height: 1;
	color: var(--p-cream);
}
.stl-promo--white .stl-promo__stat-value {
	color: var(--p-red);
}
.stl-promo__stat-label {
	margin-top: 5px;
	font-size: 10.5px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.72);
}
.stl-promo--white .stl-promo__stat-label {
	color: var(--p-grey-500);
}

.stl-promo__text {
	margin: 0 0 18px;
	font-size: 14.5px;
	color: rgba(255, 255, 255, 0.85);
}
.stl-promo--white .stl-promo__text {
	color: var(--p-grey-500);
}
.stl-promo__text p {
	margin: 0 0 8px;
}
.stl-promo__text p:last-child {
	margin-bottom: 0;
}

/* ---------- Button ---------- */

.stl-promo__cta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	min-height: 50px;
	margin: 0;
	padding: 12px 20px;
	border: 0;
	border-radius: 10px;
	font-family: var(--p-body);
	font-size: 15.5px;
	font-weight: 600;
	letter-spacing: 0.01em;
	line-height: 1.2;
	text-decoration: none;
	color: var(--p-white) !important;
	background: var(--p-red);
	cursor: pointer;
	transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
	box-shadow: 0 6px 18px rgba(227, 5, 28, 0.35);
}
.stl-promo__cta:hover {
	background: var(--p-red-dark);
	transform: translateY(-1px);
	box-shadow: 0 10px 22px rgba(227, 5, 28, 0.4);
	text-decoration: none;
	color: var(--p-white);
}
.stl-promo__cta:active {
	transform: translateY(0);
}
.stl-promo__cta-arrow {
	display: inline-flex;
	transition: transform 0.15s ease;
}
.stl-promo__cta:hover .stl-promo__cta-arrow {
	transform: translateX(3px);
}
.stl-promo__cta.is-busy {
	opacity: 0.7;
	cursor: progress;
}

/* ---------- Image (Canva) mode ---------- */

.stl-promo__imagelink {
	display: block;
	line-height: 0;
	text-decoration: none;
}
.stl-promo__image {
	display: block;
	width: 100%;
	height: auto;
}
.stl-promo--image .stl-promo__form {
	padding: 18px 20px 20px;
	background: var(--p-white);
}

/* ---------- Form ---------- */

.stl-promo__form {
	margin: 0;
}
.stl-promo__field {
	margin: 0 0 10px;
}
.stl-promo__form input:not([type="hidden"]) {
	width: 100%;
	height: 46px;
	padding: 0 14px;
	border-radius: 8px;
	border: 1px solid rgba(255, 255, 255, 0.25);
	background: rgba(255, 255, 255, 0.1);
	color: var(--p-white);
	font: inherit;
	font-size: 15px;
	transition: border-color 0.15s ease, background 0.15s ease;
}
.stl-promo__form input::placeholder {
	color: rgba(255, 255, 255, 0.6);
}
.stl-promo--white .stl-promo__form input:not([type="hidden"]),
.stl-promo--image .stl-promo__form input:not([type="hidden"]) {
	border-color: var(--p-grey-300);
	background: var(--p-white);
	color: var(--p-navy);
}
.stl-promo--white .stl-promo__form input::placeholder,
.stl-promo--image .stl-promo__form input::placeholder {
	color: var(--p-grey-500);
}
.stl-promo__form input.is-invalid {
	border-color: var(--p-orange);
}
.stl-promo__form .stl-promo__cta {
	margin-top: 4px;
}
.stl-promo__hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	opacity: 0;
}
.stl-promo__error {
	min-height: 0;
	margin: 0 0 8px;
	font-size: 13px;
	color: var(--p-cream);
}
.stl-promo--white .stl-promo__error,
.stl-promo--image .stl-promo__error {
	color: var(--p-red);
}
.stl-promo__error:empty {
	display: none;
}
.stl-promo__success {
	padding: 14px 16px;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.1);
	font-weight: 500;
}
.stl-promo--white .stl-promo__success,
.stl-promo--image .stl-promo__success {
	background: var(--stl-navy-tint-2, #F2F3F6);
	color: var(--p-navy);
}
.stl-promo__success p {
	margin: 0;
}
.stl-promo__sink {
	position: absolute;
	width: 0;
	height: 0;
	border: 0;
	opacity: 0;
	pointer-events: none;
}

/* ---------- Motion ---------- */

@keyframes stlPromoIn {
	from { opacity: 0; transform: translateY(18px) scale(0.98); }
	to   { opacity: 1; transform: none; }
}
.stl-promo--modal .stl-promo__backdrop {
	animation: stlPromoFade 0.3s ease both;
}
@keyframes stlPromoFade {
	from { opacity: 0; }
	to   { opacity: 1; }
}
.stl-promo.is-leaving .stl-promo__card {
	animation: stlPromoOut 0.22s ease both;
}
.stl-promo.is-leaving .stl-promo__backdrop {
	animation: stlPromoFade 0.22s ease reverse both;
}
@keyframes stlPromoOut {
	from { opacity: 1; transform: none; }
	to   { opacity: 0; transform: translateY(12px) scale(0.98); }
}
.stl-promo--no-motion .stl-promo__card,
.stl-promo--no-motion .stl-promo__backdrop,
.stl-promo--no-motion.is-leaving .stl-promo__card {
	animation: none;
}

/* ---------- Mobile: bottom sheet ---------- */

@media (max-width: 767px) {
	.stl-promo--floating {
		left: 0;
		right: 0;
		bottom: 0;
		width: auto;
		max-width: none;
	}
	.stl-promo--floating .stl-promo__card {
		border-radius: var(--p-radius) var(--p-radius) 0 0;
		max-height: 85vh;
		overflow: auto;
	}
	.stl-promo__body {
		padding: 24px 20px calc(20px + env(safe-area-inset-bottom, 0px));
	}
	.stl-promo__headline {
		font-size: 23px;
	}
	.stl-promo__stats {
		padding: 12px 2px;
	}
	.stl-promo__stat-value {
		font-size: 21px;
	}
	.stl-promo--modal {
		padding: 16px;
	}
}
