/* ==========================================================================
   JGG Support widget – feature, sidebar, inline and band layouts. Brand: square corners; black, white, yellow, rainbow.
   Everything is scoped to .jgg-sup, and form controls are reset here because the theme
   styles buttons and inputs globally.
   ========================================================================== */

.jgg-sup {
	--ink: #111;
	--text: #333;
	--muted: #6b6b6b;
	--line: #e2e2e2;
	--yellow: #f7ec46;
	--red: #c62828;
	--font: "Geist JGGP", "Geist JGH", "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
	--mono: "Geist Mono JGGP", "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	--bg: #fff;
	--tile-line: #cfcfcf;
	--hover: #f4f4f4;
	--sel-bg: var(--ink);
	--sel-fg: var(--yellow);
	--btn-bg: var(--ink);
	--btn-fg: var(--yellow);
	--btn-hover: #2a2a2a;
	--rainbow: linear-gradient(90deg, #7b2ff7 0%, #e0409a 18%, #2f8fe0 38%, #22a35a 58%, #f7ec46 76%, #f28c28 88%, #e53935 100%);

	container-type: inline-size;
	position: relative;
	box-sizing: border-box;
	margin: 40px 0;
	background: var(--bg);
	border: 2px solid var(--ink);
	color: var(--ink);
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}
.jgg-sup *,
.jgg-sup *::before,
.jgg-sup *::after { box-sizing: border-box; }
/* The widget sizes its layout from its own width (container queries). Inside a wrapping flex column – e.g. an
   Elementor post template on mobile – the browser would measure its height at almost zero width (every word on its
   own line) and leave a huge gap below it. A real width avoids that. */
.jgg-sup { min-width: 240px; }
.elementor-widget-jgg-donations:not(.elementor-widget__width-auto):not(.elementor-widget__width-initial) { width: 100%; }
.jgg-sup::before {
	content: "";
	position: absolute;
	inset: -2px -2px auto;
	height: 5px;
	background: var(--rainbow);
}

.jgg-sup__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 28px;
	padding: 36px 20px 28px;
}
@container (min-width: 520px) {
	.jgg-sup__inner { gap: 36px; padding: 48px 32px 40px; }
}
@container (min-width: 820px) {
	.jgg-sup__inner {
		grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
		gap: 56px;
		padding: 56px 48px 48px;
	}
}

.jgg-sup__story,
.jgg-sup__give { min-width: 0; }

.jgg-sup__sr {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.jgg-sup p,
.jgg-sup dl,
.jgg-sup dd,
.jgg-sup h2,
.jgg-sup h3,
.jgg-sup fieldset { margin: 0; padding: 0; border: 0; }

/* ---- Story column ------------------------------------------------------- */

.jgg-sup__preview {
	display: inline-block;
	margin-bottom: 16px !important;
	padding: 4px 10px !important;
	background: var(--yellow);
	font-size: 13px;
	font-weight: 600;
}
.jgg-sup__eyebrow {
	font-family: var(--mono);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--muted);
}
.jgg-sup .jgg-sup__title {
	margin-top: 18px;
	font-family: var(--font);
	font-size: clamp(28px, 7.4cqi, 54px);
	font-weight: 800;
	line-height: 1.06;
	text-wrap: balance;
	letter-spacing: -.035em;
	color: var(--ink);
	text-transform: none;
}
.jgg-sup__intro {
	margin-top: 20px !important;
	max-width: 34em;
	font-size: clamp(16px, 2.6cqi, 18px);
	line-height: 1.55;
	color: var(--text);
	text-wrap: pretty;
}
.jgg-sup__reasons { margin-top: 32px !important; border-top: 1px solid var(--line) !important; }
.jgg-sup__reason {
	display: grid;
	gap: 4px;
	padding: 16px 0;
	border-bottom: 1px solid var(--line);
}
@container (min-width: 520px) {
	.jgg-sup__reason { grid-template-columns: 170px 1fr; gap: 24px; }
}
.jgg-sup__reason dt { font-weight: 700; }
.jgg-sup__reason dd { color: var(--text); }

