/**
 * Get Cash - front-end styles. The theme wins: fonts and colors inherit, defaults sit in
 * zero-specificity :where(), and every value is an overridable --getcash-* property.
 */

.getcash {
	/* Fallbacks first - overridden by color-mix below where supported. */
	--getcash-line: rgba(127, 127, 127, 0.32);
	--getcash-surface: rgba(127, 127, 127, 0.06);
	--getcash-surface-strong: rgba(127, 127, 127, 0.12);

	--getcash-brand: currentColor;
	--getcash-radius: 14px;
	--getcash-radius-sm: 8px;
	--getcash-gap: 1em;
	--getcash-qr-size: 180px;
	--getcash-width: 40em;

	display: block;
	max-width: 100%;
	margin-block: 1.5em;
	box-sizing: border-box;
}

@supports (color: color-mix(in srgb, currentColor 10%, transparent)) {
	.getcash {
		--getcash-line: color-mix(in srgb, currentColor 22%, transparent);
		--getcash-surface: color-mix(in srgb, currentColor 5%, transparent);
		--getcash-surface-strong: color-mix(in srgb, currentColor 11%, transparent);
	}
}

.getcash *,
.getcash *::before,
.getcash *::after {
	box-sizing: inherit;
}

/* Fallback for themes that don't define it; zero specificity, so a theme's own wins. */
:where(.getcash .screen-reader-text) {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	border: 0;
	white-space: nowrap;
}

/* Brand accents. Used for thin accents only - never for body text. */
.getcash--cashapp {
	--getcash-brand: #00d54b;
}
.getcash--venmo {
	--getcash-brand: #008cff;
}
.getcash--paypal {
	--getcash-brand: #0070ba;
}
.getcash--zelle {
	--getcash-brand: #6d1ed4;
}

/* ---------------------------------------------------------------------------
 * Card
 * ------------------------------------------------------------------------- */

.getcash__card {
	display: flex;
	flex-direction: column;
	gap: var(--getcash-gap);
	max-width: var(--getcash-width);
	margin-inline: auto;
	padding: 1.5em;
	border: 1px solid var(--getcash-line);
	border-radius: var(--getcash-radius);
	background: var(--getcash-surface);
	text-align: center;
}

.getcash--plain .getcash__card {
	padding: 0;
	border: 0;
	background: none;
}

.getcash--shadow .getcash__card {
	box-shadow:
		0 1px 2px rgba(0, 0, 0, 0.06),
		0 8px 24px rgba(0, 0, 0, 0.08);
}

.getcash__header {
	display: flex;
	flex-direction: column;
	gap: 0.25em;
}

:where(.getcash__title) {
	margin: 0;
	font-size: 1.15em;
	line-height: 1.3;
	font-weight: 600;
}

:where(.getcash__subtitle) {
	margin: 0;
	font-size: 0.9em;
	opacity: 0.75;
	line-height: 1.45;
}

/* ---------------------------------------------------------------------------
 * Amount chips - the main conversion control
 * ------------------------------------------------------------------------- */

.getcash__amounts {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5em;
}

.getcash__chip {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 3.4em;
	min-height: 2.6em; /* comfortable tap target */
	margin: 0;
	padding: 0.45em 0.9em;
	border: 1px solid var(--getcash-line) !important;
	border-radius: 999px;
	background: transparent !important;
	color: inherit !important;
	font: inherit;
	/* The amount is the decision on this card, so it is the largest thing on it. */
	font-size: 1.15em;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
	cursor: pointer;
	transition:
		border-color 0.15s ease,
		background-color 0.15s ease,
		transform 0.15s ease;
}

.getcash__chip:hover {
	border-color: var(--getcash-brand);
	background: var(--getcash-surface-strong);
}

/* Background and text color are set as a pair, and must win over theme styles */
.getcash__chip[aria-pressed="true"] {
	border-color: var(--getcash-brand) !important;
	box-shadow: inset 0 0 0 2px var(--getcash-brand) !important;
	background: var(--getcash-surface-strong) !important;
	color: inherit !important;
	font-weight: 700;
}

/* Chips, tabs and copy buttons draw their own selected ring. Many themes add an
   outline or ring to every focused button, which stacks a second border on top
   after a click and stays until focus moves elsewhere. Drop it for mouse and
   touch focus only; keyboard focus gets one brand ring below. */
.getcash__chip:focus:not(:focus-visible),
.getcash__tab:focus:not(:focus-visible),
.getcash__copy:focus:not(:focus-visible) {
	outline: none;
}

