/**
 * KickStart CTA — visual style
 *
 * Three components:
 *   .kst-cta-card  — inline mid-article (Tier A)
 *   .kst-cta-soft  — soft paragraph prompt (Tier B)
 *   .kst-cta-bar   — sticky bottom-bar (Tier A, mobile only)
 *
 * Brand palette pulled from kickstarttherapy.com header:
 *   primary  #1d6f42  (KickStart brand green; was #0073AA blue until 2026-05-27)
 *   primary-hover #175837 (12% darker than primary, matches old #005f8d ratio)
 *   accent   #F5A623  (warm orange)
 *   text     #1f2d3d
 *   surface  #f5faf6  (very light green tint, matches new brand)
 *
 * Scoped to .kst-cta-* selectors only — no global resets, no html/body changes.
 */

/* =================================================================
 * Tier A — inline card
 * ================================================================= */
.kst-cta-card {
	margin: 2em 0;
	padding: 1.25em 1.5em;
	border-radius: 10px;
	background: #f5faf6;
	border-left: 5px solid #1d6f42;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
	font-family: inherit;
	color: #1f2d3d;
	max-width: 100%;
	box-sizing: border-box;
}

.kst-cta-card__hed {
	margin: 0 0 0.4em 0;
	font-size: 1.15em;
	font-weight: 700;
	line-height: 1.3;
	color: #1d6f42;
}

.kst-cta-card__body {
	margin: 0 0 1em 0;
	font-size: 1em;
	line-height: 1.55;
	color: #1f2d3d;
}

.kst-cta-card__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6em;
}

.kst-cta-card__btn {
	display: inline-block;
	padding: 0.7em 1.3em;
	border-radius: 6px;
	font-weight: 600;
	font-size: 1em;
	line-height: 1.2;
	text-decoration: none !important;
	transition: transform 0.1s ease, box-shadow 0.1s ease;
	border: 2px solid transparent;
	box-sizing: border-box;
}

.kst-cta-card__btn:focus-visible {
	outline: 3px solid #F5A623;
	outline-offset: 2px;
}

.kst-cta-card__btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.kst-cta-card__btn--primary {
	background: #1d6f42;
	color: #ffffff !important;
}

.kst-cta-card__btn--primary:hover {
	background: #175837;
	color: #ffffff !important;
}

.kst-cta-card__btn--secondary {
	background: #ffffff;
	color: #1d6f42 !important;
	border-color: #1d6f42;
}

.kst-cta-card__btn--secondary:hover {
	background: #1d6f42;
	color: #ffffff !important;
}

/* Small viewports — stack buttons */
@media (max-width: 480px) {
	.kst-cta-card {
		padding: 1em 1em;
		margin: 1.5em 0;
	}
	.kst-cta-card__actions {
		flex-direction: column;
		gap: 0.5em;
	}
	.kst-cta-card__btn {
		width: 100%;
		text-align: center;
	}
}

/* =================================================================
 * Tier B — soft prompt
 * ================================================================= */
.kst-cta-soft {
	margin: 2em 0 1em 0;
	padding: 0.7em 0;
	border-top: 1px solid #e2e8ee;
	font-size: 0.95em;
	color: #4a5568;
	line-height: 1.6;
}

.kst-cta-soft a {
	color: #1d6f42;
	font-weight: 600;
}

/* =================================================================
 * Sticky mobile bottom-bar (Tier A only, ≤768px)
 * ================================================================= */
.kst-cta-bar {
	display: none; /* JS reveals on mobile after scroll */
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1000; /* < reCAPTCHA badge (~2 billion) by design */
	padding: 0.55em 0.7em;
	padding-bottom: calc(0.55em + env(safe-area-inset-bottom, 0px));
	padding-right: calc(0.7em + 90px); /* reserve space for reCAPTCHA badge bottom-right */
	background: #ffffff;
	box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.12);
	box-sizing: border-box;
	gap: 0.4em;
	align-items: center;
	font-family: inherit;
}

/* JS toggles this class when the bar should be visible */
.kst-cta-bar.kst-cta-bar--visible {
	display: flex;
}

.kst-cta-bar__btn {
	flex: 1 1 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.65em 0.6em;
	border-radius: 6px;
	font-weight: 600;
	font-size: 0.95em;
	line-height: 1.2;
	text-decoration: none !important;
	border: 2px solid transparent;
	box-sizing: border-box;
	white-space: nowrap;
}

.kst-cta-bar__btn--primary {
	background: #1d6f42;
	color: #ffffff !important;
}

.kst-cta-bar__btn--secondary {
	background: #ffffff;
	color: #1d6f42 !important;
	border-color: #1d6f42;
}

.kst-cta-bar__icon {
	margin-right: 0.35em;
	font-size: 1em;
}

.kst-cta-bar__close {
	flex: 0 0 32px;
	width: 32px;
	height: 32px;
	border: none;
	background: transparent;
	color: #4a5568;
	font-size: 1.5em;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	border-radius: 4px;
}

.kst-cta-bar__close:hover {
	background: #f1f5f9;
}

/* Belt-and-suspenders: never show the bar on desktop */
@media (min-width: 769px) {
	.kst-cta-bar,
	.kst-cta-bar.kst-cta-bar--visible {
		display: none !important;
	}
}

/* Prevent body content from being hidden under the bar */
@media (max-width: 768px) {
	body.kst-cta-bar-active {
		padding-bottom: 64px;
	}
}
