/* =========================================================
   Custom Donation Form — Frontend Styles
   Color scheme: #C89837 (gold)
   Headings: 'Prata', serif  |  Body: 'Open Sans', sans-serif
   ========================================================= */

:root {
	--cdf-gold: #C89837;
	--cdf-gold-dark: #a97d28;
	--cdf-gold-light: #f6ecd6;
	--cdf-gold-lighter: #fbf6ea;
	--cdf-ink: #2b2620;
	--cdf-muted: #766f63;
	--cdf-border: #e7ddc7;
	--cdf-success: #2e8b57;
	--cdf-error: #c0392b;
	--cdf-radius: 14px;
	--cdf-shadow: 0 20px 45px -15px rgba(200, 152, 55, 0.35);
}

.cdf-donation-wrap * {
	box-sizing: border-box;
}

.cdf-donation-wrap {
	font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
	color: var(--cdf-ink);
	max-width: 520px;
	margin: 32px auto;
}

.cdf-card {
	background: #fff;
	border-radius: var(--cdf-radius);
	box-shadow: var(--cdf-shadow);
	border: 1px solid var(--cdf-border);
	overflow: hidden;
	position: relative;
}

.cdf-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 6px;
	background: linear-gradient(90deg, var(--cdf-gold-dark), var(--cdf-gold) 50%, #e9c976);
}

.cdf-card-header {
	padding: 34px 34px 10px;
	text-align: center;
	background: linear-gradient(180deg, var(--cdf-gold-lighter) 0%, #ffffff 100%);
}

.cdf-title {
	font-family: 'Prata', Georgia, serif;
	font-weight: 400;
	font-size: 28px;
	line-height: 1.25;
	margin: 0 0 10px;
	color: var(--cdf-ink);
}

.cdf-description {
	font-size: 14.5px;
	line-height: 1.6;
	color: var(--cdf-muted);
	margin: 0 0 6px;
}

.cdf-form {
	padding: 8px 34px 34px;
}

/* ---------------- Step indicator / steps ---------------- */

.cdf-step {
	display: none;
	animation: cdf-fade-in 0.35s ease;
}

.cdf-step.cdf-step-active {
	display: block;
}

@keyframes cdf-fade-in {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: translateY(0); }
}

.cdf-progress {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 18px 0 26px;
}

.cdf-progress-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--cdf-border);
	transition: all 0.25s ease;
}

.cdf-progress-dot.is-active {
	background: var(--cdf-gold);
	transform: scale(1.3);
}

.cdf-progress-dot.is-done {
	background: var(--cdf-gold-dark);
}

.cdf-label {
	display: block;
	font-weight: 600;
	font-size: 13.5px;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--cdf-ink);
	margin: 18px 0 10px;
}

.cdf-step[data-step="amount"] .cdf-label {
	margin-top: 0;
}

/* ---------------- Amount grid ---------------- */

.cdf-amount-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
}

.cdf-amount-pill {
	border: 1.5px solid var(--cdf-border);
	background: #fff;
	border-radius: 10px;
	padding: 14px 8px;
	font-family: 'Open Sans', sans-serif;
	font-weight: 600;
	font-size: 15px;
	color: var(--cdf-ink);
	cursor: pointer;
	transition: all 0.18s ease;
	-webkit-appearance: none;
	appearance: none;
	position: relative;
}

.cdf-amount-pill:hover {
	border-color: var(--cdf-gold);
	background: var(--cdf-gold-lighter);
}

.cdf-amount-pill.is-active,
.cdf-amount-pill.is-active:hover,
.cdf-amount-pill.is-active:focus {
	background: var(--cdf-gold) !important;
	border-color: var(--cdf-gold-dark) !important;
	color: #fff !important;
	box-shadow: 0 6px 14px -4px rgba(200, 152, 55, 0.55);
	transform: translateY(-1px);
	padding-right: 26px;
}

.cdf-amount-pill.is-active::after {
	content: "\2713";
	position: absolute;
	top: 5px;
	right: 7px;
	font-size: 11px;
	line-height: 1;
	color: #fff;
}

.cdf-amount-custom-toggle {
	grid-column: span 1;
	border-style: dashed;
	color: var(--cdf-muted);
}

.cdf-custom-amount-row {
	display: flex;
	align-items: center;
	margin-top: 14px;
	border: 1.5px solid var(--cdf-border);
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
}

.cdf-custom-amount-row.is-visible {
	display: flex !important;
}

.cdf-currency-symbol {
	padding: 0 14px;
	font-weight: 700;
	color: var(--cdf-gold-dark);
	background: var(--cdf-gold-lighter);
	align-self: stretch;
	display: flex;
	align-items: center;
	border-right: 1.5px solid var(--cdf-border);
}

