/* Wellspring Donations in the site's design language.
   Loaded only where the plugin's own stylesheet is (functions.php), after it.
   The plugin supplies structure and behavior; this supplies type, surfaces and
   actions from main.css: Fraunces display, ivory/ice surfaces, teal pill
   buttons, the amber focus ring, soft layered shadows. */

.wsd,
.wsd-goal,
.wsd-wall,
.wsd-camps {
	--wsd-line: var(--line-strong);
	--wsd-mist: var(--ice);
	--wsd-spring-soft: var(--ice-2);
	--wsd-text: var(--ink-2);
	--wsd-muted: var(--muted);
	--wsd-r: var(--r-sm);
	font-family: var(--font-body);
}

/* On the Give page the form lines up with the section heading above it. */
.give-form { scroll-margin-top: calc(var(--header-h) + 32px); outline: none; }
.give-form .wsd { max-width: none; margin: 0; }
.give-form__portal { margin: 28px 0 0; color: var(--muted); font-size: 0.95rem; }

/* Two columns only where the plugin itself uses two (its container query
   collapses to one column at 860px); the summary stays clear of the sticky header. */
@container wsd (min-width: 861px) {
	.give-form .wsd-layout { grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: clamp(28px, 4vw, 56px); }
	.wsd-summary { top: calc(var(--header-h) + 40px); }
}

/* Headings: the editorial serif, as everywhere else on the site. */
.wsd .wsd-title,
.wsd .wsd-step__title,
.wsd .wsd-done__title,
.wsd .wsd-upsell__title,
.wsd-portal h2,
.wsd-wall__title,
.wsd-camps__title {
	font-family: var(--font-display);
	font-weight: 380;
	font-variation-settings: "opsz" 72, "SOFT" 50;
	letter-spacing: -0.02em;
	color: var(--ink);
}
.wsd .wsd-step__title { font-size: clamp(1.6rem, 1.3rem + 0.9vw, 2rem); line-height: 1.1; }
.wsd-summary__amount {
	font-family: var(--font-display);
	font-weight: 340;
	font-variation-settings: "opsz" 144, "SOFT" 50;
	letter-spacing: -0.035em;
}

