/**
 * Donations form styles.
 *
 * Brand palette (consistent with MDN-27 RB transactions):
 *   --donate-primary:    #0390BF  (primary action, active-state borders)
 *   --donate-primary-dk: #027599  (primary hover)
 *   --donate-accent:     #f7bf0f  (secondary accent, kept for future use)
 *   --donate-bg-soft:    #f0f8fb  (active-state backgrounds)
 *   --donate-border:     #e5e7eb  (neutral borders)
 *
 * Kept in its own file for easy rollback; loaded conditionally by
 * the [donate_form] shortcode.
 */

.donate-form-wrap {
	max-width: 720px;
	margin: 0 auto;
	font-size: 1.0625rem; /* ~17px */
	color: #1f2937;
}

.donate-form fieldset,
.donate-form .donate-field {
	border: 0;
	padding: 0;
	margin: 0 0 1.75rem;
}

.donate-form legend,
.donate-form > .donate-field > label {
	display: block;
	font-weight: 600;
	font-size: 1.125rem; /* ~18px */
	margin-bottom: 0.6rem;
	color: #111827;
}

.donate-form input[type="email"],
.donate-form input[type="text"],
.donate-form input[type="number"] {
	width: 100%;
	padding: 0.75rem 0.9rem;
	font-size: 1.0625rem;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	box-sizing: border-box;
	background: #fff;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.donate-form input:focus {
	outline: none;
	border-color: #0390BF;
	box-shadow: 0 0 0 3px rgba(3, 144, 191, 0.18);
}

/* Categories: radio cards */
.donate-categories {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 0.6rem;
}

.donate-category {
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	min-height: 76px;
	padding: 0.85rem;
	border: 2px solid #e5e7eb;
	border-radius: 10px;
	cursor: pointer;
	background: #fff;
	transition: border-color 0.15s, background 0.15s, transform 0.05s;
	font-weight: 500;
}

.donate-category:hover {
	border-color: #0390BF;
}

.donate-category:active {
	transform: translateY(1px);
}

.donate-category input[type="radio"] {
	position: absolute;
	left: -9999px;
}

.donate-category.is-checked {
	border-color: #0390BF;
	background: #f0f8fb;
}

.donate-category-title {
	font-weight: 600;
	font-size: 1rem;
	line-height: 1.3;
}

/* Amount presets */
.donate-presets {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin-bottom: 0.9rem;
}

.donate-preset {
	flex: 1 1 120px;
	padding: 0.75rem 0.9rem;
	font-size: 1.0625rem;
	font-weight: 600;
	border: 2px solid #e5e7eb;
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
	color: #1f2937;
}

.donate-preset:hover {
	border-color: #0390BF;
}

.donate-preset.is-active {
	border-color: #0390BF;
	background: #f0f8fb;
}

.donate-amount-custom span {
	display: block;
	font-weight: 500;
	margin-bottom: 0.4rem;
	color: #4b5563;
	font-size: 0.95rem;
}

/* Honeypot: off-screen but not display:none, so bots that respect
   display:none still fill it. */
.donate-hp {
	position: absolute;
	left: -9999px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Actions */
.donate-actions {
	text-align: center;
	margin-top: 1.25rem;
}

.donate-submit {
	min-width: 220px;
	padding: 0.9rem 2rem;
	font-size: 1.125rem;
	font-weight: 700;
	color: #fff;
	background: #0390BF;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.15s;
}

.donate-submit:hover {
	background: #027599;
}

.donate-submit:disabled {
	background: #9ca3af;
	cursor: not-allowed;
}

.donate-error {
	margin-top: 1rem;
	padding: 0.85rem 1rem;
	background: #fef2f2;
	border: 1px solid #fca5a5;
	border-radius: 8px;
	color: #991b1b;
	font-size: 1rem;
}

/* Result */
.donate-result {
	text-align: center;
	padding: 1.75rem 1.25rem;
	border: 2px solid #0390BF;
	border-radius: 12px;
	background: #fafdff;
}

.donate-result-header {
	margin: 0 0 1.25rem;
	font-size: 1.25rem;
	font-weight: 600;
	color: #111827;
}

.donate-result-qr {
	display: block;
	margin: 0 auto 1.25rem;
	max-width: 300px;
	width: 100%;
	height: auto;
	background: #fff;
	padding: 0.5rem;
	border-radius: 8px;
	border: 1px solid #e5e7eb;
}

.donate-result-details {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.5rem 1rem;
	max-width: 420px;
	margin: 0 auto 1.5rem;
	text-align: left;
	font-size: 1rem;
}

.donate-result-details dt {
	font-weight: 600;
	color: #4b5563;
}

.donate-result-details dd {
	margin: 0;
	font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
	color: #111827;
	word-break: break-word;
}

.donate-reset {
	margin-top: 0.5rem;
	padding: 0.6rem 1.25rem;
	font-size: 1rem;
	font-weight: 600;
	color: #0390BF;
	background: #fff;
	border: 2px solid #0390BF;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
}

.donate-reset:hover {
	background: #0390BF;
	color: #fff;
}

@media (max-width: 480px) {
	.donate-form-wrap {
		font-size: 1rem;
	}
	.donate-categories {
		grid-template-columns: 1fr;
	}
	.donate-preset {
		flex: 1 1 45%;
		font-size: 1rem;
	}
	.donate-submit {
		width: 100%;
		min-width: 0;
	}
}