.getcash__chip:not([aria-pressed="true"]):focus:not(:focus-visible),
.getcash__chip:not([aria-pressed="true"]):focus-visible,
.getcash__tab:not([aria-selected="true"]):focus:not(:focus-visible),
.getcash__tab:not([aria-selected="true"]):focus-visible,
.getcash__copy:focus:not(:focus-visible),
.getcash__copy:focus-visible {
	box-shadow: none;
}

.getcash__chip:focus-visible,
.getcash__copy:focus-visible {
	outline: 2px solid var(--getcash-brand);
	outline-offset: 2px;
}

/* The badge sits above the chip; themes that give buttons overflow: hidden cut it off. */
.getcash .getcash__chip--popular {
	overflow: visible !important;
}

.getcash__chip--popular::after {
	content: attr(data-badge);
	position: absolute;
	inset-block-start: -0.85em;
	inset-inline-start: 50%;
	transform: translateX(-50%);
	padding: 0.15em 0.6em;
	border-radius: 999px;
	background: var(--getcash-brand);
	color: #fff;
	font-size: 0.62em;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	white-space: nowrap;
}

/* Keep room for the floating badge. */
.getcash__amounts:has(.getcash__chip--popular) {
	margin-block-start: 0.85em;
}

.getcash__chip--custom {
	gap: 0.1em;
	padding-inline: 0.75em;
	cursor: text;
}

.getcash__chip--custom .getcash__currency {
	opacity: 0.6;
}

.getcash .getcash__custom-input {
	width: 3.6em;
	height: inherit;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	font-size: 1em;
	line-height: 1.2;
	text-align: center;
	box-shadow: none;
	-moz-appearance: textfield;
	appearance: textfield;
}

.getcash__custom-input::-webkit-outer-spin-button,
.getcash__custom-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Focus shows on the chip around it (:focus-within below), not as a second box inside. */
.getcash .getcash__custom-input:focus {
	border: 0;
	outline: none;
	background: none;
	box-shadow: none;
}

.getcash__chip--custom:focus-within {
	border-color: var(--getcash-brand);
	box-shadow: inset 0 0 0 1px var(--getcash-brand);
}

/* ---------------------------------------------------------------------------
 * Actions - QR + button. Phones: button first (can't scan your own screen); larger
 * screens: QR first. Pure CSS, so it survives full-page caching.
 * ------------------------------------------------------------------------- */

.getcash__actions {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--getcash-gap);
}

.getcash__qr {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5em;
	margin: 0;
}

.getcash__qr-link {
	display: inline-block;
	padding: 0.75em;
	border: 1px solid var(--getcash-line);
	border-radius: var(--getcash-radius-sm);
	background: #fff; /* QR codes need a light quiet zone to stay scannable. */
	line-height: 0;
	text-decoration: none;
	box-shadow: none;
}

.getcash__qr-link:focus-visible {
	outline: 2px solid var(--getcash-brand);
	outline-offset: 2px;
}

.getcash__qr-canvas {
	display: block;
	width: var(--getcash-qr-size);
	height: var(--getcash-qr-size);
}

.getcash__qr-canvas canvas,
.getcash__qr-canvas img,
.getcash__qr-canvas svg {
	display: block;
	width: 100% !important; /* themes commonly force img width; QR must stay square */
	height: auto !important;
	max-width: none !important;
	margin: 0;
	border-radius: 0;
	box-shadow: none;
}

.getcash__qr-canvas--pending {
	background: var(--getcash-surface-strong);
	border-radius: var(--getcash-radius-sm);
}

:where(.getcash__hint) {
	margin: 0;
	font-size: 0.85em;
	line-height: 1.4;
	opacity: 0.75;
}

/* One caption, two wordings: CSS picks which one applies. */
.getcash__hint--desktop {
	display: block;
}
.getcash__hint--mobile {
	display: none;
}

.getcash__cta-wrap {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.4em;
	width: 100%;
}

/* Zero-specificity defaults: any theme button rule beats these. */
:where(.getcash__cta) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.55em;
	padding: 0.8em 1.5em;
	border-radius: 0.4em;
	text-decoration: none;
	font-weight: 600;
	line-height: 1.2;
}

.getcash__cta {
	max-width: 100%;
	cursor: pointer;
	text-decoration: none !important;
}

/* Logo, label and amount always on one line. */
.getcash .getcash__cta {
	display: inline-flex !important;
	flex-direction: row !important;
	flex-wrap: nowrap !important;
	align-items: center !important;
	white-space: nowrap !important;
	/* Grows to its full text, past the card's edge if it must, rather than cut it. */
	min-width: max-content !important;
}

