/* UMC Stripe Donations — override the variables in your theme to match branding. */
.umc-donate {
	--umc-accent: #0057b7;
	--umc-accent-contrast: #fff;
	--umc-cta: #ffd700;
	--umc-cta-text: #1a1a1a;
	--umc-border: #d0d7e2;
	--umc-bg: #fff;
	--umc-muted: #5b6575;
	--umc-radius: 10px;

	box-sizing: border-box;
	max-width: 440px;
	padding: 24px;
	background: var(--umc-bg);
	border: 1px solid var(--umc-border);
	border-radius: calc(var(--umc-radius) * 1.4);
	font: inherit;
}
.umc-donate *,
.umc-donate *::before,
.umc-donate *::after { box-sizing: inherit; }

.umc-donate__badge {
	margin: 0 0 12px;
	padding: 8px 12px;
	border-radius: calc(var(--umc-radius) - 3px);
	font-size: .8em;
	line-height: 1.4;
	text-align: center;
}
.umc-donate__badge--warn { background: #fdecea; color: #92321f; }
.umc-donate__badge--test { background: #fcf0c3; color: #6b5400; }

.umc-donate__eyebrow { margin: 0 0 4px; font-size: .85em; font-weight: 600; color: var(--umc-accent); text-align: center; }
.umc-donate__title { margin: 0 0 16px; text-align: center; }

.umc-donate button { font: inherit; cursor: pointer; }

.umc-donate__sr-only {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Two equal bordered boxes, not a filled segmented pill. */
.umc-donate__toggle {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-bottom: 16px;
}
.umc-donate__toggle button {
	padding: 12px;
	border: 1.5px solid var(--umc-border);
	border-radius: var(--umc-radius);
	background: var(--umc-bg);
	color: inherit;
	font-weight: 600;
	transition: border-color .15s, background .15s, color .15s;
}
.umc-donate__toggle button.is-active {
	border-color: var(--umc-accent);
	background: var(--umc-accent);
	color: var(--umc-accent-contrast);
}

/* Preset amounts + the custom-amount field sit in one shared row of equal cells. */
.umc-donate__row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 12px;
}
.umc-donate__amounts {
	display: contents; /* children become flex items of .umc-donate__row */
}
.umc-donate__amount {
	flex: 1 1 72px;
	padding: 12px 6px;
	border: 1.5px solid var(--umc-border);
	border-radius: var(--umc-radius);
	background: var(--umc-bg);
	color: inherit;
	font-weight: 600;
	transition: border-color .15s, background .15s;
}
.umc-donate__amount:hover { border-color: var(--umc-accent); }
.umc-donate__amount.is-active {
	border-color: var(--umc-accent);
	background: var(--umc-accent);
	color: var(--umc-accent-contrast);
}

.umc-donate__other { display: block; flex: 1 1 90px; margin: 0; }
.umc-donate__other-field {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	border: 1.5px solid var(--umc-border);
	border-radius: var(--umc-radius);
	padding: 0 10px;
	background: var(--umc-bg);
}
.umc-donate__other-field:focus-within { border-color: var(--umc-accent); }
.umc-donate__currency { font-weight: 600; color: var(--umc-muted); }
.umc-donate__other-input {
	flex: 1;
	min-width: 0;
	width: 100%;
	padding: 11px 4px;
	border: 0 !important;
	outline: 0;
	background: transparent;
	font: inherit;
	font-weight: 600;
	text-align: center;
	box-shadow: none !important;
}

.umc-donate__giftaid {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin-bottom: 16px;
	font-size: .82em;
	line-height: 1.45;
	color: var(--umc-muted);
}
.umc-donate__giftaid input { margin-top: 3px; flex: none; }
.umc-donate__giftaid strong { display: block; color: inherit; }

.umc-donate__hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.umc-donate__submit {
	width: 100%;
	padding: 14px;
	border: 0;
	border-radius: var(--umc-radius);
	background: var(--umc-cta);
	color: var(--umc-cta-text);
	font-weight: 700;
	font-size: 1.05em;
	transition: filter .15s;
}
.umc-donate__submit:hover { filter: brightness(.95); }
.umc-donate__submit:disabled { opacity: .7; cursor: progress; }

.umc-donate button:focus-visible,
.umc-donate input:focus-visible { outline: 2px solid var(--umc-accent); outline-offset: 2px; }

.umc-donate__error { margin: 10px 0 0; color: #b42318; font-size: .9em; }
.umc-donate__note { margin: 10px 0 0; text-align: center; font-size: .8em; color: var(--umc-muted); }

@media (max-width: 400px) {
	.umc-donate { padding: 16px; }
	.umc-donate__amount,
	.umc-donate__other { flex-basis: calc(33.333% - 6px); }
}

/* Thank-you page ([umc_donate_thanks]) */
.umc-thanks {
	--umc-accent: #0057b7;
	--umc-cta: #ffd700;
	--umc-border: #d0d7e2;
	--umc-bg: #fff;
	--umc-muted: #5b6575;
	--umc-radius: 10px;

	box-sizing: border-box;
	max-width: 480px;
	margin: 40px auto;
	padding: 40px 32px;
	background: var(--umc-bg);
	border: 1px solid var(--umc-border);
	border-radius: calc(var(--umc-radius) * 1.4);
	box-shadow: 0 4px 24px rgba(16, 24, 40, .06);
	text-align: center;
}
.umc-thanks * { box-sizing: border-box; }

.umc-thanks__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	margin: 0 auto 20px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--umc-accent), #0070e0);
	color: #fff;
	box-shadow: 0 6px 16px rgba(0, 87, 183, .25);
}
.umc-thanks__icon svg { width: 30px; height: 30px; }

.umc-thanks h2 {
	margin: 0 0 12px;
	font-size: 1.6em;
	line-height: 1.25;
	color: #1a1a1a;
}

.umc-thanks__lede {
	margin: 0 0 8px;
	font-size: 1.05em;
	line-height: 1.5;
	color: #30394a;
}

.umc-thanks__note {
	margin: 0 0 20px;
	font-size: .88em;
	color: var(--umc-muted);
}

.umc-thanks .umc-manage {
	margin: 4px 0 20px;
}
.umc-thanks .umc-manage__link {
	display: inline-block;
	padding: 11px 22px;
	border: 1.5px solid var(--umc-accent);
	border-radius: var(--umc-radius);
	color: var(--umc-accent);
	font-weight: 600;
	text-decoration: none;
	transition: background .15s, color .15s;
}
.umc-thanks .umc-manage__link:hover {
	background: var(--umc-accent);
	color: #fff;
}

.umc-thanks__home {
	margin: 0;
}
.umc-thanks__home a {
	font-size: .9em;
	color: var(--umc-muted);
	text-decoration: none;
}
.umc-thanks__home a:hover {
	color: var(--umc-accent);
	text-decoration: underline;
}

@media (max-width: 400px) {
	.umc-thanks { margin: 20px auto; padding: 28px 20px; }
}

/* Wraps [umc_donate] so the header link ([umc_donate_header]) has a stable #umc-donate to jump to. */
.umc-donate-wrap {
	scroll-margin-top: 110px;
}

/* Header CTA toggle: the Blocksy header HTML block is static (no PHP/shortcodes), so both pieces are always
   in the markup and CSS shows only one, driven by the .umc-donate-visible body class (see UMC_Don_Shortcodes::body_class). */
.umc-header-donate { display: none; }
.umc-header-altpay { display: flex; }
body.umc-donate-visible .umc-header-donate { display: inline-flex; }
body.umc-donate-visible .umc-header-altpay { display: none; }

.umc-header-donate {
	align-items: center;
	gap: 6px;
	padding: 10px 22px;
	background: #0057b7;
	color: #fff;
	font-weight: 700;
	font-size: .95em;
	line-height: 1.2;
	text-decoration: none;
	border-radius: 999px;
	white-space: nowrap;
	transition: background .15s;
}
.umc-header-donate:hover,
.umc-header-donate:focus-visible {
	background: #004692;
	color: #fff;
}
.umc-header-donate::after {
	content: "→";
}

/* Alternative-payment fallback — shown in the header when the Stripe form isn't visible, and above the form otherwise. */
.umc-altpay {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	max-width: 280px;
	margin: 0 auto;
}
.umc-donate-wrap {
	max-width: 440px;
	margin-left: auto;
	margin-right: auto;
}
.umc-donate-wrap .umc-altpay {
	margin: 0 0 20px;
	padding-bottom: 20px;
	border-bottom: 1px dashed var(--umc-border, #d0d7e2);
	max-width: none;
}
.umc-donate-wrap .umc-donate { max-width: none; }
.umc-altpay__label {
	margin: 0;
	font-size: .85em;
	font-weight: 600;
	color: var(--umc-muted, #5b6575);
}
.umc-altpay__submit {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	box-sizing: border-box;
	width: 100%;
	padding: 11px;
	border: 1.5px solid #ffd140;
	border-radius: 10px;
	background: #ffd140;
	color: #1a1a1a;
	font-weight: 700;
	font-size: .95em;
	font-family: inherit;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: filter .15s;
}
.umc-altpay__submit::before {
	content: "";
	flex: none;
	width: 18px;
	height: 18px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1a1a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='5' width='20' height='14' rx='2'/%3E%3Cpath d='M2 10h20'/%3E%3C/svg%3E") center / contain no-repeat;
}
.umc-altpay__submit:hover { filter: brightness(.95); }
.umc-altpay__note {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	margin: 0;
	font-size: .78em;
	color: var(--umc-muted, #5b6575);
}
.umc-altpay__cards { height: 20px !important; width: auto !important; }
.umc-altpay__logo { height: 12px !important; width: auto !important; vertical-align: middle; }
