/* Payment-method row, classic and Blocks checkout alike. */
.chari-pay-method-label {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

/* <picture> is inline by default and would sit on the text baseline. */
.chari-pay-method-picture {
	display: inline-flex;
	align-items: center;
	vertical-align: middle;
	line-height: 0;
}

/*
 * Two classes deep on purpose: WooCommerce's own `.woocommerce img { height:
 * auto; max-width: 100% }` outranks a single class, and an SVG with no
 * intrinsic size inside a shrink-wrapped <picture> then collapses to 0x0 —
 * the wordmark silently vanished from the Blocks checkout. The explicit
 * width keeps the wordmark's 1829:495 ratio at 22px tall.
 */
.chari-pay-method-label .chari-pay-method-icon,
.payment_methods .chari-pay-method-icon {
	height: 22px;
	width: 81px;
	max-width: none;
	max-height: none;
	/* Themes that set a float on payment-method images push the wordmark out
	   of the label; this keeps it beside the title where it belongs. */
	float: none;
	display: inline-block;
	vertical-align: middle;
	object-fit: contain;
}

.chari-pay-method-picture {
	flex: 0 0 auto;
}

.chari-pay-badges {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 10px;
}

.chari-pay-badges img {
	height: 20px;
	width: auto;
}

/*
 * The cash code card — the public site's payment-reference card: a white
 * surface with the soft 50px shadow, a tinted status chip, the code set large
 * in a pale-blue well, and the amount in heavy display type under a hairline.
 *
 * White rather than navy so it reads as a receipt the buyer keeps, not as an
 * advert inside the merchant's page. The 1px line keeps its edge on a white
 * theme where the shadow alone would fade out.
 */
.chari-pay-cash-card {
	box-sizing: border-box;
	background: var(--chari-surface);
	color: var(--chari-ink);
	border: 1px solid var(--chari-line);
	border-radius: var(--chari-radius-large);
	box-shadow: var(--chari-shadow-box);
	padding: 26px 28px 24px;
	margin: 20px 0 28px;
	max-width: 460px;
}

.chari-pay-cash-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}

.chari-pay-cash-card h3 {
	margin: 0;
	padding: 0;
	font-family: var(--chari-font-display);
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.02em;
	color: var(--chari-navy);
	text-transform: none;
}

.chari-pay-cash-status {
	display: inline-flex;
	align-items: center;
	padding: 5px 12px;
	border-radius: var(--chari-radius-pill);
	background: var(--chari-primary-tint);
	/* #B6461F on #FFEAD5 is 4.63:1. */
	color: var(--chari-primary-text);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.3;
	white-space: nowrap;
}

.chari-pay-cash-card p {
	margin: 10px 0 18px;
	font-size: 14px;
	line-height: 1.6;
	color: var(--chari-ink-muted);
}

.chari-pay-cash-code {
	display: flex;
	align-items: center;
	gap: 12px;
	background: var(--chari-section);
	border-radius: var(--chari-radius);
	padding-block: 16px;
	padding-inline: 20px 12px;
}

.chari-pay-cash-code code {
	flex: 1;
	min-width: 0;
	padding: 0;
	font-family: var(--chari-font-mono);
	font-size: 24px;
	font-weight: 700;
	letter-spacing: 0.18em;
	color: var(--chari-navy);
	background: none;
	/* Break between the code's groups, never inside one. */
	overflow-wrap: anywhere;
	/* A code reads left-to-right on an Arabic page too. */
	direction: ltr;
	unicode-bidi: embed;
}

/* The site's navy pill. White on navy is 13.3:1. */
.chari-pay-cash-copy,
.chari-pay-cash-copy:hover,
.chari-pay-cash-copy:focus {
	flex: 0 0 auto;
	min-height: 40px;
	margin: 0;
	padding: 0 18px;
	border: 0;
	border-radius: var(--chari-radius-pill);
	background: var(--chari-navy);
	color: #ffffff;
	font-family: var(--chari-font);
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	cursor: pointer;
}

.chari-pay-cash-copy:hover {
	background: var(--chari-navy-deep);
}

.chari-pay-cash-copy:focus-visible {
	outline: 2px solid var(--chari-primary);
	outline-offset: 3px;
}

.chari-pay-cash-facts {
	display: grid;
	grid-template-columns: max-content 1fr;
	align-items: baseline;
	gap: 8px 20px;
	margin: 18px 0 0;
	padding-top: 16px;
	border-top: 1px solid var(--chari-line);
	font-size: 14px;
}

.chari-pay-cash-facts dt {
	margin: 0;
	font-weight: 400;
	color: var(--chari-ink-muted);
}

.chari-pay-cash-facts dd {
	margin: 0;
	color: var(--chari-ink);
	font-weight: 500;
}

/* The amount is the second thing a buyer at the counter needs after the code. */
.chari-pay-cash-facts dd:first-of-type {
	font-family: var(--chari-font-display);
	font-size: 18px;
	font-weight: 800;
	letter-spacing: -0.01em;
	color: var(--chari-navy);
}

@media (max-width: 480px) {
	.chari-pay-cash-card {
		padding: 22px 18px 20px;
	}

	/* The code gets the full width; the copy pill drops beneath it. */
	.chari-pay-cash-code {
		flex-direction: column;
		align-items: stretch;
		padding-inline: 16px;
		text-align: center;
	}

	.chari-pay-cash-code code {
		font-size: 22px;
		letter-spacing: 0.12em;
	}
}