/* Full-width buttons (PRO setting): every button fills its card. */
.getcash--full .getcash__cta-wrap {
	align-items: stretch;
}
.getcash.getcash--full .getcash__cta {
	display: flex !important;
	width: 100%;
	justify-content: center;
}

.getcash .getcash__cta-icon {
	display: block !important;
	width: 1.35em;
	height: 1.35em;
	margin: 0 !important;
	border-radius: 0.28em;
	flex: 0 0 auto;
	object-fit: contain;
}

.getcash__cta-label {
	flex: 0 0 auto;
	margin-left: 3px;
}

/* Filled buttons (PRO): brand is the default, dark and light on request. */
.getcash .getcash__cta--brand {
	background-color: var(--getcash-brand) !important;
	background-image: none !important;
	border-color: var(--getcash-brand) !important;
	color: #fff !important;
}

.getcash .getcash__cta--dark {
	background-color: #1d2327 !important;
	background-image: none !important;
	border-color: #1d2327 !important;
	color: #fff !important;
}

.getcash .getcash__cta--light {
	background-color: #fff !important;
	background-image: none !important;
	border-color: rgba(0, 0, 0, 0.15) !important;
	color: #1d2327 !important;
}

.getcash .getcash__cta--brand:hover,
.getcash .getcash__cta--brand:focus,
.getcash .getcash__cta--dark:hover,
.getcash .getcash__cta--dark:focus,
.getcash .getcash__cta--light:hover,
.getcash .getcash__cta--light:focus {
	filter: brightness(0.9);
}

.getcash .getcash__cta--free {
	background-color: transparent;
	background-image: none;
	border: 1px solid currentColor;
	color: inherit;
	box-shadow: none;
}

.getcash .getcash__cta--free:hover,
.getcash .getcash__cta--free:focus {
	background-color: var(--getcash-surface-strong);
	color: inherit;
}

.getcash__reassurance {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	font-size: 0.8em;
	opacity: 0.7;
}

/* ---------------------------------------------------------------------------
 * Goal progress
 * ------------------------------------------------------------------------- */

.getcash__goal {
	display: flex;
	flex-direction: column;
	gap: 0.4em;
	text-align: start;
}

.getcash__goal-track {
	height: 0.6em;
	border-radius: 999px;
	background: var(--getcash-surface-strong);
	overflow: hidden;
}

.getcash__goal-fill {
	display: block;
	height: 100%;
	width: var(--getcash-progress, 0%);
	border-radius: inherit;
	background: var(--getcash-brand);
	transition: width 0.6s ease;
}

.getcash__goal-meta {
	display: flex;
	justify-content: space-between;
	gap: 1em;
	font-size: 0.85em;
	line-height: 1.3;
}

.getcash__goal-meta strong {
	font-weight: 700;
}

/* ---------------------------------------------------------------------------
 * Copyable detail rows (Zelle and bank-style methods)
 * ------------------------------------------------------------------------- */

.getcash__details {
	display: flex;
	flex-direction: column;
	gap: var(--getcash-gap);
}

/* A Zelle code is scanned from inside a banking app, so it is never a link. */
.getcash__qr--static .getcash__qr-link {
	cursor: default;
}

.getcash__qr-image {
	display: block;
	width: var(--getcash-qr-size) !important;
	height: auto !important;
	max-width: none !important;
	margin: 0;
	border-radius: 0;
	box-shadow: none;
}

.getcash__rows {
	display: flex;
	flex-direction: column;
	gap: 0.5em;
	margin: 0;
	padding: 0;
	list-style: none;
	text-align: start;
}

.getcash__row {
	display: flex;
	align-items: center;
	gap: 0.75em;
	margin: 0;
	padding: 0.65em 0.85em;
	border: 1px solid var(--getcash-line);
	border-radius: var(--getcash-radius-sm);
	background: var(--getcash-surface);
}

.getcash__row::before {
	content: none;
}

.getcash__row-label {
	flex: 0 0 auto;
	font-size: 0.8em;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	opacity: 0.65;
}

.getcash__row-value {
	flex: 1 1 auto;
	min-width: 0;
	overflow-wrap: anywhere;
	font-weight: 600;
	text-align: end;
}

.getcash__copy {
	flex: 0 0 auto;
	margin: 0;
	padding: 0.35em 0.75em;
	border: 1px solid var(--getcash-line) !important;
	border-radius: 999px;
	background: transparent !important;
	color: inherit !important;
	font: inherit;
	font-size: 0.8em;
	line-height: 1.2;
	cursor: pointer;
}

