/**
 * /bank-transfer-donation-2/ (inc/bank-transfer-v2.php).
 *
 * Sizes and colours are the Lovable prototype's (Sandro, 2026-11-18), read from
 * its Tailwind classes and its stylesheet's tokens, converted from oklch to the
 * hex values below. The fonts are the theme's, which are the prototype's
 * (Instrument Sans for text, Plus Jakarta Sans for display).
 */

.btd2 {
	--btd2-fg: #2B2521;
	--btd2-muted: #6A615B;
	--btd2-sand: #F2EEEB;
	--btd2-bone: #E9DED7;
	--btd2-card: #FBFBFB;
	--btd2-primary: #FFB300;
	--btd2-primary-fg: #291F18;
	--btd2-accent: #FEEDC9;
	--btd2-accent-fg: #392A1E;
	--btd2-border: #DCD6D1;
	--btd2-input: #D6D0CA;
	--btd2-ring: #E1A035;
	--btd2-error: #D73431;
	--btd2-success: #389560;
	color: var(--btd2-fg);
	font-family: var(--b26-font-body);
	font-size: 16px;
	line-height: 1.5;
}

/* The prototype's page padding: 60px above and below, 16px at the sides. Two
   classes outrank 30-layout.css's .b26-section. */
.b26-section.btd2 {
	padding: 60px 16px;
}

/* The shell spans the section's padded width, as in the prototype. From 640px
   30-layout.css narrows every .b26-section__in by the small gutter, and that
   later one-class rule beat --wide's width: 100% (32px lost on each side at
   1280px). Two classes outrank it. */
.btd2 .b26-section__in--wide {
	width: 100%;
}

.btd2 *,
.btd2 *::before,
.btd2 *::after {
	box-sizing: border-box;
}

.btd2 p {
	margin: 0;
}

.btd2-shell {
	width: 100%;
	max-width: 1320px;
	margin: 0 auto;
	padding: 32px 24px;
	border-radius: 10px;
	background: var(--btd2-sand);
}

@media (min-width: 768px) {
	.btd2-shell {
		padding: 40px 140px;
	}
}

.btd2-icon {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

/* ---- Header and steps ---- */

.btd2-head {
	max-width: 672px;
}

.btd2 .btd2-title {
	margin: 0;
	font-family: var(--b26-font-display);
	font-size: 36px;
	font-weight: 600;
	line-height: 40px;
	letter-spacing: -0.025em;
	color: var(--btd2-fg);
}

@media (min-width: 768px) {
	.btd2 .btd2-title {
		font-size: 48px;
		line-height: 1;
	}
}

.btd2-lead {
	margin-top: 12px !important;
	font-size: 18px;
	line-height: 28px;
	color: var(--btd2-muted);
}

/* Two classes: the theme's list rules would otherwise take the top margin. */
.btd2 .btd2-steps {
	display: grid;
	gap: 12px;
	margin: 32px 0 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 640px) {
	.btd2-steps {
		grid-template-columns: repeat(3, 1fr);
	}
}

.btd2-step {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding: 16px;
	border-radius: 16px;
	background: var(--btd2-card);
}

.btd2-step__icon {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	flex-shrink: 0;
	border-radius: 50%;
	background: var(--btd2-primary);
	color: var(--btd2-primary-fg);
}

.btd2-step__icon .btd2-icon {
	width: 20px;
	height: 20px;
}

.btd2-step__t {
	font-weight: 600;
}

.btd2-step__d {
	font-size: 14px;
	line-height: 20px;
	color: var(--btd2-muted);
}

/* ---- Two columns: the form and the side panel ---- */

.btd2-grid {
	display: grid;
	gap: 32px;
	margin-top: 32px;
}

@media (min-width: 1024px) {
	.btd2-grid {
		grid-template-columns: minmax(0, 1fr) 320px;
	}

	.btd2-aside {
		position: sticky;
		top: 24px;
		align-self: start;
	}
}

.btd2-form,
.btd2-done {
	border-radius: 20px;
	background: var(--btd2-card);
	padding: 24px;
}

@media (min-width: 768px) {
	.btd2-form {
		padding: 40px;
	}
}

/* Between the sections and before the end of the form; the hidden Salesforce
   fields ahead of the first section take none. Two classes, above
   .btd2-section's own margin reset below. */
.btd2 .btd2-section + .btd2-section,
.btd2 .btd2-section + .btd2-foot {
	margin-top: 32px;
}

/* ---- Sections ---- */

.btd2-section {
	min-width: 0;
	margin: 0;
	padding: 32px 0 0;
	border: 0;
	border-top: 1px solid var(--btd2-border);
}

.btd2-form > .btd2-section:first-of-type {
	padding-top: 0;
	border-top: 0;
}

.btd2-legend {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 20px;
	padding: 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 28px;
}

/* The legend sits on the fieldset's top border, which the browser draws
   through its middle and on to the right, as the prototype does; the
   section's 32px padding comes below it. Not floated, and only as wide as its
   text. */
.btd2-section .btd2-legend {
	float: none;
	width: auto;
}

.btd2-legend__n {
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--btd2-fg);
	color: var(--btd2-card);
	font-size: 14px;
	line-height: 20px;
}

