/* Donations application — storefront widget.
 *
 * Hand-written (not part of the SCSS build) so a shop gets the widget without a CSS rebuild.
 * Colours come from --nvd-* custom properties: a theme can repoint the accent in one place,
 * and everything else is neutral greys that sit on any background.
 */
/* The wall is its own module, so on a page that shows both it renders as a SIBLING of .nvd,
   never inside it. Tokens scoped to .nvd alone would leave every var() in the wall resolving
   to nothing — no accent, no surface, no radius — which reads as a deliberately plain block
   rather than as the broken stylesheet it is. Both roots carry the palette. */
.nvd,
.nvd-wall {
	--nvd-accent: #0d6a56;
	--nvd-accent-soft: #e2f0ea;
	--nvd-accent-ink: #fff;
	--nvd-ink: #1b2420;
	--nvd-ink-2: #5d6b64;
	--nvd-ink-3: #8b968f;
	--nvd-rule: #dfe4e0;
	--nvd-surface: #fff;
	--nvd-radius: 12px;
}

.nvd {
	max-width: none;
	margin: 0;
	color: var(--nvd-ink);
	font-size: 15px;
	line-height: 1.55;
}

.nvd *,
.nvd *::before,
.nvd *::after,
.nvd-wall *,
.nvd-wall *::before,
.nvd-wall *::after { box-sizing: border-box; }

.nvd-form {
	background: var(--nvd-surface);
	border: 1px solid var(--nvd-rule);
	border-radius: var(--nvd-radius);
	padding: 22px;
}

.nvd-title { margin: 0 0 16px; font-size: 22px; line-height: 1.2; }

.nvd-error,
.nvd-notice {
	background: #fdecea;
	border: 1px solid #f3c2bc;
	color: #8f2c1e;
	border-radius: 8px;
	padding: 10px 12px;
	margin-bottom: 16px;
	font-size: 14px;
}
.nvd-notice-success { background: #e8f5ee; border-color: #b9e0c8; color: #0b6b4f; }

/* Two columns once there is room: pick an amount on the left, give the details and pay on
   the right. Below the breakpoint it is the single column it always was. */
.nvd-body { display: grid; grid-template-columns: 1fr; gap: 24px; }

@media (min-width: 880px) {
	.nvd-form { padding: 28px 30px; }
	.nvd-body { grid-template-columns: 1.05fr 0.95fr; gap: 34px; }
	.nvd-col-give { border-left: 1px solid var(--nvd-rule); padding-left: 34px; }
	.nvd-col-give .nvd-fields { margin-top: 0; }
	.nvd-head { margin: 0 0 26px; }
	/* Two tabs stretched across a wide page read as banners, so they keep a sane width and
	   stay centred while everything around them fills. */
	.nvd-seg { max-width: 460px; margin-left: auto; margin-right: auto; }
	.nvd-ask-q { font-size: 21px; }
}

/* ---------- goal ---------- */
.nvd-goal { margin-bottom: 20px; }
.nvd-goal-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 7px; }
.nvd-goal-now { font-size: 21px; font-variant-numeric: tabular-nums; }
.nvd-goal-of { font-size: 13px; color: var(--nvd-ink-3); }
.nvd-goal-track { height: 7px; border-radius: 99px; background: var(--nvd-rule); overflow: hidden; }
.nvd-goal-fill { display: block; height: 100%; background: var(--nvd-accent); border-radius: 99px; }

/* ---------- mode tabs ---------- */
.nvd-seg {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px;
	background: #f1f3f1;
	border-radius: 10px;
	padding: 4px;
	margin-bottom: 20px;
}
.nvd-seg-btn {
	font: inherit;
	font-weight: 600;
	color: var(--nvd-ink-2);
	background: transparent;
	border: 0;
	border-radius: 7px;
	padding: 10px 6px;
	cursor: pointer;
}
.nvd-seg-btn[aria-pressed="true"] {
	background: var(--nvd-surface);
	color: var(--nvd-ink);
	box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}
.nvd-pill {
	display: inline-block;
	margin-left: 6px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	background: var(--nvd-accent-soft);
	color: var(--nvd-accent);
	border-radius: 99px;
	padding: 2px 7px;
}