.getcash__copy:hover {
	border-color: var(--getcash-brand);
}
.getcash__copy.is-copied {
	border-color: var(--getcash-brand);
	font-weight: 700;
}

/* Method tabs - ARIA tabs in [get-cash]; label-wrapped radios in [get-cash-form] so the form submits without JavaScript. Same look either way. */

.getcash__tabs {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5em;
	margin: 0;
	padding: 0;
	border: 0;
	list-style: none;
}

.getcash__tab {
	display: inline-flex;
	align-items: center;
	gap: 0.45em;
	min-height: 2.75em;
	margin: 0;
	padding: 0.5em 0.9em;
	border: 1px solid var(--getcash-line) !important;
	border-radius: 999px;
	background: transparent !important;
	color: inherit !important;
	font: inherit;
	font-size: 0.92em;
	line-height: 1.2;
	text-align: start;
	cursor: pointer;
	transition:
		border-color 0.15s ease,
		background-color 0.15s ease;
	white-space: nowrap;
	overflow-wrap: normal;
	word-break: keep-all;
	hyphens: none;
}

.getcash__tab:hover {
	border-color: var(--getcash-brand);
	background: var(--getcash-surface);
}

.getcash__tab img {
	width: 1.4em;
	height: 1.4em;
	border-radius: 0.25em;
	object-fit: contain;
}

/* The radio itself stays in the accessibility tree but out of the way. */
.getcash__tab input[type="radio"] {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	border: 0;
	white-space: nowrap;
}

/* Must win over theme button rules, as on .getcash__chip[aria-pressed="true"]. */
.getcash__tab[aria-selected="true"],
.getcash__tab.is-selected {
	border-color: var(--getcash-brand) !important;
	box-shadow: inset 0 0 0 1px var(--getcash-brand) !important;
	background: var(--getcash-surface-strong) !important;
	color: inherit !important;
	font-weight: 700;
}

.getcash__tab:has(input:checked) {
	border-color: var(--getcash-brand);
	box-shadow: inset 0 0 0 1px var(--getcash-brand);
	background: var(--getcash-surface-strong);
	color: inherit;
	font-weight: 700;
}

.getcash__tab:focus-visible {
	outline: 2px solid var(--getcash-brand);
	outline-offset: 2px;
}

.getcash__tab:has(input:focus-visible) {
	outline: 2px solid var(--getcash-brand);
	outline-offset: 2px;
}

.getcash__panel[hidden] {
	display: none;
}

.getcash__panel .getcash__card {
	border: 0;
	padding: 0;
	background: none;
	max-width: none;
}

/* ---------------------------------------------------------------------------
 * Thank-you state
 * ------------------------------------------------------------------------- */

.getcash__thanks {
	padding: 0.9em 1em;
	border: 1px dashed var(--getcash-line);
	border-radius: var(--getcash-radius-sm);
	font-size: 0.95em;
	line-height: 1.45;
}

.getcash__thanks[hidden] {
	display: none;
}

/* ---------------------------------------------------------------------------
 * Status / errors / admin upsell
 * ------------------------------------------------------------------------- */

.getcash__status {
	margin: 0;
	font-size: 0.85em;
	opacity: 0.8;
}

.getcash__status:empty {
	display: none;
}

/* Trademark notice. Small, but it has to stay legible. */
.getcash__legal {
	margin: 0;
	font-size: 0.65em;
	line-height: 1.5;
	letter-spacing: 0.02em;
	opacity: 0.6;
}

/* PRO: the page's single trademark line, printed once in the footer. */
.getcash-legal-footer {
	max-width: var(--getcash-width);
	margin: 1.5em auto;
	padding-inline: 1em;
	text-align: center;
}

.getcash-legal-footer .getcash__legal {
	font-size: 0.75em;
}

.getcash__initial {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.6em;
	height: 1.6em;
	flex: 0 0 auto;
	border: 1px solid var(--getcash-line);
	border-radius: 0.35em;
	background: var(--getcash-surface-strong);
	color: inherit;
	font-size: 0.85em;
	font-weight: 700;
	line-height: 1;
}

.getcash__tab .getcash__initial {
	font-size: 0.8em;
}

.getcash--notice .getcash__card {
	border-style: dashed;
	text-align: start;
	gap: 0.5em;
}

