/**
 * The email sign-up (inc/newsletter.php), and the pages its links open.
 *
 * Loaded only where the block is, and on those pages. Drawn like the search
 * box: a hairline round a quiet field, the button inked in on hover. Every
 * colour is a palette variable, like the rest of the site.
 */

/* The line under the heading is set like the summaries in the lists above. */
.hz-newsletter__text {
	margin: 0 0 1rem;
	max-width: 36em;
	font-size: var(--wp--preset--font-size--sm);
	line-height: 1.55;
	color: var(--wp--preset--color--contrast-2);
}

.hz-newsletter__form {
	position: relative;
	display: flex;
	max-width: 28rem;
	margin: 0;
	border: 1px solid var(--hz-rule);
}

.hz-newsletter__input {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	padding: 0.6em 0.75em;
	background: transparent;
	color: var(--wp--preset--color--contrast);
	border: 0;
	border-radius: 0;
	font-family: inherit;
	font-size: var(--wp--preset--font-size--sm);
	line-height: 1.4;
}

.hz-newsletter__input::placeholder {
	color: var(--wp--preset--color--contrast-2);
	opacity: 0.85;
}

.hz-newsletter__input:focus-visible {
	outline: 2px solid var(--wp--preset--color--contrast);
	outline-offset: -2px;
}

.hz-newsletter__button {
	flex: 0 0 auto;
	margin: 0;
	padding: 0.6em 1.1em;
	background: transparent;
	color: var(--wp--preset--color--contrast);
	border: 0;
	border-left: 1px solid var(--hz-rule);
	border-radius: 0;
	font-family: inherit;
	font-size: var(--wp--preset--font-size--sm);
	line-height: 1.4;
	cursor: pointer;
	white-space: nowrap;
}

.hz-newsletter__button:hover,
.hz-newsletter__button:focus-visible {
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}

.hz-newsletter__form[aria-busy="true"] .hz-newsletter__button {
	cursor: progress;
	opacity: 0.6;
}

/* The field only robots fill in. Off-screen rather than display:none, which
   some of them know to skip. */
.hz-newsletter__trap {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.hz-newsletter__status {
	margin: 0.6rem 0 0;
	font-size: var(--wp--preset--font-size--sm);
	font-style: italic;
	color: var(--wp--preset--color--contrast-2);
}

.hz-newsletter__status:empty {
	display: none;
}

.hz-newsletter__status.is-error {
	color: var(--wp--preset--color--contrast);
}

/* In the editor the field is drawn but not used. */
.editor-styles-wrapper .hz-newsletter__input[disabled] {
	cursor: default;
}

/* -------------------------------------------------------------------------
   The pages the links in the emails open: subscribed, unsubscribe, …
   ---------------------------------------------------------------------- */

/* Padding, not margin: the layout's `:root :where(…) > :first-child` rule
   outranks a single class and zeroes the first child's top margin. */
.hz-nl-page {
	padding-block: clamp(3rem, 12vh, 7rem) clamp(2rem, 8vh, 5rem);
}

.hz-nl-page__title {
	margin: 0 0 1rem;
	font-size: var(--wp--preset--font-size--xl);
	font-weight: 500;
}

.hz-nl-page p {
	margin: 0 0 1rem;
}

.hz-nl-page__form {
	display: inline-block;
	margin: 0.25rem 0 1.5rem;
	border: 1px solid var(--hz-rule);
}

.hz-nl-page__form .hz-newsletter__button {
	border-left: 0;
}

.hz-nl-page__quiet {
	color: var(--wp--preset--color--contrast-2);
	font-style: italic;
}

.hz-nl-page__back {
	font-size: var(--wp--preset--font-size--sm);
}
