/**
 * ECC Event Waitlist - front-end form.
 *
 * Every rule is scoped under .ecc-wl so nothing leaks into the Astra theme,
 * and so Astra's own form styling does not have to be fought harder than
 * necessary. Colors are the ECC light emerald (#1d7a4e) per Brand & Voice.
 */

.ecc-wl {
	--ecc-wl-green: #1d7a4e;
	--ecc-wl-green-dark: #1a3d2b;
	--ecc-wl-ink: #1a2e22;
	--ecc-wl-muted: #2f4337;
	--ecc-wl-line: #8fb09d;
	--ecc-wl-field-border: #4f6f5c;
	--ecc-wl-bg: #f2faf5;

	margin: 2.5rem 0 1rem;
	/* Readable for everyone, elders included: 18px base, dark ink, no tiny
	   gray print. Every text colour below is at least 7:1 on its background. */
	font-size: 1.125rem;
	font-family: 'Montserrat', 'Helvetica Neue', Arial, Helvetica, sans-serif;
}

.ecc-wl-inner {
	background: var(--ecc-wl-bg);
	border: 1px solid var(--ecc-wl-line);
	border-radius: 10px;
	padding: 2rem;
	max-width: 44rem;
	border-width: 2px;
}

.ecc-wl .ecc-wl-heading {
	margin: 0 0 .5rem;
	font-size: 1.9rem;
	line-height: 1.2;
	color: var(--ecc-wl-green-dark);
}

.ecc-wl .ecc-wl-intro {
	margin: 0 0 .75rem;
	color: var(--ecc-wl-ink);
	font-size: 1.15rem;
	line-height: 1.6;
	max-width: 60ch;
}

.ecc-wl .ecc-wl-count {
	margin: 0 0 1.25rem;
	color: var(--ecc-wl-muted);
	font-size: 1.05rem;
}

/* Messages */

.ecc-wl-message {
	margin: 0 0 1rem;
}

.ecc-wl-message p {
	margin: 0;
	padding: .75rem 1rem;
	border-radius: 6px;
	border-left: 4px solid var(--ecc-wl-green);
	background: #e2f0e9;
	color: var(--ecc-wl-green-dark);
	line-height: 1.5;
}

.ecc-wl-message p.ecc-wl-error {
	border-left-color: #9b2b1a;
	background: #fde8e5;
	color: #7a1f11;
}

/* Fields */

.ecc-wl-field {
	margin: 0 0 1rem;
	display: flex;
	flex-direction: column;
}

.ecc-wl-field label {
	font-weight: 600;
	margin-bottom: .4rem;
	color: var(--ecc-wl-green-dark);
	font-size: 1.15rem;
}

.ecc-wl-optional {
	font-weight: 400;
	color: var(--ecc-wl-muted);
}

.ecc-wl .ecc-wl-help {
	order: 3;
	margin-top: .35rem;
	font-size: 1rem;
	color: var(--ecc-wl-muted);
	line-height: 1.45;
}

.ecc-wl-field input[type="text"],
.ecc-wl-field input[type="email"],
.ecc-wl-field input[type="tel"],
.ecc-wl-field select,
.ecc-wl-field textarea {
	width: 100%;
	padding: .85rem 1rem;
	border: 2px solid var(--ecc-wl-field-border);
	border-radius: 6px;
	background: #fff;
	color: var(--ecc-wl-ink);
	/* Never below 16px, which stops iOS Safari zooming on focus. */
	font-size: 1.125rem;
	font-family: inherit;
	line-height: 1.4;
}

.ecc-wl-field input:focus,
.ecc-wl-field select:focus,
.ecc-wl-field textarea:focus {
	outline: 4px solid rgba(29, 122, 78, .55);
	outline-offset: 2px;
	border-color: var(--ecc-wl-green-dark);
}

/* Honeypot. Hidden from people, reachable by anything filling every input.
   Kept out of the layout without display:none, which some bots check for. */
.ecc-wl-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Submit */

.ecc-wl .ecc-wl-submit {
	display: inline-block;
	background: #165c3a;
	color: #fff;
	border: 0;
	border-radius: 6px;
	padding: 1rem 2rem;
	font-size: 1.2rem;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	min-height: 56px; /* large, easy target */
}

.ecc-wl .ecc-wl-submit:hover,
.ecc-wl .ecc-wl-submit:focus {
	background: #0f4a2d;
}