.getcash__notice-tag {
	align-self: flex-start;
	padding: 0.15em 0.6em;
	border-radius: 999px;
	background: var(--getcash-surface-strong);
	font-size: 0.7em;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

/* PRO notices - admins only, always red */

.getcash--notice-pro {
	--getcash-brand: #d63638;
}

.getcash--notice-pro .getcash__card {
	border: 1px solid #d63638;
	border-left-width: 5px;
	background: #fcf0f1;
	color: #3c0d0e;
}

.getcash--notice-pro .getcash__notice-tag {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	background: #f7d7d9;
	color: #8a1f1f;
}

.getcash__notice-pro {
	padding: 0.05em 0.5em;
	border-radius: 999px;
	background: #d63638;
	color: #fff;
}

.getcash--notice-pro .getcash__subtitle {
	color: #3c0d0e;
	opacity: 1;
}

/* Beats the theme's own button colors, as the brand button does. */
.getcash .getcash__cta--pro {
	background-color: #d63638;
	border-color: #d63638;
	color: #fff;
}

.getcash .getcash__cta--pro:hover,
.getcash .getcash__cta--pro:focus {
	background-color: #b32d2e;
	border-color: #b32d2e;
	color: #fff;
}

.getcash .getcash__cta--pro:focus-visible {
	outline: 2px solid #d63638;
	outline-offset: 2px;
}

/* ---------------------------------------------------------------------------
 * Preferences
 * ------------------------------------------------------------------------- */

@media (max-width: 600px) {
	.getcash__card {
		padding: 1.15em;
	}
	.getcash {
		--getcash-qr-size: 150px;
	}

	/* Button first, QR second: you cannot scan a code with the phone showing it. */
	.getcash__qr {
		order: 2;
	}
	.getcash__cta-wrap {
		order: 1;
	}

	/* Same reasoning for Zelle: on a phone, copying the tag is the way to pay. */
	.getcash__details .getcash__qr {
		order: 1;
	}
	.getcash__details .getcash__rows {
		order: 0;
	}
	.getcash__hint--desktop {
		display: none;
	}
	.getcash__hint--mobile {
		display: block;
	}
	.getcash__row {
		flex-wrap: wrap;
	}
	.getcash__row-value {
		text-align: start;
	}
}

@media (prefers-reduced-motion: reduce) {
	.getcash *,
	.getcash *::before,
	.getcash *::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}

@media print {
	.getcash {
		--getcash-qr-size: 220px;
	}
	.getcash__cta-wrap,
	.getcash__amounts,
	.getcash__copy,
	.getcash__thanks {
		display: none !important;
	}
	.getcash__card {
		border-color: #000;
		background: none;
		box-shadow: none;
	}
	.getcash__hint--mobile {
		display: none;
	}
	.getcash__hint--desktop {
		display: block;
	}
}

/* ---------------------------------------------------------------------------
 * Amount chips on every card, and the wallet tabs of [get-cash] and [get-cash-form],
 * in brand color. Wallet tabs use their own wallet's color
 * (getcash--<id> on each tab); amount chips use the card's wallet,
 * or the selected one (get-cash.js brandTab, form.js brandScope).
 * ------------------------------------------------------------------------- */

.getcash .getcash__chip,
.getcash--panel .getcash__tab,
.getcash--form .getcash__tab {
	border: 1px solid var(--getcash-brand) !important;
	background: transparent !important;
	box-shadow: none !important;
	color: var(--getcash-brand) !important;
	opacity: 0.7 !important;
	transition:
		opacity 0.15s ease,
		background-color 0.15s ease,
		color 0.15s ease !important;
}

.getcash .getcash__chip:hover,
.getcash--panel .getcash__tab:hover,
.getcash--form .getcash__tab:hover {
	opacity: 1 !important;
}

.getcash .getcash__chip[aria-pressed="true"],
.getcash .getcash__chip:focus-visible,
.getcash .getcash__chip--custom:focus-within,
.getcash--panel .getcash__tab[aria-selected="true"],
.getcash--panel .getcash__tab:focus-visible,
.getcash--form .getcash__tab.is-selected {
	border-color: var(--getcash-brand) !important;
	background: var(--getcash-brand) !important;
	box-shadow: none !important;
	color: #fff !important;
	opacity: 1 !important;
}

.getcash--form .getcash__tab:has(input:checked),
.getcash--form .getcash__tab:has(input:focus-visible) {
	border-color: var(--getcash-brand) !important;
	background: var(--getcash-brand) !important;
	box-shadow: none !important;
	color: #fff !important;
	opacity: 1 !important;
}

/* The "Other" input follows the chip's text color, filled or not. */
.getcash .getcash__custom-input {
	color: inherit !important;
}

.getcash .getcash__custom-input::placeholder {
	color: inherit;
	opacity: 0.8;
}