/* ---------- question ---------- */
.nvd-ask { text-align: center; margin-bottom: 16px; }
.nvd-ask-q { margin: 0 0 4px; font-size: 19px; line-height: 1.2; }
.nvd-ask-sub { margin: 0; font-size: 13px; color: var(--nvd-ink-3); }

/* ---------- tiers ---------- */
.nvd-tiers {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
}
/* A ladder of plain amounts carries far less per card than an icon tile, so it packs tighter
   and a twelve-step list still reads as one block instead of four sparse rows. */
.nvd-tiers[data-bare="1"] { grid-template-columns: repeat(4, 1fr); gap: 7px; }

@media (max-width: 480px) {
	.nvd-tiers { grid-template-columns: repeat(2, 1fr); }
	.nvd-tiers[data-bare="1"] { grid-template-columns: repeat(3, 1fr); }
}
.nvd-tier {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	font: inherit;
	text-align: center;
	color: var(--nvd-ink);
	background: var(--nvd-surface);
	border: 1.5px solid var(--nvd-rule);
	border-radius: 10px;
	padding: 13px 8px 11px;
	cursor: pointer;
}
.nvd-tier:hover { border-color: var(--nvd-ink-3); }
.nvd-tier[aria-pressed="true"] {
	border-color: var(--nvd-accent);
	background: var(--nvd-accent-soft);
}
.nvd-tier:focus-visible { outline: 2px solid var(--nvd-accent); outline-offset: 2px; }
.nvd-tier.nvd-bare { justify-content: center; padding: 14px 6px; }
.nvd-tier.nvd-bare .nvd-tier-name { font-size: 18px; font-weight: 700; }

.nvd-icon { width: 54px; height: 54px; color: var(--nvd-ink-3); }
.nvd-icon .nvd-fill { fill: none; }
.nvd-tier[aria-pressed="true"] .nvd-icon { color: var(--nvd-accent); }
.nvd-tier[aria-pressed="true"] .nvd-icon .nvd-fill { fill: currentColor; opacity: .35; }

.nvd-tier-name { font-size: 15px; font-weight: 700; line-height: 1.15; }
.nvd-tier-desc { font-size: 11.5px; color: var(--nvd-ink-3); line-height: 1.3; }
.nvd-tier-price { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
.nvd-tier[aria-pressed="true"] .nvd-tier-name,
.nvd-tier[aria-pressed="true"] .nvd-tier-price { color: var(--nvd-accent); }

.nvd-ribbon {
	position: absolute;
	top: -8px;
	left: 50%;
	transform: translateX(-50%);
	font-size: 9px;
	font-weight: 700;
	letter-spacing: .07em;
	text-transform: uppercase;
	background: var(--nvd-accent);
	color: var(--nvd-accent-ink);
	border-radius: 99px;
	padding: 3px 9px;
	white-space: nowrap;
}

/* ---------- custom amount ---------- */
.nvd-own { display: flex; align-items: center; gap: 9px; justify-content: center; margin-top: 12px; }
.nvd-own label { font-size: 13px; color: var(--nvd-ink-3); }
.nvd-own-input {
	font: inherit;
	font-weight: 700;
	width: 96px;
	text-align: right;
	border: 1.5px solid var(--nvd-rule);
	border-radius: 8px;
	padding: 8px 10px;
	background: var(--nvd-surface);
	color: var(--nvd-ink);
}
.nvd-own-input:focus { outline: none; border-color: var(--nvd-accent); }
.nvd-own-cur { font-weight: 700; color: var(--nvd-ink-3); }

.nvd-yearly { margin: 12px 0 0; text-align: center; font-size: 13px; color: var(--nvd-ink-2); }

/* ---------- donor fields ---------- */
.nvd-fields,
.nvd-methods-wrap { border: 0; padding: 0; margin: 22px 0 0; }
.nvd-legend {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--nvd-ink-3);
	margin-bottom: 9px;
	padding: 0;
	border: 0;
	width: auto;
}
.nvd-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 480px) { .nvd-row { grid-template-columns: 1fr; } }
.nvd-fields input[type="text"],
.nvd-fields input[type="email"],
.nvd-fields input[type="tel"] {
	font: inherit;
	width: 100%;
	border: 1.5px solid var(--nvd-rule);
	border-radius: 9px;
	padding: 10px 12px;
	background: var(--nvd-surface);
	color: var(--nvd-ink);
	margin-bottom: 8px;
}
.nvd-row input { margin-bottom: 8px; }
.nvd-fields input:focus { outline: none; border-color: var(--nvd-accent); }
.nvd-check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--nvd-ink-2); margin-bottom: 6px; }