.btd2-section__body > * + * {
	margin-top: 20px;
}

.btd2-cols,
.btd2-address {
	display: grid;
	gap: 20px;
}

.btd2-cols > * + *,
.btd2-address > * + * {
	margin-top: 0;
}

@media (min-width: 640px) {
	.btd2-cols {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.btd2-span-2 {
		grid-column: span 2;
	}

	.btd2-address {
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}

	.btd2-a6 { grid-column: span 6; }
	.btd2-a4 { grid-column: span 4; }
	.btd2-a3 { grid-column: span 3; }
	.btd2-a2 { grid-column: span 2; }
}

/* ---- Fields ---- */

.btd2 .btd2-label {
	display: block;
	margin: 0 0 6px;
	font-size: 14px;
	font-weight: 600;
	line-height: 20px;
	color: var(--btd2-fg);
}

.btd2-label__opt {
	font-weight: 400;
	color: var(--btd2-muted);
}

.btd2-error,
.btd2-hint {
	margin-top: 6px !important;
	font-size: 14px;
	line-height: 20px;
}

.btd2-error {
	color: var(--btd2-error);
}

.btd2-hint {
	color: var(--btd2-muted);
}

/* The hint gives way to the error, as in the prototype. */
.btd2-error:not([hidden]) + .btd2-hint {
	display: none;
}

.btd2 .btd2-input {
	display: block;
	width: 100%;
	height: 48px;
	margin: 0;
	padding: 0 16px;
	border: 1px solid var(--btd2-input);
	border-radius: 10px;
	background: var(--btd2-card);
	box-shadow: none;
	font-family: inherit;
	font-size: 16px;
	line-height: 24px;
	color: var(--btd2-fg);
	transition: border-color 0.15s, box-shadow 0.15s;
}

.btd2 .btd2-input--area {
	height: auto;
	padding: 12px 16px;
	resize: vertical;
}

.btd2 .btd2-input::placeholder,
.btd2 textarea::placeholder {
	color: color-mix(in srgb, var(--btd2-muted) 70%, transparent);
	opacity: 1;
}

.btd2 .btd2-input:focus {
	outline: none;
	border-color: var(--btd2-ring);
	box-shadow: 0 0 0 2px var(--btd2-ring);
}

.btd2 .btd2-input[aria-invalid="true"] {
	border-color: var(--btd2-error);
}

/* Amount, with the currency picker built into the field. */
.btd2-amount {
	display: flex;
	height: 48px;
	overflow: hidden;
	border: 1px solid var(--btd2-input);
	border-radius: 10px;
	background: var(--btd2-card);
}

.btd2-amount:focus-within {
	box-shadow: 0 0 0 2px var(--btd2-ring);
}

.btd2-amount.is-invalid {
	border-color: var(--btd2-error);
}

.btd2 .btd2-amount .btd2-input {
	height: 100%;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

.btd2-currency {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 72px;
	flex-shrink: 0;
	padding: 0 12px;
	border-right: 1px solid var(--btd2-input);
	background: var(--btd2-bone);
	font-size: 14px;
	font-weight: 600;
}

.btd2-currency__chev {
	opacity: 0.5;
}

/* The native select covers the box, invisible: it opens the list and posts the
   value, while the box shows the code alone. */
.btd2 .btd2-currency select {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
	font-size: 16px;
}

/* Payment method cards. */
.btd2-methods {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
}

.btd2-methods--2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.btd2-method {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 16px;
	border: 2px solid var(--btd2-border);
	border-radius: 10px;
	font-size: 14px;
	font-weight: 600;
	line-height: 20px;
	text-align: center;
	cursor: pointer;
	transition: border-color 0.15s, background-color 0.15s;
}

.btd2-method:hover {
	border-color: var(--btd2-ring);
}

.btd2-method input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

.btd2-method:has(input:checked) {
	border-color: var(--btd2-primary);
	background: var(--btd2-accent);
}

.btd2-method:has(input:focus-visible) {
	box-shadow: 0 0 0 2px var(--btd2-ring);
}

.btd2-method__icon {
	width: 24px;
	height: 24px;
}

.btd2-method__check {
	position: absolute;
	top: 8px;
	right: 8px;
	display: none;
}

.btd2-method:has(input:checked) .btd2-method__check {
	display: block;
}

/* Support our operations. */
.btd2-ops {
	display: flex;
	gap: 12px;
	margin-bottom: 12px;
	padding: 16px;
	border-radius: 10px;
	background: var(--btd2-accent);
	color: var(--btd2-accent-fg);
	font-size: 14px;
	line-height: 20px;
}

.btd2-ops__icon {
	width: 20px;
	height: 20px;
	margin-top: 2px;
}

/* Where to give, with the example chips under the box. */
.btd2-alloc {
	overflow: hidden;
	border: 1px solid var(--btd2-input);
	border-radius: 10px;
	background: var(--btd2-card);
}

.btd2-alloc:focus-within {
	box-shadow: 0 0 0 2px var(--btd2-ring);
}

.btd2-alloc.is-invalid {
	border-color: var(--btd2-error);
}

/* Inline-block, as the prototype leaves it: the line box it sits on adds the
   7px under the box that the prototype shows above the chips. */
.btd2 .btd2-alloc__text {
	display: inline-block;
	vertical-align: baseline;
	width: 100%;
	margin: 0;
	padding: 12px 16px;
	border: 0;
	background: transparent;
	box-shadow: none;
	font-family: inherit;
	font-size: 16px;
	line-height: 24px;
	color: var(--btd2-fg);
	resize: vertical;
}

.btd2 .btd2-alloc__text:focus {
	outline: none;
}

.btd2-alloc__chips {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	padding: 10px 12px 12px;
	border-top: 1px solid var(--btd2-border);
}

.btd2-alloc__lead {
	font-size: 12px;
	font-weight: 600;
	line-height: 16px;
	color: var(--btd2-muted);
}

.btd2 .btd2-chip {
	margin: 0;
	padding: 4px 12px;
	border: 1px solid var(--btd2-border);
	border-radius: 999px;
	background: var(--btd2-bone);
	font-family: inherit;
	font-size: 12px;
	font-weight: 500;
	line-height: 16px;
	color: var(--btd2-fg);
	cursor: pointer;
}

.btd2 .btd2-chip:hover {
	border-color: var(--btd2-ring);
}

/* ---- The end of the form ---- */

/* A column with a 20px gap rather than sibling margins: the comment box and
   its "Add a comment" button take turns being hidden, and a hidden sibling
   would still collect a margin. */
.btd2-foot {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding-top: 32px;
	border-top: 1px solid var(--btd2-border);
}

.btd2 .btd2-addcomment {
	display: flex;
	align-self: flex-start;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 20px;
	color: var(--btd2-fg);
	text-decoration: underline;
	text-decoration-color: var(--btd2-primary);
	text-underline-offset: 4px;
	cursor: pointer;
}

.btd2-check {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin: 0;
	font-size: 14px;
	line-height: 20px;
	cursor: pointer;
}

.btd2 .btd2-check input {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	margin: 2px 0 0;
	accent-color: var(--btd2-primary);
}

.btd2 .btd2-check a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* The checkbox at the end of section 1 keeps the section's 20px rhythm; the
   .btd2-check reset above would otherwise take it to 0. */
.btd2 .btd2-section__body > .btd2-check {
	margin-top: 20px;
}

.btd2 .btd2-submit {
	display: block;
	width: 100%;
	height: 48px;
	margin-left: 0;
	margin-right: 0;
	padding: 0 16px;
	border: 0;
	border-radius: 12px;
	background: var(--btd2-primary);
	font-family: var(--b26-font-display);
	font-size: 16px;
	font-weight: 700;
	line-height: 24px;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--btd2-primary-fg);
	cursor: pointer;
	transition: filter 0.15s, transform 0.15s;
}

.btd2 .btd2-submit:hover {
	filter: brightness(0.95);
}

.btd2 .btd2-submit:active {
	transform: scale(0.99);
}

.btd2-note {
	font-size: 14px;
	line-height: 20px;
	text-align: center;
	color: var(--btd2-muted);
}

/* ---- Side panel ---- */

.btd2-aside > * + * {
	margin-top: 16px;
}

.btd2-trust {
	padding: 24px;
	border-radius: 20px;
	background: var(--btd2-card);
}

.btd2-trust p {
	display: flex;
	align-items: center;
	gap: 12px;
	font-weight: 600;
}

.btd2-trust p + p {
	margin-top: 16px;
}

.btd2-trust .btd2-icon {
	width: 20px;
	height: 20px;
	color: var(--btd2-success);
}

.btd2-know {
	padding: 24px;
	border: 1px solid var(--btd2-border);
	border-radius: 20px;
	font-size: 14px;
	line-height: 20px;
}

.btd2-know p + p {
	margin-top: 8px;
}

.btd2-know__t {
	font-weight: 700;
}

.btd2-know__q {
	color: var(--btd2-muted);
}

.btd2-know a,
.btd2-done a {
	color: inherit;
	text-decoration: underline;
}

/* ---- After Salesforce returns the donor ---- */

.btd2-done[hidden] {
	display: none;
}

.btd2-done {
	padding: 32px;
	text-align: center;
}

@media (min-width: 768px) {
	.btd2-done {
		padding: 48px;
	}
}

.btd2-done__icon {
	display: grid;
	place-items: center;
	width: 64px;
	height: 64px;
	margin: 0 auto;
	border-radius: 50%;
	background: color-mix(in srgb, var(--btd2-success) 15%, transparent);
	color: var(--btd2-success);
}

.btd2-done__icon .btd2-icon {
	width: 32px;
	height: 32px;
}

.btd2 .btd2-done__title {
	margin: 20px 0 0;
	font-family: var(--b26-font-body);
	font-size: 24px;
	font-weight: 700;
	line-height: 32px;
	letter-spacing: 0;
	color: var(--btd2-fg);
}

.btd2-done__text {
	max-width: 448px;
	margin: 8px auto 0 !important;
	color: var(--btd2-muted);
}

.btd2-done__text strong {
	color: var(--btd2-fg);
}

.btd2-done__help {
	margin-top: 24px !important;
	font-size: 14px;
	line-height: 20px;
	color: var(--btd2-muted);
}

.btd2-done__help a {
	text-decoration-color: var(--btd2-primary);
	text-underline-offset: 4px;
}

/* ---- Responsive: phone, tablet, desktop ----
   The prototype pads the shell 140px at each side from 768px, which left the
   form 441px at 768px and 345px at 1024px (squeezed steps, cut placeholders,
   three-line labels). The same rules as page 3's form.css. These rules keep its layout from 1280px up and give the
   narrower screens their width back. Last in the file, so at equal
   specificity they win over the rules above. */

/* Phone: less nesting padding, so the fields get the width. */
@media (max-width: 639.98px) {
	.b26-section.btd2 {
		padding: 32px 12px 48px;
	}

	.btd2-shell {
		padding: 28px 16px;
	}

	.btd2-form,
	.btd2-done {
		padding: 24px 20px;
	}

	.btd2-method {
		padding: 16px 8px;
	}
}

/* The narrowest phones: room for the flexible amount's placeholder. */
@media (max-width: 359.98px) {
	.btd2-shell {
		padding-inline: 12px;
	}

	.btd2-form,
	.btd2-done {
		padding: 20px 16px;
	}
}

/* From 768px the content keeps the prototype's 1040px (1320px shell less 140px
   a side) and the gutter is whatever is left, never under 32px: 140px at
   1440px and up as in the prototype, 32px on a tablet, no jump in between.
   The shell is 100% of the section's content box, capped at 1320px. */
@media (min-width: 768px) {
	.btd2-shell {
		padding: 40px max(32px, calc((min(100vw - 32px, 1320px) - 1040px) / 2));
	}
}

/* The three steps sit side by side only where each has room for its text. */
@media (min-width: 640px) and (max-width: 767.98px) {
	.btd2-steps {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Tablet: the side panel moves under the form, its two cards side by side. */
@media (min-width: 640px) and (max-width: 1023.98px) {
	.btd2-aside {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px;
	}

	.btd2-aside > * + * {
		margin-top: 0;
	}
}

/* Small desktop: the side panel grows from 280px at 1024px to the prototype's
   320px where the content reaches 1040px (1136px), so the form only ever
   widens as the window does: 616px at 1024px, 688px from 1136px. */
@media (min-width: 1024px) {
	.btd2-grid {
		grid-template-columns: minmax(0, 1fr) clamp(280px, calc(35.71vw - 85.71px), 320px);
	}
}

/* Zip and Country share the row equally until the form is wide enough for a
   one-line "Zip / Postcode (optional)" label in the prototype's third. */
@media (min-width: 640px) and (max-width: 1279.98px) {
	.btd2-address .btd2-a2,
	.btd2-address .btd2-a4 {
		grid-column: span 3;
	}
}

/* "Add a comment" keeps its look and gets a 44px tall touch target. */
.btd2 .btd2-addcomment {
	padding-block: 12px;
	margin-block: -12px;
}

/* The submit label wraps on a phone: the button grows with it instead of a
   fixed 48px that a second or third line overflows. One line stays 48px. */
.btd2 .btd2-submit {
	height: auto;
	min-height: 48px;
	padding-block: 12px;
}