/* ---- Give column ---------------------------------------------------------- */

.jgg-sup__form { display: grid; gap: 12px; }

/* Radio buttons drawn as square tiles; the real inputs stay for keyboard + screen readers. */
.jgg-sup__freq,
.jgg-sup__amounts { display: grid; min-width: 0; }
.jgg-sup__freq { grid-template-columns: 1fr 1fr; gap: 0; border: 2px solid var(--ink) !important; margin-bottom: 4px !important; }
/* Three amounts, always in one row (also on phones): one glance, one tap. */
.jgg-sup__amounts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.jgg-sup__amounts[hidden] { display: none; }

.jgg-sup__freq label,
.jgg-sup__amounts label { position: relative; display: block; margin: 0; cursor: pointer; min-width: 0; }
.jgg-sup__amounts label.jgg-sup__sr { position: absolute !important; }
.jgg-sup__freq input,
.jgg-sup__amounts input {
	position: absolute;
	inset: 0;
	width: 100%; height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}
.jgg-sup__freq span,
.jgg-sup__amounts span {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: 8px 4px;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.15;
	text-align: center;
	background: var(--bg);
	color: var(--ink);
	transition: background-color .12s, color .12s, border-color .12s, box-shadow .12s;
}
.jgg-sup__amounts span {
	flex-direction: column;
	gap: 3px;
	min-height: 64px;
	border: 2px solid var(--tile-line);
	font-size: 20px;
	font-variant-numeric: tabular-nums;
	letter-spacing: -.01em;
}
.jgg-sup__amounts b { font-weight: 800; }
.jgg-sup__approx { display: block; font-size: 12px; font-weight: 500; line-height: 1.2; letter-spacing: 0; opacity: .7; white-space: nowrap; }
.jgg-sup__approx:empty { display: none; }
.jgg-sup__freq input:checked + span,
.jgg-sup__amounts input:checked + span { background: var(--sel-bg); color: var(--sel-fg); border-color: var(--sel-bg); }
.jgg-sup__amounts input:checked + span .jgg-sup__approx { opacity: .85; }
.jgg-sup__amounts label:hover input:not(:checked) + span { border-color: var(--ink); }
.jgg-sup__freq label:hover input:not(:checked) + span { background: var(--hover); }
.jgg-sup__freq input:focus-visible + span,
.jgg-sup__amounts input:focus-visible + span { outline: 3px solid var(--yellow); outline-offset: -7px; box-shadow: inset 0 0 0 2px var(--ink); }

/* "Other amount": currency picker + field joined into one control, always visible. */
.jgg-sup__field {
	display: flex;
	align-items: stretch;
	min-width: 0;
	height: 56px;
	border: 2px solid var(--tile-line);
	background: var(--bg);
	transition: border-color .12s;
}
.jgg-sup__field:hover { border-color: var(--ink); }
.jgg-sup__field.is-active,
.jgg-sup__field:focus-within { border-color: var(--ink); }
.jgg-sup__field:focus-within { outline: 3px solid var(--yellow); outline-offset: 0; }
.jgg-sup__field.is-error { border-color: var(--red); }
.jgg-sup .jgg-sup__cur {
	-webkit-appearance: none;
	appearance: none;
	flex: none;
	height: 100%;
	margin: 0;
	padding: 0 30px 0 12px;
	border: 0;
	border-right: 2px solid var(--tile-line);
	border-radius: 0;
	background: var(--hover) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23111' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 10px center;
	box-shadow: none;
	font-family: var(--font);
	font-size: 15px;
	font-weight: 700;
	color: var(--ink);
	cursor: pointer;
}
.jgg-sup .jgg-sup__cur:focus { outline: none; }
.jgg-sup .jgg-sup__cur:focus-visible { box-shadow: inset 0 0 0 2px var(--ink); }
.jgg-sup__sym { display: flex; align-items: center; padding: 0 2px 0 14px; font-size: 18px; font-weight: 700; }
.jgg-sup .jgg-sup__field input {
	flex: 1;
	width: 100%;
	min-width: 0;
	height: 100%;
	margin: 0;
	padding: 0 14px;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	font-family: var(--font);
	font-size: 18px; /* 16px+ stops iPhones zooming in */
	font-weight: 700;
	color: var(--ink);
	outline: none;
}
.jgg-sup .jgg-sup__field input::placeholder { color: var(--muted); font-weight: 500; opacity: 1; }
.jgg-sup__msg { margin-top: 6px !important; font-size: 13px; line-height: 1.4; color: var(--muted); }
.jgg-sup__msg:empty { display: none; }
.jgg-sup__msg.is-error { color: var(--red); font-weight: 600; }

