/* Stripe donation form. Colours (--akd-*) are injected from the theme's donate options. */

.akd-donate {
	--akd-muted: #6b5a5d;
	--akd-border: rgba(0, 0, 0, 0.08);
	max-width: 640px;
	margin: 0 auto 30px;
	overflow: hidden;
	background: var(--akd-bg, #ede1e2);
	border-radius: 3px;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05), 0 2px 6px rgba(0, 0, 0, 0.06);
	color: #3e474c;
	box-sizing: border-box;
}

/* Card header: the association image + intro, on the image's own background colour so it blends in */
.akd-donate .akd-donate-header {
	padding: 24px 28px 20px;
	background: #f5f4fa;
	border-bottom: 3px solid var(--akd-accent, #8b2d3b);
	text-align: center;
}

.akd-donate .akd-header-image {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 0 auto;
}

body .akd-donate .akd-intro p {
	margin: 14px 0 0;
	font-size: 15px !important;
	line-height: 1.6;
	color: #3e474c;
}

.akd-donate .akd-donate-body {
	padding: 26px 28px 22px;
}

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

/* Fieldsets & legends (reset Bootstrap / browser defaults) */
.akd-donate .akd-fieldset {
	min-width: 0;
	margin: 0 0 22px;
	padding: 0;
	border: 0;
}

.akd-donate .akd-legend {
	display: block;
	width: 100%;
	margin: 0 0 10px;
	padding: 0;
	border: 0;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--akd-title, #a82512);
}

/* Option pills */
.akd-donate .akd-options {
	position: relative;
	display: grid;
	gap: 8px;
}

.akd-donate .akd-options--frequency {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.akd-donate .akd-options--amount {
	grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
}

.akd-donate .akd-radio {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
	pointer-events: none;
}

.akd-donate .akd-options .akd-radio + label {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	margin: 0 !important;
	padding: 8px 6px;
	background: #fff;
	border-radius: 3px;
	box-shadow: 0 0 0 1px var(--akd-border), 0 0 1px var(--akd-title, #a82512);
	color: #3e474c;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	white-space: nowrap;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
}

.akd-donate .akd-options .akd-radio + label::before,
.akd-donate .akd-options .akd-radio + label::after {
	content: none !important;
	display: none !important;
}

.akd-donate .akd-options .akd-radio + label:hover {
	background: #faf5f6;
}

.akd-donate .akd-options .akd-radio:checked + label {
	background: var(--akd-accent, #8b2d3b);
	box-shadow: none;
	color: #fff;
}

.akd-donate .akd-options .akd-radio:focus-visible + label {
	outline: 2px solid var(--akd-accent, #8b2d3b);
	outline-offset: 2px;
}

/* Recurring hint and custom amount: shown only when the matching radio is checked (works without JS). */
body .akd-donate p.akd-hint {
	display: none;
	grid-column: 1 / -1;
	margin: 2px 0 0;
	font-size: 13px !important;
	line-height: 1.5;
	color: var(--akd-muted);
}

.akd-donate .akd-radio--recurring:checked ~ p.akd-hint {
	display: block;
}

.akd-donate .akd-custom {
	display: none;
	grid-column: 1 / -1;
	margin-top: 2px;
}

.akd-donate .akd-radio--custom:checked ~ .akd-custom {
	display: block;
}

.akd-donate .akd-custom-label {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.akd-donate .akd-custom-field {
	position: relative;
	display: block;
}

.akd-donate .akd-currency {
	position: absolute;
	top: 50%;
	left: 14px;
	transform: translateY(-50%);
	font-size: 18px;
	font-weight: 600;
	color: #3e474c;
	pointer-events: none;
}

body .akd-donate input[type="text"].akd-custom-input {
	width: 100%;
	height: 50px;
	margin: 0;
	padding: 10px 14px 10px 34px;
	background: #fff !important;
	border: 1px solid var(--akd-accent, #8b2d3b);
	border-radius: 3px;
	box-shadow: none;
	color: #3e474c !important;
	font-size: 18px !important;
	font-weight: 600;
}

body .akd-donate input[type="text"].akd-custom-input:focus {
	outline: 2px solid var(--akd-accent, #8b2d3b);
	outline-offset: 1px;
}

/* Submit */
body .akd-donate .akd-submit {
	display: block;
	width: 100%;
	min-height: 52px;
	margin: 4px 0 0;
	padding: 12px 20px;
	background: var(--akd-button, #a82512) !important;
	border: 0;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	border-bottom: 1px solid rgba(0, 0, 0, 0.2);
	border-radius: 3px;
	color: var(--akd-button-text, #fff) !important;
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 0.01em;
	text-transform: none;
	cursor: pointer;
	transition: background 0.3s;
}

body .akd-donate .akd-submit:hover,
body .akd-donate .akd-submit:focus-visible {
	background: var(--akd-button-hover, #d3311a) !important;
}

body .akd-donate .akd-submit:disabled {
	opacity: 0.75;
	cursor: progress;
}

body .akd-donate .akd-submit::before,
body .akd-donate .akd-submit::after {
	content: none !important;
	display: none !important;
}

body .akd-donate p.akd-secure,
body .akd-donate p.akd-portal {
	margin: 12px 0 0;
	font-size: 13px !important;
	line-height: 1.5;
	text-align: center;
	color: var(--akd-muted);
}

body .akd-donate p.akd-portal {
	margin-top: 6px;
}

body .akd-donate p.akd-portal a {
	color: var(--akd-accent, #8b2d3b);
	text-decoration: underline;
}

/* Notices */
body .akd-donate p.akd-notice,
body .akd-donate p.akd-form-error {
	margin: 0 0 18px;
	padding: 12px 14px;
	background: #fff;
	border-left: 4px solid var(--akd-accent, #8b2d3b);
	border-radius: 3px;
	font-size: 14px !important;
	line-height: 1.5;
	color: #3e474c;
}

body .akd-donate p.akd-notice--error,
body .akd-donate p.akd-form-error {
	background: #fdf1f0;
	border-left-color: #c0392b;
}

body .akd-donate p.akd-notice--test {
	background: #fff8e1;
	border-left-color: #d4a106;
}

.akd-donate [hidden] {
	display: none !important;
}

/* Honeypot */
.akd-donate .akd-hp {
	position: absolute !important;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Thank-you panel */
.akd-donate .akd-thanks {
	text-align: center;
}

body .akd-donate .akd-thanks-title {
	margin: 0 0 14px;
	font-size: 24px !important;
	line-height: 1.3;
	color: var(--akd-title, #a82512) !important;
}

body .akd-donate .akd-thanks p {
	margin: 0 0 8px;
}

body .akd-donate .akd-thanks-links {
	margin-top: 18px !important;
}

body .akd-donate .akd-thanks a {
	color: var(--akd-accent, #8b2d3b);
}

body .akd-donate .akd-thanks-links a {
	color: var(--akd-accent, #8b2d3b);
	font-weight: 600;
}

@media (max-width: 480px) {
	.akd-donate .akd-donate-header {
		padding: 16px 16px 14px;
	}

	.akd-donate .akd-donate-body {
		padding: 20px 16px 16px;
	}

	.akd-donate .akd-options--frequency .akd-radio + label {
		font-size: 14px;
	}
}
