.whbdp-payment-wrap {
	--whbdp-background: #fff;
	--whbdp-text: #20242e;
	--whbdp-accent: #454dcb;
	--whbdp-button-text: #fff;
	--whbdp-progress: #28a310;
	--whbdp-width: 560px;
	--whbdp-padding: 32px;
	--whbdp-radius: 8px;
	--whbdp-border: color-mix(in srgb, var(--whbdp-text) 33%, var(--whbdp-background));
	--whbdp-muted: color-mix(in srgb, var(--whbdp-text) 5%, var(--whbdp-background));
	color: var(--whbdp-text);
	font: 400 15px/1.55 Inter, system-ui, sans-serif;
	margin: 2rem auto;
	max-width: var(--whbdp-width);
	width: 100%;
}

.whbdp-payment-wrap [hidden] {
	display: none !important;
}

.whbdp-payment-form,
.whbdp-checkout {
	background: var(--whbdp-background);
	border: 1px solid color-mix(in srgb, var(--whbdp-text) 10%, var(--whbdp-background));
	border-radius: var(--whbdp-radius);
	box-sizing: border-box;
	margin: 0;
	min-width: 0;
	overflow: hidden;
}

.whbdp-form-content,
.whbdp-checkout {
	padding: min(var(--whbdp-padding), 6vw);
}

.whbdp-step-header {
	align-items: center;
	background: var(--whbdp-muted);
	display: grid;
	grid-template-columns: 38px minmax(0, 1fr) 38px;
	min-height: 52px;
	padding: 0 8px;
	text-align: center;
}

.whbdp-payment-form h2,
.whbdp-checkout h2,
.whbdp-status h2 {
	color: inherit;
	font: 700 1.35rem/1.3 Inter, system-ui, sans-serif;
	margin: 0 0 0.75rem;
}

.whbdp-payment-form .whbdp-step-heading {
	font-size: 15px;
	grid-column: 2;
	grid-row: 1;
	margin: 0;
	padding: 8px 4px;
}

.whbdp-payment-form .whbdp-back {
	background: transparent;
	border: 0;
	border-radius: 4px;
	color: var(--whbdp-text);
	cursor: pointer;
	font: 400 23px/1 Inter, system-ui, sans-serif;
	grid-column: 1;
	grid-row: 1;
	height: 36px;
	padding: 0;
	width: 36px;
}

.whbdp-step-progress {
	appearance: none;
	background: #e1e4e9;
	border: 0;
	color: var(--whbdp-progress);
	display: block;
	height: 6px;
	width: 100%;
}

