/* The footer newsletter (inc/mwf-newsletter.php, 2026-10-16).
 *
 * The form keeps the classes custom-css/mwf.css already styles
 * (.newsletter-form / .newsletter-input / .newsletter-button on the #121212
 * footer), so it looks as before; these rules add what the server-side form
 * needs: the consent line (the old form's inline styles, moved here), the
 * processor note, the status line, the honeypot, and the note on the page the
 * confirmation link lands on.
 */

.site-footer .mwf-nl {
	position: relative;
}

/* phones: one column, as on the desktop — mwf.css turns .newsletter-form into
   a row at ≤768px, which squeezed the consent between the field and the button */
@media (max-width: 768px) {
	.site-footer .mwf-nl {
		flex-direction: column;
	}
}

/* the field's label, for screen readers (the placeholder says the same) */
.mwf-nl .mwf-nl-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* the honeypot: off-screen rather than display:none (some bots skip hidden subtrees) */
.mwf-nl .mwf-nl-hp {
	position: absolute;
	left: -10000px;
	top: 0;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* the field, with a gold hairline that draws itself along its foot on focus
   (js/mwf-newsletter.js; the CSS below does it without GSAP) */
.mwf-nl .mwf-nl-field {
	position: relative;
}

.mwf-nl .mwf-nl-field .newsletter-input {
	display: block;
	box-sizing: border-box;
}

.mwf-nl .mwf-nl-line {
	position: absolute;
	left: 1px;
	right: 1px;
	bottom: 1px;
	height: 2px;
	border-radius: 0 0 4px 4px;
	background: linear-gradient(90deg, #a8893d, #f1dc9a 50%, #cdad59);
	transform: scaleX(0);
	transform-origin: 0 50%;
	pointer-events: none;
}

.mwf-nl:not(.is-anim) .mwf-nl-line {
	transition: transform .45s cubic-bezier(.2, .7, .2, 1);
}

.mwf-nl:not(.is-anim) .newsletter-input:focus + .mwf-nl-line {
	transform: scaleX(1);
}

/* the consent and the processor note: folded away until an address is typed.
   With GSAP (.is-anim) the script folds and unfolds them; without it, :has()
   does it at once, which also covers a browser without JavaScript. An answer in
   red (the plain post came back) keeps them open. A browser without :has()
   simply shows them, as before. */
.mwf-nl:not(.is-anim):has(.newsletter-input:placeholder-shown):not(:has(.mwf-nl-msg.is-error)) .mwf-nl-reveal {
	display: none;
}

.mwf-nl .mwf-nl-note {
	margin: 6px 0 6px 25px;
}

.mwf-nl .mwf-nl-consent {
	display: flex;
	align-items: flex-start;
	margin: 12px 0 0;
	text-align: left;
}

.mwf-nl .mwf-nl-consent input {
	flex-shrink: 0;
	width: 15px;
	height: 15px;
	margin: 2px 10px 0 0;
	accent-color: #cdad59;
}

.mwf-nl .mwf-nl-consent label {
	font-size: .75rem;
	line-height: 1.4;
	color: #ccc;
}

.mwf-nl .mwf-nl-consent a {
	color: #fff;
	text-decoration: underline;
}

.mwf-nl .mwf-nl-reveal .mwf-nl-note {
	font-size: .6875rem;
	line-height: 1.45;
	color: #8f8f8f;
	text-align: left;
}

.mwf-nl .newsletter-input[aria-invalid="true"] {
	border-color: #ff9a8f;
}

/* the field shows its focus with a warm border and the hairline, not an outline */
.mwf-nl .newsletter-input:focus,
.mwf-nl .newsletter-input:focus-visible {
	outline: none;
	border-color: rgba(205, 173, 89, .55);
}

/* the button: a gold layer sweeps in under the word on hover (fine pointers),
   runs across while sending, and fills it behind a tick when it is done */
.mwf-nl .newsletter-button {
	position: relative;
	overflow: hidden;
	isolation: isolate;
}

.mwf-nl.is-anim .newsletter-button:hover {
	background-color: #fff;
	color: #121212;
}

.mwf-nl .mwf-nl-btn-fill {
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(90deg, #cdad59, #e7cf8a 55%, #cdad59);
	transform: scaleX(0);
	transform-origin: 0 50%;
}

.mwf-nl .mwf-nl-btn-label {
	display: inline-block;
}

.mwf-nl .mwf-nl-btn-tick {
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	margin-top: -.6em;
	line-height: 1.2;
	font-size: 1.05rem;
	opacity: 0;
	pointer-events: none;
}

.mwf-nl .newsletter-button:focus-visible,
.mwf-nl .mwf-nl-consent input:focus-visible,
.mwf-nl .mwf-nl-consent a:focus-visible {
	outline: 2px solid #cdad59;
	outline-offset: 2px;
}

.mwf-nl[aria-busy="true"] .newsletter-button {
	cursor: progress;
}

/* without GSAP the busy button only dims; with it, the gold band says it */
.mwf-nl:not(.is-anim)[aria-busy="true"] .newsletter-button {
	opacity: .6;
}

/* the answer: three lines are kept free under the button, so nothing moves when
   it arrives; a longer one (a narrow column) runs on into the footer's bottom
   padding instead of pushing the page down */
.mwf-nl .mwf-nl-msg {
	height: 3.6em;
	overflow: visible;
	margin: 2px 0 0;
	font-size: .8125rem;
	line-height: 1.2;
	color: #e6e6e6;
	text-align: left;
}

.mwf-nl .mwf-nl-msg.is-ok {
	color: #a8dcb0;
}

.mwf-nl .mwf-nl-msg.is-error {
	color: #ff9a8f;
}

@media (max-width: 768px) {
	.mwf-nl .mwf-nl-msg {
		text-align: center;
	}
}

/* the page the confirmation link lands on (?newsletter=confirmed) */
.mwf-nl-toast {
	position: fixed;
	z-index: 100000;
	left: 50%;
	bottom: 24px;
	box-sizing: border-box;
	width: min(92vw, 30rem);
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 16px 14px 16px 20px;
	background: #121212;
	color: #f4efe4;
	border: 1px solid rgba(205, 173, 89, .7);
	border-radius: 10px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, .45);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: .9375rem;
	line-height: 1.45;
	transform: translateX(-50%);
	animation: mwf-nl-toast-in .35s ease-out both, mwf-nl-toast-out .4s ease-in 20s forwards;
}

.mwf-nl-toast p {
	flex: 1;
	margin: 0;
}

.mwf-nl-toast strong {
	display: block;
	margin-bottom: 2px;
	color: #cdad59;
	font-size: .8125rem;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.mwf-nl-toast-x {
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #f4efe4;
	font-size: 1.375rem;
	line-height: 1;
	cursor: pointer;
}

.mwf-nl-toast-x:hover,
.mwf-nl-toast-x:focus-visible {
	background: rgba(244, 239, 228, .12);
	outline: none;
}

@keyframes mwf-nl-toast-in {
	from {
		opacity: 0;
		transform: translate(-50%, 12px);
	}
}

@keyframes mwf-nl-toast-out {
	to {
		opacity: 0;
		visibility: hidden;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mwf-nl-toast {
		animation: mwf-nl-toast-out .01s linear 20s forwards;
	}
}
