/* TREWO donation form.
   Written against the theme's own design tokens (--color-primary, --font-*)
   with fallbacks, so it inherits the site's look when used in this theme and
   still renders sensibly anywhere else. */

.trewo-donate {
	max-width: 760px;
	margin-inline: auto;
}

.trewo-donate__notice {
	padding: 14px 18px;
	border-radius: 8px;
	margin-bottom: 24px;
	font-size: 15px;
	line-height: 1.6;
}

.trewo-donate__notice--warn {
	background: #fff6e5;
	border: 1px solid #e6c168;
	color: #6b5200;
}

.trewo-donate__notice--error {
	background: var(--color-primary-tint, #f8e7e8);
	border: 1px solid var(--color-primary, #b5121b);
	color: var(--color-primary-dark, #880e14);
}

.trewo-donate__group {
	border: 0;
	padding: 0;
	margin: 0 0 34px;
}

.trewo-donate__legend {
	padding: 0;
	margin-bottom: 14px;
	font-family: var(--font-display, Georgia, serif);
	font-weight: 400;
	font-size: 21px;
	line-height: 1.3;
	color: var(--color-ink, #1f1b1b);
}

.trewo-donate__req {
	color: var(--color-primary, #b5121b);
}

.trewo-donate__note {
	margin: 0 0 16px;
	font-size: 14px;
	line-height: 1.6;
	color: var(--color-body, #545454);
}

/* Designations stack: they are full sentences, so a row would wrap badly. */
.trewo-donate__choices {
	display: grid;
	gap: 10px;
}

/* Borders are deliberately NOT the theme's --color-grey-light here. That token
   is #ededed, which sits at about 1.2:1 against white — far below the 3:1 that
   WCAG asks of an interactive control's boundary, and effectively invisible to
   an older donor. #767676 measures 4.5:1.
   The weight stays at a hairline: the contrast is what makes a border legible,
   not the thickness, and 2px read as heavy without helping. */
.trewo-donate__choice,
.trewo-donate__amount {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 18px;
	border: 1px solid #767676;
	border-radius: 10px;
	cursor: pointer;
	font-size: 16px;
	color: var(--color-ink, #1f1b1b);
	transition: border-color 0.18s ease, background-color 0.18s ease;
}

.trewo-donate__choice:hover,
.trewo-donate__amount:hover {
	border-color: var(--color-primary, #b5121b);
}

/* :has() lets the whole tile show selection, not just the radio dot. Browsers
   without it simply keep the plain border — nothing breaks. */
.trewo-donate__choice:has(input:checked),
.trewo-donate__amount:has(input:checked) {
	border-color: var(--color-primary, #b5121b);
	background: var(--color-primary-tint, #f8e7e8);
	box-shadow: inset 0 0 0 1px var(--color-primary, #b5121b);
}

.trewo-donate__choice:has(input:focus-visible),
.trewo-donate__amount:has(input:focus-visible) {
	outline: 2px solid var(--color-primary, #b5121b);
	outline-offset: 2px;
}

/* Amounts are short, so they run as a wrapping row. */
.trewo-donate__amounts {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.trewo-donate__amount {
	flex: 0 0 auto;
	min-width: 96px;
	justify-content: center;
	font-weight: 600;
}

.trewo-donate__field {
	margin: 0 0 16px;
}

/* Radios at browser default are small targets. Scaling them up helps both
   visibility and anyone using a shaky hand or a touch screen. */
.trewo-donate__choice input[type="radio"],
.trewo-donate__amount input[type="radio"] {
	width: 20px;
	height: 20px;
	accent-color: var(--color-primary, #b5121b);
	flex: none;
}

.trewo-donate__field label {
	display: block;
	margin-bottom: 6px;
	font-size: 15px;
	font-weight: 600;
	color: var(--color-ink, #1f1b1b);
}

.trewo-donate__field input,
.trewo-donate__field textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid #767676;
	border-radius: 8px;
	font: inherit;
	font-size: 16px; /* 16px stops iOS zooming the page on focus. */
	color: var(--color-ink, #1f1b1b);
	background: #fff;
}

/* Focus has to be unmistakable, not merely present — a 3px ring plus the
   brand-red border, so the field being typed into is obvious at a glance. */
.trewo-donate__field input:focus,
.trewo-donate__field textarea:focus {
	outline: 3px solid var(--color-primary, #b5121b);
	outline-offset: 2px;
	border-color: var(--color-primary, #b5121b);
}

.trewo-donate__field--other {
	margin-top: 14px;
	max-width: 260px;
}

.trewo-donate__row {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	gap: 14px;
}

/* Honeypot: off-screen rather than display:none. Some bots skip fields that
   are display:none precisely because it is the obvious tell. */
.trewo-donate__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.trewo-donate__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 16px 34px;
	border: 0;
	border-radius: 999px;
	background: var(--color-primary, #b5121b);
	color: #fff;
	font-family: var(--font-label, Helvetica, Arial, sans-serif);
	font-weight: 600;
	font-size: 15px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.trewo-donate__submit:hover:not(:disabled) {
	background: var(--color-primary-dark, #880e14);
}

.trewo-donate__submit:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.trewo-donate__secure {
	margin-top: 16px;
	font-size: 13px;
	line-height: 1.6;
	color: var(--color-body, #545454);
}

@media (max-width: 640px) {
	.trewo-donate__row {
		grid-template-columns: 1fr;
	}
}


/* ---------- Thank-you page ---------------------------------------------- */

.trewo-thanks {
	max-width: 620px;
	margin-inline: auto;
	text-align: center;
}

.trewo-thanks__mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 76px;
	height: 76px;
	margin-bottom: 24px;
	border-radius: 50%;
	background: var(--color-primary-tint, #f8e7e8);
	color: var(--color-primary, #b5121b);
}

/* Failed payments get a muted mark rather than the brand tint — a cheerful
   pink circle above "that payment did not go through" reads as a mixed
   message. */
.trewo-thanks__mark--warn {
	background: #f3f3f3;
	color: #6b6b6b;
}

.trewo-thanks__title {
	font-family: var(--font-display, Georgia, serif);
	font-weight: 300;
	font-size: clamp(28px, 4vw, 42px);
	line-height: 1.15;
	color: var(--color-ink, #1f1b1b);
}

.trewo-thanks__text {
	margin-top: 18px;
	font-size: 17px;
	line-height: 1.7;
	color: var(--color-body, #545454);
}

/* Set apart so a donor can quote it in an email without hunting for it. */
.trewo-thanks__ref {
	margin-top: 26px;
	padding: 14px 20px;
	display: inline-block;
	border-radius: 8px;
	background: var(--color-cream, #fbf8f5);
	font-family: var(--font-label, Helvetica, Arial, sans-serif);
	font-size: 13px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--color-body, #545454);
}

.trewo-thanks__ref strong {
	display: block;
	margin-top: 4px;
	font-size: 17px;
	letter-spacing: 0.04em;
	color: var(--color-ink, #1f1b1b);
}

.trewo-thanks__charity {
	margin-top: 30px;
	font-family: var(--font-label, Helvetica, Arial, sans-serif);
	font-weight: 600;
	font-size: 12px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--color-grey, #808083);
}

.trewo-thanks__home {
	margin-top: 22px;
}

.trewo-thanks__home a {
	color: var(--color-primary, #b5121b);
	text-decoration: underline;
	text-underline-offset: 3px;
}