.whbdp-step-progress::-webkit-progress-bar { background: #e1e4e9; }
.whbdp-step-progress::-webkit-progress-value { background: var(--whbdp-progress); }
.whbdp-step-progress::-moz-progress-bar { background: var(--whbdp-progress); }

.whbdp-payment-form .whbdp-form-header-image {
	display: block;
	height: auto;
	margin-bottom: 1rem;
	max-width: 100%;
}

.whbdp-payment-form p {
	margin: 0 0 1rem;
}

.whbdp-goal {
	background: var(--whbdp-muted);
	border-radius: calc(var(--whbdp-radius) / 2);
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 1rem;
	justify-content: space-between;
	margin-bottom: 1rem;
	padding: 0.75rem 1rem;
}

.whbdp-grid,
.whbdp-field {
	display: grid;
	gap: 1rem;
	min-width: 0;
}

.whbdp-field { gap: 0.45rem; }
.whbdp-field label { color: inherit; font: 600 14px/1.4 Inter, system-ui, sans-serif; }
.whbdp-field label b { color: #b42318; }

.whbdp-currency-field {
	align-items: center;
	grid-template-columns: 1fr minmax(80px, auto);
}

.whbdp-currency-field small {
	grid-column: 1 / -1;
}

.whbdp-presets {
	display: grid;
	gap: 8px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin-bottom: 0.4rem;
}

.whbdp-payment-form :is(.whbdp-preset, .whbdp-submit) {
	box-sizing: border-box;
	cursor: pointer;
	font: 650 15px/1.3 Inter, system-ui, sans-serif;
}

.whbdp-payment-form .whbdp-preset {
	background: var(--whbdp-background);
	border: 1px solid var(--whbdp-border);
	border-radius: var(--whbdp-radius);
	color: var(--whbdp-text);
	min-height: 54px;
	overflow-wrap: anywhere;
	padding: 8px;
}

.whbdp-payment-form .whbdp-preset:hover { border-color: var(--whbdp-accent); }
.whbdp-payment-form .whbdp-preset[aria-pressed="true"] {
	background: var(--whbdp-accent);
	border-color: var(--whbdp-accent);
	color: var(--whbdp-button-text);
}

.whbdp-payment-form :is(input:not([type="radio"]):not([type="hidden"]), select, textarea) {
	background-color: var(--whbdp-background);
	border: 1px solid var(--whbdp-border);
	border-radius: 4px;
	box-sizing: border-box;
	color: var(--whbdp-text);
	font: inherit;
	margin: 0;
	max-width: none;
	min-height: 48px;
	padding: 8px 12px;
	width: 100%;
}

.whbdp-payment-form textarea { resize: vertical; }

.whbdp-payment-form :is(button, input, select, textarea, summary):focus-visible {
	outline: 2px solid var(--whbdp-accent);
	outline-offset: 2px;
}

.whbdp-payment-form [aria-invalid="true"] {
	border-color: #b42318;
}

.whbdp-donor-extras {
	margin-top: 1rem;
}
.whbdp-donor-extras summary { cursor: pointer; font-size: 14px; }
.whbdp-donor-extras .whbdp-grid { margin-top: 0.85rem; }

.whbdp-donation-summary {
	background: var(--whbdp-muted);
	margin-bottom: 1.25rem;
	padding: min(24px, 5vw);
}
.whbdp-donation-summary h3 {
	color: inherit;
	font: 700 17px/1.4 Inter, system-ui, sans-serif;
	margin: 0 0 0.65rem;
}
.whbdp-donation-summary dl, .whbdp-donation-summary dd { margin: 0; }
.whbdp-donation-summary dl > div {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1rem;
	justify-content: space-between;
	padding: 0.65rem 0;
}
.whbdp-donation-summary dl > div:last-child {
	border-top: 1px solid var(--whbdp-border);
	font-weight: 700;
}

.whbdp-gateways {
	border: 0;
	display: grid;
	gap: 8px;
	margin: 0;
	min-width: 0;
	padding: 0;
}
.whbdp-gateways legend { font-weight: 650; margin-bottom: 8px; padding: 0; }

.whbdp-payment-form .whbdp-gateway {
	align-items: center;
	border: 1px solid var(--whbdp-border);
	border-radius: 4px;
	cursor: pointer;
	display: flex;
	gap: 10px;
	margin: 0;
	min-height: 54px;
	padding: 10px 14px;
}
.whbdp-gateway:has(input:checked) { border-color: var(--whbdp-accent); }
.whbdp-payment-form .whbdp-gateway input[type="radio"] {
	accent-color: var(--whbdp-accent);
	appearance: auto;
	flex: 0 0 auto;
	height: 1rem;
	margin: 0;
	width: 1rem;
}
.whbdp-payment-form .whbdp-gateway input[type="radio"]::before { content: none; }

.whbdp-payment-form .whbdp-gateway-help {
	background: var(--whbdp-muted);
	border-radius: 4px;
	font-size: 14px;
	margin: 0;
	padding: 10px 14px;
}

.whbdp-payment-form .whbdp-submit {
	align-items: center;
	background: var(--whbdp-accent);
	border: 0;
	border-radius: calc(var(--whbdp-radius) / 2);
	color: var(--whbdp-button-text);
	display: inline-flex;
	gap: 0.65rem;
	justify-content: center;
	margin-top: 1.5rem;
	min-height: 50px;
	padding: 0.75rem 1rem;
	width: 100%;
}
.whbdp-payment-form .whbdp-submit:hover { filter: brightness(0.93); }
.whbdp-payment-form .whbdp-submit:disabled { cursor: wait; opacity: 0.72; }

.whbdp-payment-form .whbdp-secure {
	align-items: center;
	display: flex;
	font-size: 12px;
	gap: 7px;
	justify-content: center;
	margin: 1.25rem 0 0;
}
.whbdp-secure::before {
	background: var(--whbdp-progress);
	border-radius: 2px;
	content: '';
	height: 7px;
	width: 9px;
	box-shadow: 0 -3px 0 -1px var(--whbdp-progress);
}

.whbdp-spinner {
	border: 2px solid currentColor;
	border-bottom-color: transparent;
	border-radius: 50%;
	display: none;
	height: 16px;
	width: 16px;
}
.whbdp-submit.is-loading .whbdp-spinner {
	animation: whbdp-spin 750ms linear infinite;
	display: inline-block;
}
@keyframes whbdp-spin { to { transform: rotate(360deg); } }

.whbdp-message {
	border-radius: 4px;
	display: none;
	margin: 1rem 0 0;
	padding: 0.75rem;
}
.whbdp-message.is-error {
	background: #fff1f1;
	border: 1px solid #f3b4b4;
	color: #8a1f1f;
	display: block;
}
.whbdp-message.is-info {
	background: #eef3fc;
	color: #1f3457;
	display: block;
}

.whbdp-checkout .whbdp-cancel-payment { margin: 0 0 1rem; }
.whbdp-status {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	margin: 2rem auto;
	max-width: 680px;
	padding: clamp(1.25rem, 3vw, 2rem);
}
.whbdp-status-success h2::before { color: #28a310; content: "\2713 "; }
.whbdp-status code { overflow-wrap: anywhere; }

@media (max-width: 380px) {
	.whbdp-presets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
	.whbdp-submit.is-loading .whbdp-spinner { animation: none; }
}