.jgg-sup .jgg-sup__btn {
	-webkit-appearance: none;
	appearance: none;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	min-height: 60px;
	margin: 4px 0 0;
	padding: 12px 20px;
	border: 0;
	border-radius: 0;
	background: var(--btn-bg);
	box-shadow: none;
	color: var(--btn-fg);
	font-family: var(--font);
	font-size: 20px;
	font-weight: 800;
	letter-spacing: -.01em;
	line-height: 1.2;
	text-transform: none;
	cursor: pointer;
	transition: background-color .12s, transform .08s;
}
.jgg-sup .jgg-sup__btn:hover { background: var(--btn-hover); color: var(--btn-fg); }
.jgg-sup .jgg-sup__btn:active { transform: translateY(1px); }
.jgg-sup .jgg-sup__btn:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; box-shadow: 0 0 0 3px var(--ink); }
.jgg-sup .jgg-sup__btn[aria-disabled="true"] { background: #6b6b6b; color: #fff; cursor: not-allowed; }
.jgg-sup__btn svg { flex: none; }

.jgg-sup__secure { font-size: 13px; color: var(--muted); text-align: center; text-wrap: balance; }
.jgg-sup__secure svg { display: inline-block; margin-right: 5px; vertical-align: -2px; }

.jgg-sup__ways { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.jgg-sup .jgg-sup__ways h3 { font-family: var(--font); font-size: 17px; font-weight: 700; line-height: 1.3; letter-spacing: 0; text-transform: none; color: var(--ink); }
.jgg-sup__ways p { margin-top: 8px !important; color: var(--text); }
.jgg-sup .jgg-sup__ways a {
	color: var(--ink);
	font-weight: 700;
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}
.jgg-sup .jgg-sup__ways a:hover { background: var(--yellow); }

/* ==========================================================================
   Sidebar – narrow column (~260–380px). Everything stacked, amounts 2 × 2.
   ========================================================================== */

.jgg-sup--sidebar { margin: 0 0 32px; }
.jgg-sup--sidebar .jgg-sup__inner { gap: 20px; padding: 30px 20px 22px; grid-template-columns: minmax(0, 1fr); }
.jgg-sup--sidebar .jgg-sup__eyebrow { font-size: 11px; }
.jgg-sup.jgg-sup--sidebar .jgg-sup__title { margin-top: 10px; font-size: 26px; line-height: 1.08; letter-spacing: -.03em; }
.jgg-sup--sidebar .jgg-sup__intro { margin-top: 10px !important; font-size: 15px; }
.jgg-sup--sidebar .jgg-sup__form { gap: 12px; }
.jgg-sup--sidebar .jgg-sup__freq span { min-height: 44px; font-size: 15px; }
.jgg-sup--sidebar .jgg-sup__amounts { gap: 6px; }
.jgg-sup--sidebar .jgg-sup__amounts span { min-height: 56px; font-size: 17px; }
.jgg-sup--sidebar .jgg-sup__approx { font-size: 11px; }
.jgg-sup--sidebar .jgg-sup__field { height: 50px; }
.jgg-sup.jgg-sup--sidebar .jgg-sup__cur { padding: 0 24px 0 8px; background-position: right 7px center; font-size: 14px; }
.jgg-sup.jgg-sup--sidebar .jgg-sup__field input { padding: 0 10px; font-size: 16px; }
.jgg-sup.jgg-sup--sidebar .jgg-sup__btn { min-height: 54px; font-size: 17px; gap: 8px; }
.jgg-sup--sidebar .jgg-sup__btn svg { width: 18px; height: 18px; }
.jgg-sup--sidebar .jgg-sup__secure { font-size: 12px; }
.jgg-sup--sidebar .jgg-sup__preview { font-size: 11px; }

/* ==========================================================================
   Inline – inside an article. Smaller type; side by side when the column is wide enough.
   ========================================================================== */

.jgg-sup--inline { margin: 40px 0; }
.jgg-sup--inline .jgg-sup__inner { gap: 24px; padding: 34px 24px 26px; }
.jgg-sup.jgg-sup--inline .jgg-sup__title { margin-top: 12px; font-size: clamp(24px, 4.4cqi, 30px); line-height: 1.1; letter-spacing: -.03em; }
.jgg-sup--inline .jgg-sup__intro { margin-top: 12px !important; font-size: 16px; }
.jgg-sup--inline .jgg-sup__form { gap: 12px; }
.jgg-sup--inline .jgg-sup__freq span { min-height: 46px; font-size: 16px; }
.jgg-sup--inline .jgg-sup__amounts span { min-height: 60px; font-size: 18px; }
.jgg-sup.jgg-sup--inline .jgg-sup__btn { min-height: 56px; font-size: 18px; }
.jgg-sup--inline .jgg-sup__secure { font-size: 13px; }
/* No rainbow line on the in-article card: it sits inside the article, so it stays quiet. */
.jgg-sup.jgg-sup--inline::before { content: none; }
@container (min-width: 640px) {
	/* Desktop: compact – about two-thirds of the height. */
	.jgg-sup--inline .jgg-sup__inner {
		grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
		gap: 28px;
		padding: 24px 26px 20px;
		align-items: center;
	}
	.jgg-sup.jgg-sup--inline .jgg-sup__title { margin-top: 8px; font-size: 24px; }
	.jgg-sup--inline .jgg-sup__intro { margin-top: 8px !important; font-size: 15px; line-height: 1.5; }
	.jgg-sup--inline .jgg-sup__form { gap: 10px; }
	.jgg-sup--inline .jgg-sup__freq span { min-height: 40px; font-size: 15px; }
	.jgg-sup--inline .jgg-sup__amounts span { min-height: 46px; font-size: 17px; }
	.jgg-sup.jgg-sup--inline .jgg-sup__btn { min-height: 50px; font-size: 17px; }
	.jgg-sup--inline .jgg-sup__impact { margin-top: 12px; }
	.jgg-sup--inline .jgg-sup__impact ul { display: flex; flex-wrap: wrap; gap: 6px; }
	.jgg-sup--inline .jgg-sup__impact li { margin: 0 !important; font-size: 13px; }
}

/* ==========================================================================
   Band – full-width dark strip (e.g. above the footer). Black, white and yellow.
   ========================================================================== */

.jgg-sup--band {
	--ink: #fff;
	--text: #d6d6d6;
	--muted: #a8a8a8;
	--line: #333;
	--bg: #111;
	--tile-line: #4a4a4a;
	--hover: #222;
	--sel-bg: var(--yellow);
	--sel-fg: #111;
	--btn-bg: var(--yellow);
	--btn-fg: #111;
	--btn-hover: #fff36b;
	--red: #ff6b6b;
	margin: 0;
	border: 0;
}
.jgg-sup--band::before { inset: 0 0 auto; }
.jgg-sup--band .jgg-sup__inner { gap: 28px; max-width: 1240px; margin: 0 auto; padding: 48px 24px 40px; }
.jgg-sup--band .jgg-sup__eyebrow { color: var(--yellow); }
.jgg-sup.jgg-sup--band .jgg-sup__title { margin-top: 12px; font-size: clamp(30px, 4cqi, 46px); line-height: 1.05; }
.jgg-sup--band .jgg-sup__intro { margin-top: 14px !important; font-size: 17px; }
.jgg-sup--band .jgg-sup__preview { color: #111; }
.jgg-sup--band .jgg-sup__form { gap: 14px; }
.jgg-sup--band .jgg-sup__amounts span { min-height: 56px; }
.jgg-sup--band .jgg-sup__freq input:focus-visible + span,
.jgg-sup--band .jgg-sup__amounts input:focus-visible + span { outline-color: var(--yellow); box-shadow: inset 0 0 0 2px #111; }
.jgg-sup.jgg-sup--band .jgg-sup__cur { background-color: #1c1c1c; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E"); }
.jgg-sup--band .jgg-sup__cur option { background: #111; color: #fff; }
.jgg-sup.jgg-sup--band .jgg-sup__btn:focus-visible { outline-color: var(--yellow); box-shadow: 0 0 0 3px #111; }
.jgg-sup.jgg-sup--band .jgg-sup__btn[aria-disabled="true"] { background: #4a4a4a; color: #ddd; }
@container (min-width: 900px) {
	.jgg-sup--band .jgg-sup__inner {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
		gap: 64px;
		align-items: center;
		padding: 56px 48px 48px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.jgg-sup * { transition: none !important; }
}

/* "Your donation helps fund" – three small tags under the intro. */
.jgg-sup__impact { margin-top: 18px; }
.jgg-sup .jgg-sup__impact-title { margin: 0 0 8px; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.jgg-sup__impact ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.jgg-sup__impact li { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 6px 10px 6px 8px; border: 1px solid var(--ink); font-size: 14px; font-weight: 600; line-height: 1.2; color: var(--ink); }
.jgg-sup__impact li::before { content: none; }
.jgg-sup__impact svg { flex: none; color: var(--ink); }
.jgg-sup--sidebar .jgg-sup__impact li { font-size: 13px; padding: 5px 8px 5px 6px; }
.jgg-sup--band .jgg-sup__impact li { border-color: #555; }


/* Rainbow Donate: heart + label are white; one brand-rainbow layer is multiplied over both, so the colours
   flow from the heart straight through the text (black stays black, white takes the colour).
   Dark buttons only – the band keeps its yellow button. */
.jgg-sup__btn-grad { position: relative; display: inline-flex; align-items: center; gap: 10px; }
.jgg-sup:not(.jgg-sup--band) .jgg-sup__btn,
.jgg-sup:not(.jgg-sup--band) .jgg-sup__btn:hover { color: #fff; }
.jgg-sup.jgg-sup:not(.jgg-sup--band) .jgg-sup__btn:not([aria-disabled="true"]),
.jgg-sup.jgg-sup:not(.jgg-sup--band) .jgg-sup__btn:not([aria-disabled="true"]):hover { background: #000; } /* pure black: anything lighter would tint the rainbow layer */
.jgg-sup:not(.jgg-sup--band) .jgg-sup__btn-grad::after { content: ""; position: absolute; inset: -3px -2px; background: linear-gradient(90deg, #13a160 0%, #0dc2ee 18%, #9e12a8 40%, #ef5ba1 56%, #e61818 70%, #eb740b 85%, #f6eb4a 100%); mix-blend-mode: multiply; pointer-events: none; }
.jgg-sup:not(.jgg-sup--band) .jgg-sup__btn[aria-disabled="true"] .jgg-sup__btn-grad::after { content: none; }
.jgg-sup--band .jgg-sup__btn-grad { color: inherit; }
