/*
 * Ultimate Subscriber List: the form's own small stylesheet, always loaded.
 * It sets no colors, fonts or sizes. Every selector is wrapped in :where()
 * (zero specificity), so any theme or container rule wins.
 */

/* Visible labels sit above their boxes, whatever the layout. */
:where(.usub-form .usub-label) { display: block; }

/* Field layout "Side by side": the name and email boxes share one row and wrap
   onto their own lines when there is not enough room (phones, narrow columns). */
:where(.usub-form--side-by-side) {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	column-gap: 1em;
}
:where(.usub-form--side-by-side) > :where(*) { flex: 1 1 100%; }
/* All boxes share the row while the form is at least 24em wide; below that, every box
   takes the full width (stacked). No media query, so it also works in narrow columns. */
:where(.usub-form--side-by-side) > :where(.usub-field--email, .usub-field--name, .usub-field--first-name, .usub-field--last-name) {
	flex: 1 1 calc((24em - 100%) * 999);
	min-width: 0;
}
/* Button position "Same row": the button joins the row at its natural width and goes
   onto its own line when the boxes stack. */
:where(.usub-form--button-inline) > :where(.usub-submit) { flex: 0 0 auto; }
/* With the button in the row the boxes need a little more room before they stack (28em). */
:where(.usub-form--button-inline) > :where(.usub-field--email, .usub-field--name, .usub-field--first-name, .usub-field--last-name) {
	flex-basis: calc((28em - 100%) * 999);
}
:where(.usub-form--side-by-side .usub-input) { box-sizing: border-box; width: 100%; max-width: 100%; }

/* The honeypot must stay hidden whatever the theme does; the only !important. */
:where(.usub-field--honeypot) {
	position: absolute !important;
	left: -9999px !important;
	height: 0 !important;
	overflow: hidden !important;
}

/* The "This was a test, nothing changed." note on the test unsubscribe page. No colors
   of its own: the bar uses the theme's text color, so it reads on light and dark themes. */
:where(.usub-admin-note) {
	margin: 1em 0;
	padding: 0.75em 1em;
	border-inline-start: 4px solid currentColor;
}
