/*
 * The newsletter form (tristopic-core), wherever it is printed: the full-screen menu, the
 * Newsletter page. The house store's form, 1:1 in structure and proportion (owner, 13 Nov):
 * a label, one pill holding the field and the button, a note, a status line; 440px wide,
 * a 44px field and a 44px button inside a pill padded 4px. In TRISTOPIC's own tokens
 * (theme.json): the ink ground, a hairline pill that lights up in the accent while you
 * type, and the site's one button: white, the fluo green under the cursor (13 Nov).
 */
.tletter {
	display: grid;
	justify-items: center;
	gap: 0.85rem;
	width: min(27.5rem, 100%);
	margin-inline: auto;
	text-align: center;
}
.tletter-label {
	display: block;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--micro);
	letter-spacing: var(--wp--custom--tracking--wider);
	text-transform: uppercase;
	color: var(--wp--preset--color--paper);
	line-height: 1;
	text-box: trim-both cap alphabetic;
}
.tletter-row {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	width: 100%;
	padding: 0.25rem;
	border: 1px solid var(--wp--preset--color--paper-faint);
	border-radius: 999px;
	background: var(--wp--preset--color--ink);
	transition: border-color var(--wp--custom--duration--fast) var(--wp--custom--ease), box-shadow var(--wp--custom--duration--fast) var(--wp--custom--ease);
}
.tletter-row:focus-within {
	border-color: var(--wp--preset--color--accent);
	box-shadow: 0 0 0 1px var(--wp--preset--color--accent);
}
.tletter.is-invalid .tletter-row { border-color: var(--wp--preset--color--danger); border-style: dashed; box-shadow: none; }
.tletter-email {
	flex: 1;
	width: 0;
	min-width: 0;
	height: 2.75rem;
	padding: 0 0.4rem 0 1rem;
	border: 0;
	background: none;
	color: var(--wp--preset--color--paper);
	font: inherit;
	font-size: 1rem;   /* 16px: iOS does not zoom into the field */
	outline: none;
}
.tletter-email::placeholder { color: var(--wp--preset--color--paper-faint); opacity: 1; }
.tletter-send {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 2.75rem;
	padding: 0 1.4em;
	border: 0;
	border-radius: 999px;
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--micro);
	letter-spacing: var(--wp--custom--tracking--wider);
	text-transform: uppercase;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color var(--wp--custom--duration--fast) var(--wp--custom--ease), transform 0.16s var(--wp--custom--ease);
}
.tletter-send:active:not(:disabled) { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) { .tletter-send:not(:disabled):hover { background: var(--wp--preset--color--accent); } }
.tletter-send:focus-visible { outline: none; background: var(--wp--preset--color--accent); }
.tletter-send.is-busy { opacity: 0.6; }
.tletter-note { margin: 0; font-size: 0.8125rem; line-height: 1.4; color: var(--wp--preset--color--paper-dim); }
.tletter-note a { color: var(--wp--preset--color--paper); text-decoration: none; transition: color var(--wp--custom--duration--fast) var(--wp--custom--ease); }
.tletter-note a:hover,
.tletter-note a:focus-visible { color: var(--wp--preset--color--accent); outline: none; }
.tletter-status { margin: 0; font-size: 0.875rem; color: var(--wp--preset--color--paper); }
.tletter-status:empty { display: none; }
/* The answer takes the note's place, so the form never grows (in the menu it would
   slide under the dock on an iPad). */
.tletter:has(.tletter-status:not(:empty)) .tletter-note { display: none; }
.tletter.is-sent .tletter-row { opacity: 0.45; pointer-events: none; }
.tletter-done { font-size: var(--wp--preset--font-size--lead); line-height: 1.4; text-align: center; }
.tletter-step { display: grid; justify-items: center; gap: 1rem; text-align: center; }
.tletter-action { margin: 0; }
.tform-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
