/**
 * DKM Cashback.
 *
 * One line, written like the price's "you save" line under it: the shop's
 * text, with the coin and the amount in the saving green, so the two read as
 * a pair - what this costs less, and what it pays back.
 */

.wcg-cb {
	/* Green 700, the saving text colour: green 500 fails AA as text. */
	--wcg-cb-accent: var(--text-success);
	/* The log in link is interface, so it takes the shop's interactive blue -
	   the Elementor global Secondary - like the wishlist's Link style. */
	--wcg-cb-link: var(--text-link);

	display: block;
	margin: 0;
	padding: 0;
}

.wcg-cb .wcg-cb__line {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	color: inherit;
	font: inherit;
	line-height: 1.4;
}

.wcg-cb__icon {
	width: 1.25em;
	height: 1.25em;
	flex: none;
	color: var(--wcg-cb-accent);
}

.wcg-cb__amount {
	color: var(--wcg-cb-accent);
	font-weight: 700;
	white-space: nowrap;
}

/* Doubled: a theme reaches links as `.elementor a` or `.woocommerce a`. */
.wcg-cb .wcg-cb__login.wcg-cb__login {
	color: var(--wcg-cb-link);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.wcg-cb .wcg-cb__login.wcg-cb__login:hover {
	color: color-mix(in oklab, var(--wcg-cb-link), var(--text-primary) 15%);
	text-decoration: underline;
}

/* The chip: the same line on a pale green pill, as wide as its words. */
.wcg-cb--chip .wcg-cb__line {
	display: inline-flex;
	max-width: 100%;
	padding: 4px 12px 4px 10px;
	border-radius: var(--radius-full);
	background: var(--bg-success);
	font-size: 0.92em;
}