/* Surfaces: the white card with the site's soft layered shadow. */
.wsd-form {
	border: 1px solid rgba(255, 255, 255, 0.9);
	border-radius: var(--r-lg);
	background: rgba(255, 255, 255, 0.94);
	box-shadow: var(--shadow-2);
}
.wsd-summary {
	border-radius: var(--r-lg);
	background: linear-gradient(160deg, var(--ink) 0%, #12333c 100%);
	box-shadow: var(--shadow-3);
}
.wsd-panel,
.wsd-portal__signin,
.wsd-wall__item,
.wsd-camp-card {
	border-radius: var(--r-md);
}

/* Progress: the current step in teal, like the site's active nav. */
.wsd .wsd-progress .is-current button { color: var(--teal-deep); border-bottom-color: var(--teal); }
.wsd .wsd-progress .is-current .wsd-progress__n { background: var(--teal); border-color: var(--teal); color: #fff; }

/* Choices: selected states use the brand teal, not near-black. */
.wsd-amount span,
.wsd-other,
.wsd-option,
.wsd select,
.wsd input[type="text"],
.wsd input[type="email"],
.wsd input[type="tel"],
.wsd input[type="number"],
.wsd textarea {
	border-radius: 14px;
	transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background-color 0.2s var(--ease);
}
.wsd-amount span:hover { border-color: rgba(11, 110, 115, 0.45); }
.wsd-amount input:checked + span {
	background: linear-gradient(135deg, #0E7C82 0%, var(--teal) 45%, var(--teal-deep) 100%);
	border-color: var(--teal-deep);
	box-shadow: 0 12px 26px -14px rgba(11, 110, 115, 0.7);
}
.wsd-seg__opt input:checked + span { color: var(--teal-deep); }
.wsd-option:has(input:checked),
.wsd .wsd-tab[aria-selected="true"] { border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal); }

/* After the gift: sharing in the site's palette rather than platform blue. */
.wsd .wsd-share__title { font-family: var(--font-display); font-weight: 420; font-size: 1.35rem; letter-spacing: -0.015em; color: var(--ink); }
.wsd .wsd-sbtn { border-radius: 999px; }
.wsd .wsd-sbtn:hover { border-color: rgba(11, 110, 115, 0.45); color: var(--teal-deep); }
.wsd .wsd-sbtn--fb,
.wsd .wsd-sbtn--fb:hover {
	background: linear-gradient(135deg, #0E7C82 0%, var(--teal) 45%, var(--teal-deep) 100%);
	border-color: transparent;
	color: #fff;
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 14px 30px -14px rgba(11, 110, 115, 0.7);
}
.wsd .wsd-cover { background: var(--ice); border-radius: var(--r-sm); }

/* Actions: the site's primary pill button. */
.wsd .wsd-btn,
.wsd-camps .wsd-btn {
	background: linear-gradient(135deg, #0E7C82 0%, var(--teal) 45%, var(--teal-deep) 100%);
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 14px 30px -14px rgba(11, 110, 115, 0.7);
	transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.wsd .wsd-btn:hover,
.wsd-camps .wsd-btn:hover {
	background: linear-gradient(135deg, #0E7C82 0%, var(--teal) 45%, var(--teal-deep) 100%);
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 20px 40px -16px rgba(11, 110, 115, 0.75);
	transform: translateY(-1px);
}
.wsd .wsd-btn--ghost,
.wsd .wsd-btn--ghost:hover {
	background: transparent;
	color: var(--ink);
	box-shadow: inset 0 0 0 1.5px var(--line-strong);
	transform: none;
}
.wsd .wsd-btn--ghost:hover { background: #fff; box-shadow: inset 0 0 0 1.5px rgba(11, 110, 115, 0.35); }
.wsd .wsd-again .wsd-btn--ghost { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.35); }

/* Focus: the site-wide amber ring, visible on every surface. */
.wsd :focus-visible,
.wsd .wsd-btn:focus-visible,
.wsd-amount input:focus-visible + span,
.wsd-seg__opt input:focus-visible + span,
.wsd .wsd-tab:focus-visible,
.wsd-more summary:focus-visible {
	outline: 3px solid var(--focus);
	outline-offset: 3px;
}
.wsd select:focus,
.wsd input:focus,
.wsd textarea:focus,
.wsd-other:focus-within {
	border-color: var(--teal);
	box-shadow: 0 0 0 4px rgba(11, 110, 115, 0.14);
}

.wsd input[type="checkbox"],
.wsd input[type="radio"] { accent-color: var(--teal); }

/* My giving: the sign-in sits in a card, aligned with the page heading. */
.page-simple .wsd { margin: 0; }
.page-simple .wsd-portal { margin-top: clamp(28px, 4vw, 48px); }
.wsd-portal__signin {
	max-width: 36rem;
	padding: clamp(1.25rem, 3vw, 2.25rem);
	background: #fff;
	border: 1px solid rgba(255, 255, 255, 0.9);
	box-shadow: var(--shadow-2);
}

@media (prefers-reduced-motion: reduce) {
	.wsd .wsd-btn:hover,
	.wsd-camps .wsd-btn:hover { transform: none; }
}

/* ---------- Lumen finish ------------------------------------------------
   Calm, solid, precise: the form is the one place nothing floats. */
.wsd-form { border-radius: var(--r-xl); border: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow-2); }

/* Progress: a segmented track. Done segments fill ink, the current one teal. */
.wsd-progress { gap: 8px; border-bottom: 0; margin-bottom: 2.25rem; }
.wsd .wsd-progress button {
	flex-direction: column; align-items: flex-start; gap: 10px; padding: 0 0 2px; margin: 0;
	border-bottom: 0; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; color: var(--muted);
}
.wsd .wsd-progress button::before {
	content: ""; display: block; width: 100%; height: 3px; border-radius: 3px; background: var(--line-strong);
	transition: background-color 0.5s var(--ease-out);
}
.wsd .wsd-progress .is-done button::before { background: var(--ink); }
.wsd .wsd-progress .is-current button::before { background: var(--teal); }
.wsd .wsd-progress .is-current button { color: var(--ink); border-bottom: 0; }
.wsd-progress__n { width: 22px; height: 22px; font-size: 0.72rem; border-width: 1px; }
.wsd .wsd-progress .is-current .wsd-progress__n { background: var(--teal); border-color: var(--teal); }
.wsd-progress .is-done .wsd-progress__n { background: var(--ink); border-color: var(--ink); }
.wsd .wsd-progress button span:not(.wsd-progress__n) { display: inline-flex; }
.wsd .wsd-progress button > * { vertical-align: middle; }

.wsd .wsd-step__title { font-weight: 300; font-size: clamp(1.9rem, 1.4rem + 1.2vw, 2.5rem); letter-spacing: -0.04em; margin-bottom: 1.5rem; }
.wsd .wsd-label { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em; color: var(--ink-2); }

/* Amounts: display numerals on quiet tiles; the chosen one in solid teal. */
.wsd-amount span {
	min-height: 4rem; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--paper);
	font-family: var(--font-display); font-weight: 360; font-size: 1.55rem; letter-spacing: -0.02em;
	font-variation-settings: "opsz" 48;
	transition: border-color 0.25s, background-color 0.25s, color 0.25s, box-shadow 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.wsd-amount:active span { transform: scale(0.97); }
.wsd-amount input:checked + span {
	background: var(--teal); border-color: var(--teal);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 14px 28px -16px rgba(11, 110, 115, 0.7);
}
.wsd-other { min-height: 4rem; border-radius: 14px; }
.wsd-seg { border-radius: 999px; }
.wsd-seg__opt span { border-radius: 999px; }

/* Fields */
.wsd input[type="text"], .wsd input[type="email"], .wsd input[type="tel"], .wsd input[type="number"], .wsd select, .wsd textarea {
	min-height: 52px; padding: 0.8rem 1rem; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--paper);
	box-shadow: inset 0 1px 2px rgba(11, 30, 37, 0.04);
}
.wsd input:hover, .wsd select:hover, .wsd textarea:hover { border-color: rgba(11, 30, 37, 0.28); }
.wsd input:focus, .wsd select:focus, .wsd textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(11, 110, 115, 0.12); }
.wsd [aria-invalid="true"] { box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.1); }
.wsd .wsd-cover { padding: 14px 16px; background: var(--mist); border-radius: 14px; }
.wsd-more { border-color: var(--line-strong); }

/* Validation: a clear, calm note with a mark, never a shout */
.wsd-error {
	display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid rgba(180, 35, 24, 0.22); border-left-width: 1px;
	border-radius: 12px; background: #FBF0EE; color: #7D1A14; font-size: 0.95rem;
}
.wsd-error::before {
	content: "!"; flex: none; display: grid; place-items: center; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%;
	background: var(--danger); color: #fff; font-size: 0.75rem; font-weight: 700;
}

/* Payment choices */
.wsd .wsd-tab { border-radius: 14px; border: 1px solid var(--line-strong); background: var(--paper); transition: border-color 0.25s, box-shadow 0.35s var(--ease-out); }
.wsd .wsd-tab:hover { border-color: rgba(11, 110, 115, 0.45); }
.wsd .wsd-btn--pay { min-height: 3.75rem; font-size: 1.05rem; }
.wsd .wsd-note { background: var(--mist); border-radius: 14px; }

/* The summary: night water that rises with the gift */
.wsd-summary { background: linear-gradient(165deg, var(--abyss-2) 0%, var(--abyss) 100%); box-shadow: var(--shadow-3); }
.wsd-summary__label { letter-spacing: 0.22em; text-transform: uppercase; font-size: 0.66rem; color: var(--glacier-hi); }
.wsd-summary__amount { font-size: clamp(3.4rem, 2.6rem + 2vw, 4.6rem); }

/* Thank you: unhurried */
.wsd .wsd-done__title { font-weight: 300; font-size: clamp(2.4rem, 1.6rem + 2.4vw, 3.6rem); letter-spacing: -0.045em; line-height: 0.98; }
.wsd .wsd-share__title { font-weight: 340; font-size: 1.5rem; letter-spacing: -0.03em; }
.wsd-preview { border-radius: 16px; border-color: var(--line); }
.wsd-upsell { border-radius: var(--r-xl); border: 1px solid var(--line); box-shadow: var(--shadow-3); }
.wsd .wsd-upsell__title { font-weight: 300; font-size: 2rem; letter-spacing: -0.04em; }
