/* Newsletter popup + inline form. Tokens from base.css only. */

/* Popup ------------------------------------------------------------------- */
.nl-modal { width: min(440px, calc(100vw - 2 * var(--gutter))); overflow: auto; display: grid; }
.nl-modal__media { display: none; background: var(--c-cream); }
.nl-modal__img { width: 100%; height: 100%; object-fit: cover; }
.nl-modal__body { padding: var(--s-10) var(--s-6) var(--s-6); display: flex; align-items: center; }
.nl-modal__form { width: 100%; display: grid; gap: var(--s-3); }
.nl-modal__eyebrow { margin: 0; }
.nl-modal__title { font-size: clamp(20px, 5vw, 26px); }
.nl-modal__text { color: var(--c-ink-2); }
.nl-modal__small { font-size: var(--fs-xs); line-height: 1.5; }
.nl-modal__close { position: absolute; top: var(--s-2); right: var(--s-2); z-index: 1; }
@media (min-width: 750px) {
	.nl-modal--image { width: min(780px, calc(100vw - 2 * var(--gutter))); grid-template-columns: 5fr 6fr; }
	.nl-modal--image .nl-modal__media { display: block; }
	.nl-modal__body { padding: var(--s-12) var(--s-10) var(--s-10); }
}

/* Form (shared by popup + footer) ----------------------------------------- */
.nl-form { display: grid; gap: var(--s-3); }
.nl-form__row { display: grid; grid-template-columns: 1fr auto; gap: var(--s-2); }
.nl-form__row input[type="email"] { min-width: 0; }
.nl-modal .nl-form__row { grid-template-columns: 1fr; }
.nl-consent {
	display: flex; align-items: flex-start; gap: var(--s-2); margin: 0;
	font-size: var(--fs-s); letter-spacing: 0; text-transform: none; line-height: 1.45; cursor: pointer;
}
.nl-consent input { flex: none; margin: 2px 0 0; }
.nl-consent a { text-decoration: underline; text-underline-offset: 3px; }
.nl-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.nl-msg { min-height: 1.4em; font-size: var(--fs-s); }
.nl-msg:empty { display: none; }
.nl-msg.is-error { color: var(--c-error); }
.nl-form.is-busy { opacity: .6; pointer-events: none; }

/* Footer variant inherits the footer's colours (light or dark) */
.nl-footer .nl-form__row input[type="email"] {
	background: transparent; color: inherit;
	border-color: color-mix(in srgb, currentColor 40%, transparent);
}
.nl-footer .nl-form__row input[type="email"]::placeholder { color: inherit; opacity: .6; }
.nl-footer .nl-form__row input[type="email"]:focus { border-color: currentColor; }
.nl-footer .nl-form__submit { background: transparent; color: inherit; border-color: currentColor; }
.nl-footer .nl-form__submit:hover { background: transparent; opacity: .7; }
.nl-footer .nl-msg.is-error { color: inherit; text-decoration: underline; }

/* Success (code) ----------------------------------------------------------- */
.nl-success { display: grid; gap: var(--s-3); }
.nl-success__title { margin: 0; }
.nl-code { display: flex; align-items: stretch; gap: var(--s-2); }
.nl-code__value {
	flex: 1; display: flex; align-items: center; justify-content: center; min-height: 48px; padding-inline: var(--s-4);
	border: 1px dashed currentColor; font-size: var(--fs-xl); letter-spacing: .18em; font-weight: var(--fw-medium);
	font-variant-numeric: tabular-nums; user-select: all;
}
.nl-code .btn { min-height: 48px; }
.nl-footer .nl-code .btn { background: transparent; color: inherit; border-color: currentColor; }
.nl-success__note { font-size: var(--fs-s); }