.ecc-wl .ecc-wl-submit:focus-visible {
	outline: 3px solid rgba(29, 122, 78, .45);
	outline-offset: 2px;
}

.ecc-wl .ecc-wl-submit[disabled] {
	opacity: .6;
	cursor: progress;
}

.ecc-wl .ecc-wl-fineprint {
	margin: 1rem 0 0;
	font-size: 1rem;
	color: var(--ecc-wl-muted);
	line-height: 1.5;
}

@media (max-width: 600px) {
	.ecc-wl-inner {
		padding: 1.25rem;
	}

	.ecc-wl .ecc-wl-submit {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ecc-wl * {
		transition: none !important;
		animation: none !important;
	}
}

/* Free registration: one block per extra person in the party (1.3.1). */
.ecc-wl-guest {
	border: 2px solid var(--ecc-wl-line);
	border-radius: 6px;
	margin: 0 0 1.25rem;
	padding: 0.75rem 1rem 0.25rem;
}
.ecc-wl-guest[hidden] {
	display: none;
}
.ecc-wl-guest legend {
	font-weight: 700;
	font-size: 1.15rem;
	color: var(--ecc-wl-green-dark);
	padding: 0 0.4rem;
}

/* Donation wording sits above the button at full reading size, not in the
   small print. Links are underlined and dark so they are plain to see. */
.ecc-wl .ecc-wl-donate {
	margin: 0 0 1.25rem;
	padding: 1rem 1.15rem;
	background: #fff;
	border-left: 5px solid #165c3a;
	border-radius: 4px;
	color: var(--ecc-wl-ink);
	font-size: 1.1rem;
	line-height: 1.6;
}
.ecc-wl a {
	color: #0f4a2d !important;
	font-weight: 700;
	text-decoration: underline !important;
}

/* Hidden hint on the donate link, for screen readers only (1.3.3). */
.ecc-wl .screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	white-space: nowrap;
}

/* "Are you human" check from the Turnstile plugin (1.4.0). */
.ecc-wl .ecc-wl-turnstile {
	margin: 0 0 1.25rem;
	min-height: 0;
}

/* Spots left (1.4.6). Large, dark and plain so it reads at a glance. */
.ecc-wl .ecc-wl-spots {
	display: inline-block;
	margin: 0 0 1.25rem;
	padding: .5rem 1rem;
	border-radius: 999px;
	background: #fff;
	border: 2px solid #165c3a;
	color: #0f4a2d;
	font-size: 1.15rem;
	font-weight: 700;
	line-height: 1.3;
}
.ecc-wl .ecc-wl-spots-low {
	background: #fff4e0;
	border-color: #7a4f00;
	color: #5a3a00;
}
.ecc-wl .ecc-wl-spots[hidden] {
	display: none;
}

/* The registration cutoff, in words (1.4.8). */
.ecc-wl .ecc-wl-closes {
	margin: 0 0 1.25rem;
	color: var(--ecc-wl-green-dark);
	font-size: 1.1rem;
	font-weight: 600;
	line-height: 1.4;
}

/* The jump button under the event date (1.4.9). Outside .ecc-wl, so every rule is
   scoped to its own classes, and the theme's link colours are overridden. */
.ecc-wl-jump {
	margin: 1rem 0 1.5rem;
}
.ecc-wl-jump a.ecc-wl-jump-btn {
	display: inline-block;
	min-height: 56px;
	padding: 1rem 2rem;
	background: #165c3a;
	color: #fff !important;
	border-radius: 6px;
	font-family: 'Montserrat', 'Helvetica Neue', Arial, Helvetica, sans-serif;
	font-size: 1.2rem;
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none !important;
}
.ecc-wl-jump a.ecc-wl-jump-btn::after {
	content: " \2193";
}
.ecc-wl-jump a.ecc-wl-jump-btn:hover,
.ecc-wl-jump a.ecc-wl-jump-btn:focus {
	background: #0f4a2d;
	color: #fff !important;
}
.ecc-wl-jump a.ecc-wl-jump-btn:focus-visible {
	outline: 3px solid rgba(29, 122, 78, .55);
	outline-offset: 3px;
}
/* Land with room above the form, under any sticky header or the admin bar. */
.ecc-wl {
	scroll-margin-top: 6rem;
}
@media (max-width: 600px) {
	.ecc-wl-jump a.ecc-wl-jump-btn {
		display: block;
		text-align: center;
	}
}
