/* Core Site Options publish these palette colors as WordPress preset variables. */
.fcwd-donation-form {
	--fcwd-primary: var(--wp--preset--color--primary-dark, var(--wp--preset--color--primary, var(--fc-button-bg, #1d2327)));
	--fcwd-primary-hover: var(--wp--preset--color--primary, var(--fc-button-bg-hover, #3c434a));
	--fcwd-match: var(--wp--preset--color--secondary, #00ae97);
	--fcwd-text: var(--wp--preset--color--brand-text, currentColor);
	--fcwd-surface: var(--wp--preset--color--surface-light, #fff);
	--fcwd-border: var(--wp--preset--color--border, #d7dbe1);
	--fcwd-radius: var(--wp--custom--border--button, var(--wp--custom--border--radius, 6px));
	color: var(--fcwd-text);
	font-family: inherit;
	margin: 0 0 1rem;
	max-width: 100%;
}

.fcwd-donation-price-label { display: inline-block; font-weight: 600; }

.fcwd-preset-buttons {
	display: grid;
	gap: .75rem;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
	margin: 0 0 1.25rem;
	width: 100%;
}

.fcwd-preset-button,
.fcwd-donation-goal-tile {
	align-items: center;
	background: var(--fcwd-surface);
	border: 1px solid var(--fcwd-border);
	border-radius: var(--fcwd-radius);
	box-sizing: border-box;
	color: var(--fcwd-text);
	cursor: pointer;
	display: flex;
	font-family: inherit;
	font-weight: 600;
	justify-content: center;
	line-height: 1.2;
	min-height: 4rem;
	padding: .85rem 1rem;
	text-align: center;
	width: 100%;
}

.fcwd-preset-button { font-size: clamp(1rem, 1.5vw, 1.25rem); }
.fcwd-preset-button:hover,
.fcwd-donation-goal-tile:hover { border-color: var(--fcwd-primary); }
.fcwd-preset-button.is-selected,
.fcwd-donation-goal-tile:has(input:checked) {
	background: var(--fcwd-primary);
	border-color: var(--fcwd-primary);
	color: var(--fcwd-surface);
}
.fcwd-preset-button:focus-visible,
.fcwd-donation-goal-tile:has(input:focus-visible) {
	outline: 3px solid var(--fcwd-primary-hover);
	outline-offset: 2px;
}

.fcwd-custom-amount-row label,
.fcwd-donation-goals-row legend,
.fcwd-donation-other-note-row label {
	color: var(--fcwd-text);
	display: block;
	font-family: inherit;
	font-weight: 600;
	margin-bottom: .35rem;
}
.fcwd-donation-form .fcwd-donation-amount {
	appearance: none;
	border: 1px solid var(--fcwd-border);
	border-radius: var(--fcwd-radius);
	box-shadow: none;
	max-width: min(100%, 11rem);
}
.fcwd-donation-goals-row { border: 0; margin: 1.25rem 0; padding: 0; }
.fcwd-donation-goal-tiles {
	display: grid;
	gap: .75rem;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
	width: 100%;
}
.fcwd-donation-goal-tile { font-weight: 700; position: relative; }
.fcwd-donation-goal-tile input { opacity: 0; pointer-events: none; position: absolute; }
.fcwd-donation-goals-row .description { font-size: .9em; margin: .35rem 0 0; opacity: .8; }
.fcwd-donation-other-note-row { margin: 0 0 1.25rem; }
.fcwd-donation-other-note { width: min(100%, 32rem); }
.fcwd-donation-disclaimer { font-size: .95em; margin: 0 0 1rem; opacity: .85; }
.fcwd-donation-actions .wp-block-button__link { height: auto; }

.fcwd-campaign {
	background: var(--fcwd-surface);
	border: 1px solid var(--fcwd-border);
	border-radius: var(--fcwd-radius);
	margin: 0 0 1.5rem;
	padding: clamp(1rem, 3vw, 1.5rem);
}
.fcwd-campaign h2 { color: var(--fcwd-text); margin: 0 0 .5rem; }
.fcwd-campaign-description { margin: 0 0 1rem; }
.fcwd-campaign-progress {
	background: var(--fcwd-border);
	border-radius: 999px;
	height: .8rem;
	overflow: hidden;
}
.fcwd-campaign-progress span {
	background: var(--fcwd-primary);
	border-radius: inherit;
	display: block;
	height: 100%;
}
.fcwd-campaign-progress--matched { display: flex; }
.fcwd-campaign-progress--matched .fcwd-campaign-segment {
	background: transparent;
	border-radius: 0;
	flex: 0 0 50%;
	width: 50%;
}
.fcwd-campaign-progress--matched .fcwd-campaign-segment--donors { border-right: 2px solid var(--fcwd-surface); box-sizing: border-box; }
.fcwd-campaign-progress--matched .fcwd-campaign-segment > span { background: var(--fcwd-primary); }
.fcwd-campaign-progress--matched .fcwd-campaign-segment--match > span { background: var(--fcwd-match); }
.fcwd-campaign-match-legend { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: .6rem; }
.fcwd-campaign-match-legend > span { align-items: center; display: inline-flex; flex: 0 0 auto; gap: .4rem; white-space: nowrap; }
.fcwd-campaign-match-legend .woocommerce-Price-amount { flex: 0 0 auto; white-space: nowrap; }
.fcwd-campaign-key { background: var(--fcwd-primary); border-radius: 50%; display: inline-block; flex: 0 0 .75rem; height: .75rem; }
.fcwd-campaign-key--match { background: var(--fcwd-match); }
.fcwd-campaign-totals { margin: .6rem 0 0; }
