/* ── Blog Progress CTA — floating subscribe card ──────────────────────────── */

#blog-cta-bar {
	position: fixed;
	bottom: 24px;
	left: 50%;
	z-index: 9990;
	width: calc(100% - 32px);
	max-width: 440px;
	transform: translateX(-50%) translateY(calc(100% + 32px));
	transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
	border-radius: 16px;
	background: #ffffff;
	box-shadow:
		0 8px 40px rgba(0, 0, 0, 0.13),
		0 2px 10px rgba(0, 0, 0, 0.07);
	font-size: 14px;
}

#blog-cta-bar.cta-visible {
	transform: translateX(-50%) translateY(0);
}

/* ── Card body ───────────────────────────────────────────────────────────── */

.cta-card {
	position: relative;
	padding: 22px 24px 20px;
}

.cta-heading {
	margin: 0 0 5px;
	font-size: 16px;
	font-weight: 700;
	color: #111827;
	line-height: 1.3;
	padding-right: 32px;
}

.cta-subtext {
	margin: 0 0 16px;
	font-size: 13px;
	color: #6b7280;
	line-height: 1.5;
}

/* ── Form ────────────────────────────────────────────────────────────────── */

.cta-form {
	display: flex;
	gap: 8px;
}

.cta-form input[type="email"] {
	flex: 1;
	min-width: 0;
	height: 42px;
	padding: 0 14px;
	border: 1.5px solid #d1d5db;
	border-radius: 8px;
	font-size: 13px;
	background: #f9fafb;
	color: #111827;
	outline: none;
	transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.cta-form input[type="email"]:focus {
	border-color: #3D6698;
	background: #ffffff;
	box-shadow: 0 0 0 3px rgba(61, 102, 152, 0.12);
}

.cta-form input[type="email"]::placeholder {
	color: #9ca3af;
}

.cta-form input[type="email"].cta-input-error {
	border-color: #dc2626;
	box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.cta-form button[type="submit"] {
	height: 42px;
	padding: 0 18px;
	background: #3D6698;
	color: #ffffff;
	border: none;
	border-radius: 8px;
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	letter-spacing: 0.01em;
	transition: filter 0.2s, box-shadow 0.2s;
}

.cta-form button[type="submit"]:hover {
	filter: brightness(1.1);
	box-shadow: 0 3px 12px rgba(61, 102, 152, 0.3);
}

.cta-form button[type="submit"]:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.cta-success {
	display: block;
	margin-top: 2px;
	font-size: 14px;
	font-weight: 500;
	color: #15803d;
}

/* ── Close button ────────────────────────────────────────────────────────── */

.cta-close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.07);
	color: #6b7280;
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	transition: background 0.2s, color 0.2s;
}

.cta-close:hover {
	background: rgba(0, 0, 0, 0.13);
	color: #111827;
}

/* ── Dark mode ───────────────────────────────────────────────────────────── */

body.dark #blog-cta-bar {
	background: #1a2740;
	box-shadow:
		0 8px 40px rgba(0, 0, 0, 0.45),
		0 2px 10px rgba(0, 0, 0, 0.3);
}

body.dark .cta-heading {
	color: #f1f5f9;
}

body.dark .cta-subtext {
	color: #64748b;
}

body.dark .cta-form input[type="email"] {
	background: #1e2d42;
	color: #d0d8e4;
	border-color: rgba(135, 192, 255, 0.2);
}

body.dark .cta-form input[type="email"]:focus {
	background: #1e2d42;
	border-color: rgba(135, 192, 255, 0.5);
	box-shadow: 0 0 0 3px rgba(30, 115, 190, 0.18);
}

body.dark .cta-form input[type="email"]::placeholder {
	color: rgba(180, 200, 220, 0.4);
}

body.dark .cta-form input[type="email"].cta-input-error {
	border-color: #f87171;
	box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.15);
}

body.dark .cta-form button[type="submit"] {
	background: #1e3a5a;
	border: 1px solid rgba(135, 192, 255, 0.25);
}

body.dark .cta-form button[type="submit"]:hover {
	filter: brightness(1.25);
	box-shadow: 0 0 12px rgba(30, 115, 190, 0.3);
}

body.dark .cta-close {
	background: rgba(135, 192, 255, 0.08);
	color: #4b6280;
}

body.dark .cta-close:hover {
	background: rgba(135, 192, 255, 0.15);
	color: #94a3b8;
}

body.dark .cta-success {
	color: #4ade80;
}

/* ── Narrow screens: stack form vertically ───────────────────────────────── */

@media (max-width: 400px) {
	.cta-form {
		flex-direction: column;
	}

	.cta-form input[type="email"],
	.cta-form button[type="submit"] {
		width: 100%;
	}
}
