/**
 * Donate modal — sitewide (functions.php prints the markup in every
 * page's footer, assets/js/donate-modal.js intercepts every "Donate"
 * link). Placeholder flow: no payment gateway is wired in yet, so
 * this captures intent (amount, frequency, preferred method, contact)
 * and emails it to KCYPS instead of processing anything.
 */
body.donate-modal-open {
	overflow: hidden;
}
.donate-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(20, 20, 20, 0.6);
}
.donate-modal[hidden] {
	display: none;
}
.donate-modal__panel {
	position: relative;
	width: 100%;
	max-width: 480px;
	max-height: 90vh;
	overflow-y: auto;
	padding: clamp(28px, 4vw, 40px);
	border-radius: 24px;
	background: var(--wp--preset--color--base);
	box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}
.donate-modal__close {
	position: absolute;
	top: 16px;
	right: 16px;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--contrast);
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s ease;
}
.donate-modal__close:hover {
	background: var(--wp--preset--color--border);
}

/* Step dots */
.donate-modal__steps {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin: 0 0 28px;
}
.donate-modal__step-dot {
	display: grid;
	place-items: center;
	width: 26px;
	height: 26px;
	flex: none;
	border-radius: 50%;
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--muted);
	font-size: 0.75rem;
	font-weight: 800;
	transition: background 0.2s ease, color 0.2s ease;
}
.donate-modal__step-dot.is-current {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}
.donate-modal__step-dot.is-done {
	background: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--contrast);
}
.donate-modal__step-line {
	width: 20px;
	height: 2px;
	background: var(--wp--preset--color--border);
}

/* Step content */
.donate-modal__step h2 {
	margin: 0 0 8px;
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.4rem;
	font-weight: 800;
	letter-spacing: -0.02em;
}
.donate-modal__hint {
	margin: 0 0 20px;
	color: var(--wp--preset--color--muted);
	font-size: 0.9rem;
	line-height: 1.55;
}
.donate-modal__error {
	margin: 12px 0 0;
	color: #c0392b;
	font-size: 0.85rem;
	font-weight: 700;
}

/* Step 1 — frequency + amounts */
.donate-modal__frequency {
	display: flex;
	gap: 8px;
	margin-bottom: 20px;
}
.donate-modal__pill {
	flex: 1;
	padding: 10px 14px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 999px;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	font-size: 0.88rem;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.donate-modal__pill.is-selected {
	background: var(--wp--preset--color--secondary);
	border-color: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--contrast);
}
.donate-modal__amounts {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
	margin-bottom: 18px;
}
.donate-modal__amount {
	padding: 14px 8px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 12px;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	font-size: 0.9rem;
	font-weight: 800;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.donate-modal__amount.is-selected {
	background: rgba(49, 161, 255, 0.1);
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
}
.donate-modal__custom-label {
	display: block;
	margin-bottom: 6px;
	color: var(--wp--preset--color--muted);
	font-size: 0.82rem;
	font-weight: 700;
}
.donate-modal__custom-input {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 10px;
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.95rem;
}
.donate-modal__custom-input:focus {
	outline: none;
	border-color: var(--wp--preset--color--primary);
}

/* Step 2 — payment methods */
.donate-modal__methods {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}
.donate-modal__method {
	display: block;
	position: relative;
}
.donate-modal__method input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}
.donate-modal__method-label {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px 10px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 12px;
	color: var(--wp--preset--color--contrast);
	font-size: 0.88rem;
	font-weight: 700;
	text-align: center;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.donate-modal__method input:checked + .donate-modal__method-label {
	background: rgba(253, 169, 3, 0.12);
	border-color: var(--wp--preset--color--secondary);
	color: #a6690a;
}
.donate-modal__method input:focus-visible + .donate-modal__method-label {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

/* Step 3 — contact details */
.donate-modal__step[data-step="3"] input {
	display: block;
	width: 100%;
	margin-bottom: 12px;
	padding: 12px 14px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 10px;
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.95rem;
}
.donate-modal__step[data-step="3"] input:focus {
	outline: none;
	border-color: var(--wp--preset--color--primary);
}

/* Step 4 — review */
.donate-modal__summary {
	margin: 0 0 16px;
	padding: 16px;
	border-radius: 14px;
	background: var(--wp--preset--color--paper);
}
.donate-modal__summary div {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 6px 0;
	font-size: 0.9rem;
}
.donate-modal__summary div + div {
	border-top: 1px solid var(--wp--preset--color--border);
}
.donate-modal__summary dt {
	color: var(--wp--preset--color--muted);
	font-weight: 700;
}
.donate-modal__summary dd {
	margin: 0;
	color: var(--wp--preset--color--contrast);
	font-weight: 800;
	text-align: right;
}
.donate-modal__note {
	margin: 0;
	padding: 12px 14px;
	border-radius: 10px;
	background: rgba(253, 169, 3, 0.1);
	color: #a6690a;
	font-size: 0.85rem;
	line-height: 1.55;
}

/* Success step */
.donate-modal__step--success {
	text-align: center;
}
.donate-modal__success-icon {
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	margin: 0 auto 16px;
	border-radius: 50%;
	background: rgba(253, 169, 3, 0.15);
	color: #a6690a;
}
.donate-modal__success-text {
	margin: 0;
	color: var(--wp--preset--color--muted);
	font-size: 0.92rem;
	line-height: 1.6;
}

/* Nav row */
.donate-modal__nav {
	display: flex;
	gap: 10px;
	margin-top: 24px;
}
.donate-modal__back {
	padding: 13px 22px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 999px;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	font-size: 0.88rem;
	font-weight: 800;
	cursor: pointer;
}
.donate-modal__next {
	flex: 1;
	padding: 13px 22px;
	border: 0;
	border-radius: 999px;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	font-size: 0.9rem;
	font-weight: 800;
	cursor: pointer;
	transition: background 0.2s ease;
}
.donate-modal__next:hover {
	background: #1a8de6;
}
.donate-modal__submit.btn.btn--rect .wp-block-button__link,
button.donate-modal__submit,
button.donate-modal__done {
	flex: 1;
	padding: 13px 22px;
	font-size: 0.9rem;
}
button.donate-modal__submit:disabled {
	opacity: 0.7;
	cursor: wait;
}
.donate-modal__done {
	width: 100%;
}

@media (max-width: 420px) {
	.donate-modal__amounts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.donate-modal__methods {
		grid-template-columns: 1fr;
	}
}