.cdf-custom-amount-input {
	border: 0;
	padding: 13px 12px;
	font-size: 15px;
	font-family: 'Open Sans', sans-serif;
	flex: 1;
	outline: none;
	background: transparent;
}

/* ---------------- Inputs ---------------- */

.cdf-input,
textarea.cdf-input {
	width: 100%;
	padding: 12px 14px;
	border: 1.5px solid var(--cdf-border);
	border-radius: 10px;
	font-family: 'Open Sans', sans-serif;
	font-size: 15px;
	color: var(--cdf-ink);
	background: #fff;
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
	margin-bottom: 4px;
}

.cdf-input:focus {
	outline: none;
	border-color: var(--cdf-gold);
	box-shadow: 0 0 0 3px rgba(200, 152, 55, 0.18);
}

textarea.cdf-input {
	resize: vertical;
	min-height: 80px;
}

.cdf-field-error {
	color: var(--cdf-error);
	font-size: 12.5px;
	margin: 2px 0 8px;
	display: none;
}

/* ---------------- Navigation buttons ---------------- */

.cdf-step-nav {
	display: flex;
	gap: 10px;
	margin-top: 24px;
}

.cdf-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 13px 22px;
	border-radius: 10px;
	font-family: 'Open Sans', sans-serif;
	font-weight: 700;
	font-size: 15px;
	cursor: pointer;
	border: 1.5px solid transparent;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
	text-decoration: none;
}

.cdf-btn:active {
	transform: translateY(1px);
}

.cdf-btn-primary {
	background: linear-gradient(180deg, #d7ab54, var(--cdf-gold));
	color: #fff;
	flex: 1;
	box-shadow: 0 10px 20px -8px rgba(200, 152, 55, 0.6);
}

.cdf-btn-primary:hover {
	box-shadow: 0 12px 24px -6px rgba(200, 152, 55, 0.7);
}

.cdf-btn-secondary {
	background: #fff;
	color: var(--cdf-muted);
	border-color: var(--cdf-border);
}

.cdf-btn-secondary:hover {
	border-color: var(--cdf-gold);
	color: var(--cdf-gold-dark);
}

.cdf-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

/* ---------------- Pay step ---------------- */

.cdf-pay-summary {
	background: var(--cdf-gold-lighter);
	border: 1px solid var(--cdf-border);
	border-radius: 10px;
	padding: 14px 16px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 18px;
}

.cdf-pay-summary-label {
	font-size: 13px;
	color: var(--cdf-muted);
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.cdf-pay-summary-amount {
	font-family: 'Prata', Georgia, serif;
	font-size: 22px;
	color: var(--cdf-gold-dark);
}

.cdf-error-box {
	background: #fdecea;
	border: 1px solid #f3c3bd;
	color: var(--cdf-error);
	padding: 12px 14px;
	border-radius: 8px;
	font-size: 13.5px;
	margin-bottom: 16px;
}

.cdf-paypal-button-container {
	min-height: 45px;
	margin-bottom: 12px;
}

.cdf-paypal-loading {
	text-align: center;
	color: var(--cdf-muted);
	font-size: 13.5px;
	padding: 10px 0;
}

.cdf-secure-note {
	text-align: center;
	font-size: 12.5px;
	color: var(--cdf-muted);
	margin-top: 14px;
}

.cdf-processing-overlay {
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, 0.85);
	display: none;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 12px;
	border-radius: var(--cdf-radius);
	z-index: 5;
}

.cdf-processing-overlay.is-visible {
	display: flex;
}

.cdf-spinner {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 3px solid var(--cdf-gold-light);
	border-top-color: var(--cdf-gold);
	animation: cdf-spin 0.8s linear infinite;
}

@keyframes cdf-spin {
	to { transform: rotate(360deg); }
}

.cdf-processing-text {
	font-size: 13.5px;
	color: var(--cdf-muted);
}

/* ---------------- Success state ---------------- */

.cdf-success-box {
	text-align: center;
	padding: 30px 10px 10px;
}

.cdf-success-icon {
	width: 62px;
	height: 62px;
	line-height: 62px;
	border-radius: 50%;
	background: var(--cdf-gold-lighter);
	border: 2px solid var(--cdf-gold);
	color: var(--cdf-gold-dark);
	font-size: 28px;
	margin: 0 auto 18px;
}

.cdf-success-message {
	font-size: 15.5px;
	line-height: 1.7;
	color: var(--cdf-ink);
	max-width: 380px;
	margin: 0 auto;
}

.cdf-success-tx {
	margin-top: 14px;
	font-size: 12px;
	color: var(--cdf-muted);
	letter-spacing: 0.02em;
}

/* ---------------- Responsive ---------------- */

@media (max-width: 480px) {
	.cdf-card-header,
	.cdf-form {
		padding-left: 20px;
		padding-right: 20px;
	}

	.cdf-title {
		font-size: 23px;
	}

	.cdf-amount-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}