/**
 * The signup form. Enqueued by Signup only on a page rendering [ffa_usa_signup].
 *
 * Kept deliberately small and theme-agnostic: ffa.org is Avada and the block-theme sites are
 * ffa-horizon, and this form has to read as a form on both without depending on either.
 */
.ffausa-signup {
	max-width: 700px;
	margin: 0 auto;
}

.ffausa-signup h3 {
	margin: 1.75em 0 0.5em;
}

.ffausa-signup label {
	display: block;
	font-weight: 600;
	margin: 0 0 1em;
}

.ffausa-signup input[type="text"],
.ffausa-signup input[type="email"],
.ffausa-signup input[type="password"],
.ffausa-signup input[type="date"] {
	display: block;
	width: 100%;
	box-sizing: border-box;
	margin-top: 0.3em;
	padding: 0.55em 0.7em;
	font: inherit;
	font-weight: 400;
	border: 1px solid #8c8f94;
	border-radius: 4px;
}

/* Two fields on one line, stacking on narrow screens. */
.ffausa-row {
	display: flex;
	gap: 1em;
}

/*
 * Each label is a column with its input pinned to the bottom, so two labels of different lengths
 * in one row still put their boxes on the same line. Found by Larry on 2026-09-05: the password
 * label wrapped and its box sat a line lower than the confirmation box beside it.
 */
.ffausa-row > label {
	flex: 1 1 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
}

.ffausa-row > label > input {
	margin-top: auto;
}

@media (max-width: 560px) {
	.ffausa-row {
		flex-direction: column;
		gap: 0;
	}
}

.ffausa-hint,
.ffausa-signup .description {
	font-size: 0.9em;
	color: #50575e;
	margin: -0.5em 0 1em;
}

.ffausa-errors {
	border-left: 4px solid #b32d2e;
	background: #fcf0f1;
	padding: 0.75em 1em;
	margin: 0 0 1.5em;
}

.ffausa-errors ul {
	margin: 0;
	padding-left: 1.2em;
}

.ffausa-signup button[type="submit"] {
	display: inline-block;
	padding: 0.75em 1.75em;
	font: inherit;
	font-weight: 700;
	color: #fff;
	background: #002d72; /* National Blue */
	border: 0;
	border-radius: 4px;
	cursor: pointer;
}

.ffausa-signup button[type="submit"]:hover,
.ffausa-signup button[type="submit"]:focus {
	background: #001f4f;
}

/* The confirmation shown after submit, and the dead-link notice. 799px on Larry's instruction. */
.ffausa-notice {
	max-width: 799px;
	margin: 0 auto;
	padding: 1.25em 1.5em;
	border-left: 4px solid #002d72;
	background: #f4f7fb;
	font-size: 1.05em;
	line-height: 1.6;
}

.ffausa-notice p:last-child {
	margin-bottom: 0;
}

/* ---- The standalone page frame (approval pages), matching the email frame. ---- */
body.ffausa-page {
	margin: 0;
	padding: 30px 1rem;
	background: #f4f4f4;
	font-family: Arial, Helvetica, sans-serif;
	color: #333;
	line-height: 1.6;
}

.ffausa-card {
	max-width: 799px;
	margin: 0 auto;
	background: #fff;
	border-radius: 4px;
	overflow: hidden;
}

.ffausa-card-head {
	padding: 20px 32px;
	border-bottom: 4px solid #004c97;
}

.ffausa-card-head img {
	display: block;
	width: 41px;
	height: 52px;
}

.ffausa-card-body {
	padding: 32px;
	font-size: 15px;
}

.ffausa-card-body h1 {
	margin: 0 0 0.75em;
	font-size: 1.6em;
	color: #002d72;
}

.ffausa-card-foot {
	padding: 16px 32px;
	background: #f9f9f9;
	border-top: 1px solid #e2e2e2;
	font-size: 12px;
	color: #999;
}

.ffausa-button {
	display: inline-block;
	padding: 0.75em 1.5em;
	font: inherit;
	font-weight: 700;
	color: #fff;
	background: #002d72;
	border: 0;
	border-radius: 4px;
	cursor: pointer;
}

.ffausa-button-secondary {
	color: #002d72;
	background: #fff;
	border: 2px solid #002d72;
}

/*
 * A notice that is GOOD news.
 *
 * ⚠️ THE DEFAULT NOTICE READS AS A PROBLEM, because until 0.27.1 every notice was one. Telling a
 * member who has just successfully signed up that everything is fine, in the same red-edged box
 * used for a dead link, undoes the reassurance the words are there to give.
 */
.ffausa-notice--ok {
	border-left-color: #2e7d32;
}

/*
 * The chapter results list.
 *
 * ⚠️ THIS REPLACED A <datalist>, AND THE MEASUREMENT IS WHY. Of the first 97 real members to
 * onboard, 11 resolved a chapter and 86 typed their advisor instead. datalist is the control that
 * fails quietly on a phone: on iOS Safari its suggestions are a thin strip that is easy to miss,
 * and on some Android browsers it is inconsistent. Nothing visibly happened, so members took the
 * other path.
 *
 * So: a real list, full width, with tap targets a thumb can hit.
 */

.ffausa-results {
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	list-style: none;
	margin: 4px 0 0;
	max-height: 16em;
	overflow-y: auto;
	padding: 0;
}

.ffausa-results li {
	margin: 0;
}

.ffausa-results li + li {
	border-top: 1px solid #e6e6e6;
}

.ffausa-result {
	background: none;
	border: 0;
	cursor: pointer;
	display: block;
	font: inherit;
	/* 44px is the smallest target a thumb hits reliably; the padding keeps it there at any font size. */
	min-height: 44px;
	padding: 12px 14px;
	text-align: left;
	width: 100%;
}

.ffausa-result:hover,
.ffausa-result:focus {
	background: #f0f6fc;
	outline: 2px solid #2271b1;
	outline-offset: -2px;
}

.ffausa-results-status {
	font-size: 0.9em;
	margin: 4px 0 0;
	min-height: 1.2em;
}
