/*
 * QA-5 (LEAD 6793767817, Ira's test order): the gift offer line ("A small gift with your first order — and with every order from 500 MDL, together
 * with free delivery.") was too quiet in the cart and the checkout: 13px muted grey, no mark. It is now a small card that is read first: bigger and
 * bold, an olive accent edge, a gift icon. The wording is unchanged (ra_first_order_offer_line()).
 *
 * Two surfaces, one look: the cart prints `p.ra-first-order-offer` (mu-plugin ra-first-order.php), the checkout's order block prints
 * `p.ra-co-order__offer` (review-order.php). Loaded on both, after checkout.css. The colours are pinned with two `:not(#id)` (2,3,0): the parent's
 * colour sheets are printed after the child's and tie with class-only rules (see thankyou.css, THANKYOU-PAY-02), and its dark scheme repaints text.
 *
 * The colours are the redesign's one green (ThemePaletteSheetTest): the olive #4F6145 as text and edge on a warm latte tint in light, the light olive
 * #A9BF9C on a near-black olive in dark. Contrast (computed in tests/themes/OrderFlowOfferTipTest.php): light, text #4F6145 on #F1EADC 5.61:1, the edge
 * on the ivory checkout card #FFFDF9 6.61:1; dark, text #A9BF9C on #2A2D26 7.07:1 (the edge on the dark ground rgb(18, 17, 16) 9.54:1).
 */

:root {
	--ra-offer-bg: #F1EADC;
	--ra-offer-ink: #4F6145;
	--ra-offer-edge: #4F6145;
}

html[data-theme="dark"] {
	--ra-offer-bg: #2A2D26;
	--ra-offer-ink: #A9BF9C;
	--ra-offer-edge: #A9BF9C;
}

.woocommerce-cart p.ra-first-order-offer,
.woocommerce-checkout .ra-co p.ra-co-order__offer {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	box-sizing: border-box;
	margin: 0 0 16px;
	padding: 12px 14px;
	border-left: 4px solid var(--ra-offer-edge);
	border-radius: 6px;
	background: var(--ra-offer-bg);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.4;
}

.woocommerce-cart p.ra-first-order-offer:not(#ra-offer-a):not(#ra-offer-b),
.woocommerce-checkout .ra-co p.ra-co-order__offer:not(#ra-offer-a):not(#ra-offer-b) {
	background: var(--ra-offer-bg);
	color: var(--ra-offer-ink);
}

/* The gift icon: decoration only (the second declaration gives it an empty accessible name where the browser supports it). */
.woocommerce-cart p.ra-first-order-offer::before,
.woocommerce-checkout .ra-co p.ra-co-order__offer::before {
	content: "\1F381";
	content: "\1F381" / "";
	flex: none;
	font-size: 20px;
	font-weight: 400;
	line-height: 1.2;
}

.woocommerce-cart p.ra-first-order-offer {
	margin-top: 0;
}
