/**
 * Newsletter form. Uses theme tokens (base.css). Neutral enough to drop into a
 * light section or the dark footer; override --xc-nl-* on the form to retheme.
 */
.xc-newsletter {
	--xc-nl-ink:     var(--xc-navy, #273045);
	--xc-nl-muted:   var(--xc-slate, #788196);
	--xc-nl-field:   var(--xc-white, #fff);
	--xc-nl-border:  var(--xc-soft-white, #EEEFF2);
	--xc-nl-accent:  var(--xc-true-blue, #015ADF);

	max-width: 34rem;
	font-family: var(--xc-body);
}

.xc-newsletter__title {
	font-family: var(--xc-display);
	font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem);
	line-height: 1.2;
	margin: 0 0 .35em;
	color: var(--xc-nl-ink);
}

.xc-newsletter__subtitle {
	margin: 0 0 1rem;
	color: var(--xc-nl-muted);
	font-size: .95rem;
	line-height: 1.5;
}

.xc-newsletter__row {
	display: flex;
	gap: .5rem;
	flex-wrap: wrap;
}

.xc-newsletter__input {
	flex: 1 1 12rem;
	min-width: 0;
	padding: .75rem 1rem;
	font: inherit;
	color: var(--xc-nl-ink);
	background: var(--xc-nl-field);
	border: 1px solid var(--xc-nl-border);
	border-radius: var(--xc-radius-sm, 8px);
	transition: border-color .15s ease, box-shadow .15s ease;
}
.xc-newsletter__input:focus {
	outline: none;
	border-color: var(--xc-nl-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--xc-nl-accent) 25%, transparent);
}

.xc-newsletter__btn {
	flex: 0 0 auto;
	padding: .75rem 1.5rem;
	font: inherit;
	font-weight: 600;
	color: #fff;
	background: var(--xc-nl-accent);
	border: 0;
	border-radius: var(--xc-radius-sm, 8px);
	cursor: pointer;
	transition: background-color .15s ease, opacity .15s ease;
}
.xc-newsletter__btn:hover { background: var(--xc-primary-hover, #0146b0); }
.xc-newsletter__btn:disabled { opacity: .6; cursor: default; }
.xc-newsletter__btn.is-busy { position: relative; color: transparent; }
.xc-newsletter__btn.is-busy::after {
	content: "";
	position: absolute;
	inset: 0;
	margin: auto;
	width: 1.1em;
	height: 1.1em;
	border: 2px solid rgba(255, 255, 255, .5);
	border-top-color: #fff;
	border-radius: 50%;
	animation: xc-nl-spin .6s linear infinite;
}
@keyframes xc-nl-spin { to { transform: rotate(360deg); } }

.xc-newsletter__turnstile { margin-top: .75rem; }

.xc-newsletter__msg {
	margin: .6rem 0 0;
	font-size: .9rem;
	line-height: 1.45;
}
/* Collapse entirely until there's a message (no reserved empty space). */
.xc-newsletter__msg:empty {
	display: none;
}
.xc-newsletter__msg.is-error   { color: #c02626; }
.xc-newsletter__msg.is-success { color: #157347; }

/* Honeypot: hidden from humans and AT, still submitted (empty) by bots. */
.xc-newsletter__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Local screen-reader-text (base.css doesn't define one). */
.xc-newsletter .screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (prefers-reduced-motion: reduce) {
	.xc-newsletter__btn.is-busy::after { animation: none; }
}
