/* HPN Newsletter — form and notice. Uses the HPN theme's tokens when available. */

.hpn-nl-form {
	--nl-line: var(--hpn-line, #e3e6ea);
	--nl-muted: var(--hpn-muted, #5b6470);
	--nl-brand-dark: var(--hpn-brand-dark, #1f7a1a);
	--nl-radius: var(--hpn-radius, 6px);
}

.hpn-nl-form__hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.hpn-nl-form__fields {
	display: grid;
	gap: 0.75rem;
}

.hpn-nl-form--inline .hpn-nl-form__fields {
	grid-template-columns: 1fr;
}

@media (min-width: 720px) {
	.hpn-nl-form--inline .hpn-nl-form__fields {
		grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr) auto;
		align-items: end;
	}
}

.hpn-nl-form__field,
.hpn-nl-form__submit {
	margin: 0;
}

.hpn-nl-form__field label {
	display: block;
	margin-bottom: 0.3rem;
	font-size: 0.875rem;
	font-weight: 600;
}

.hpn-nl-form__optional {
	color: var(--nl-muted);
	font-weight: 400;
}

.hpn-nl-form__field input {
	width: 100%;
	min-height: 46px;
	padding: 0.6em 0.8em;
	border: 1px solid #c4cad1;
	border-radius: var(--nl-radius);
	background: #fff;
	font: inherit;
}

.hpn-nl-form__field input:focus {
	border-color: var(--nl-brand-dark);
	outline: 3px solid rgb(61 174 43 / 0.35);
	outline-offset: 0;
}

.hpn-nl-form__button {
	width: 100%;
	min-height: 46px;
	padding-inline: 1.6em;
	white-space: nowrap;
}

.hpn-nl-form__consent {
	display: flex;
	gap: 0.6rem;
	align-items: flex-start;
	margin: 0.9rem 0 0;
	color: var(--nl-muted);
	font-size: 0.8125rem;
	line-height: 1.5;
}

.hpn-nl-form__consent input {
	flex: none;
	width: 18px;
	height: 18px;
	margin-top: 0.1rem;
	accent-color: var(--nl-brand-dark);
}

.hpn-nl-form__message {
	margin: 0.75rem 0 0;
	font-weight: 600;
}

.hpn-nl-form__message:empty {
	display: none;
}

.hpn-nl-form__message.is-success {
	color: var(--nl-brand-dark);
}

.hpn-nl-form__message.is-error {
	color: #b32d2e;
}

.hpn-nl-form.is-done .hpn-nl-form__fields,
.hpn-nl-form.is-done .hpn-nl-form__consent {
	opacity: 0.5;
}

/* Banner after confirming / unsubscribing */

.hpn-nl-notice {
	padding: 0.85rem 1rem;
	background: var(--hpn-brand-dark, #1f7a1a);
	color: #fff;
	text-align: center;
	font-weight: 600;
}

.hpn-nl-notice p {
	margin: 0;
}

.hpn-nl-notice--error {
	background: #b32d2e;
}