/* ---------- methods ---------- */
.nvd-methods { display: flex; flex-wrap: wrap; gap: 7px; }
/* The provider logos ship with their own frame, so a button border around them reads as a
   double border. The button is the image; selection is a ring outside it, not a second edge. */
.nvd-pm {
	border: 0;
	background: transparent;
	padding: 0;
	cursor: pointer;
	line-height: 0;
	opacity: .72;
	transition: opacity .15s;
}
.nvd-pm img { height: 30px; width: auto; display: block; }
.nvd-pm:hover { opacity: 1; }
.nvd-pm[aria-pressed="true"] {
	opacity: 1;
	outline: 2px solid var(--nvd-accent);
	outline-offset: 2px;
}
.nvd-pm:focus-visible { outline: 2px solid var(--nvd-accent); outline-offset: 2px; }

/* ---------- consent, summary, submit ---------- */
.nvd-consent {
	margin-top: 18px;
	background: var(--nvd-accent-soft);
	border-radius: 10px;
	padding: 12px 14px;
}
.nvd-consent p { margin: 0; font-size: 13px; line-height: 1.5; }

.nvd-terms {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	font-size: 13px;
	line-height: 1.5;
	color: var(--nvd-ink-2);
	margin-top: 16px;
}
.nvd-terms input { margin-top: 3px; flex: none; }
.nvd-terms a { color: var(--nvd-accent); }
.nvd-need-terms .nvd-terms { color: #a3352a; }
.nvd-need-terms .nvd-terms input { outline: 2px solid #d1584a; outline-offset: 3px; }

.nvd-summary {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 16px;
	border-top: 1px solid var(--nvd-rule);
	margin-top: 18px;
	padding-top: 15px;
}
.nvd-cadence { font-size: 13px; color: var(--nvd-ink-2); }
.nvd-total { font-size: 24px; font-variant-numeric: tabular-nums; }

.nvd-cta {
	display: block;
	width: 100%;
	font: inherit;
	font-size: 16px;
	font-weight: 700;
	background: var(--nvd-accent);
	color: var(--nvd-accent-ink);
	border: 0;
	border-radius: 10px;
	padding: 14px;
	margin-top: 15px;
	cursor: pointer;
}
.nvd-cta[disabled] { opacity: .6; cursor: default; }
.nvd-powered { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 14px 0 0; font-size: 12px; color: var(--nvd-ink-3); }
.nvd-powered-logo { display: block; width: auto; height: 22px; }

/* Explainer blocks (tax relief for private donors and companies) fold under the form. */
.nvd-info { margin-top: 18px; border-top: 1px solid var(--nvd-rule); }
.nvd-info-block { border-bottom: 1px solid var(--nvd-rule); }
.nvd-info-block summary { position: relative; cursor: pointer; padding: 13px 30px 13px 0; font-weight: 700; font-size: 15px; list-style: none; }
.nvd-info-block summary::-webkit-details-marker { display: none; }
.nvd-info-block summary::after { content: '+'; position: absolute; right: 6px; top: 9px; font-size: 22px; font-weight: 400; color: var(--nvd-ink-3); }
.nvd-info-block[open] summary::after { content: '\2212'; }
.nvd-info-body { padding: 0 0 14px; font-size: 14px; line-height: 1.55; color: var(--nvd-ink-2); }
.nvd-info-body p { margin: 0 0 10px; }
.nvd-info-body ul { margin: 0 0 10px 18px; padding: 0; }
.nvd-info-body li { margin: 0 0 6px; }
.nvd-info-body strong { color: var(--nvd-ink); }

/* Submitting without an amount or a method: mark only the group that is actually missing,
   rather than sending a request the controller would bounce straight back. */
.nvd-need-amount .nvd-tiers,
.nvd-need-method .nvd-methods { outline: 2px solid #d1584a; outline-offset: 6px; border-radius: 4px; }

/* ---------- supporter wall ---------- */
/* Gratitude first, arithmetic second. The headline does the thanking and the names sit quietly
   under it as running text — a grid of chips turns a supporter list into a leaderboard, which
   is the one thing a donation wall must never look like. */
.nvd-wall {
	max-width: none;
	margin: 34px 0 0;
	background: linear-gradient(160deg, #f2f8f5, var(--nvd-accent-soft));
	border-radius: var(--nvd-radius);
	padding: 30px 32px 26px;
	color: var(--nvd-ink);
	font-size: 15px;
	line-height: 1.55;
}
.nvd-wall-title {
	margin: 0 0 14px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--nvd-accent);
}
.nvd-wall-lead {
	margin: 0 0 20px;
	font-size: 26px;
	line-height: 1.25;
	letter-spacing: -.01em;
	color: var(--nvd-ink);
	max-width: 20em;
}
/* The count is the only figure the headline carries, so it is the only thing that takes the
   accent — the money stays in the footer where it backs the sentence up instead of competing. */
.nvd-wall-lead em { font-style: normal; color: var(--nvd-accent); }

.nvd-wall-names {
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 15px;
	line-height: 2.05;
	color: var(--nvd-ink-2);
	max-width: 46em;
}
/* Inline items separated by a middot: the separator is generated, so it never appears before
   the first name or after the last one, and it stays out of the accessibility tree. */
.nvd-wall-names li { display: inline; font-weight: 600; color: var(--nvd-ink); }
.nvd-wall-names li + li::before {
	content: "\00b7";
	margin: 0 8px;
	font-weight: 400;
	color: var(--nvd-ink-3);
}
.nvd-wall-more { font-weight: 400 !important; color: var(--nvd-ink-2) !important; }
.nvd-wall-note { margin: 0; font-size: 13.5px; color: var(--nvd-ink-2); }

.nvd-wall-track {
	height: 5px;
	border-radius: 99px;
	background: rgba(20, 40, 32, .1);
	overflow: hidden;
	margin: 22px 0 9px;
}
.nvd-wall-track span { display: block; height: 100%; background: var(--nvd-accent); border-radius: 99px; }

.nvd-wall-foot {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 8px 16px;
	font-size: 13px;
	color: var(--nvd-ink-2);
}
.nvd-wall-sum strong { font-size: 15px; font-variant-numeric: tabular-nums; color: var(--nvd-ink); }
.nvd-wall-sum span { margin-left: 5px; }
.nvd-wall-last { margin: 0; color: var(--nvd-ink-3); }

@media (max-width: 560px) {
	.nvd-wall { padding: 24px 20px; }
	.nvd-wall-lead { font-size: 21px; }
	.nvd-wall-names { line-height: 1.95; }
}

/* The consent pages open in place: sending someone away mid-form to read the terms is how a
   half-filled donation gets abandoned. */
.nvd-modal {
	position: fixed;
	inset: 0;
	z-index: 1050;
	background: rgba(20, 24, 22, .55);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.nvd-modal-box {
	background: var(--nvd-surface);
	border-radius: 14px;
	width: min(680px, 100%);
	max-height: 82vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .5);
}
.nvd-modal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 22px;
	border-bottom: 1px solid var(--nvd-rule);
}
.nvd-modal-head h3 { margin: 0; font-size: 18px; }
.nvd-modal-x {
	border: 0;
	background: transparent;
	font-size: 26px;
	line-height: 1;
	color: var(--nvd-ink-3);
	cursor: pointer;
	padding: 0 4px;
}
.nvd-modal-body { padding: 20px 22px 24px; overflow-y: auto; font-size: 14.5px; line-height: 1.6; }
.nvd-modal-body img { max-width: 100%; height: auto; }

.nvd-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
