/*
 * CW Request Quote — storefront: the floating nudge + the basket button.
 *
 * ⚠ WHY THIS IS BLUE, NOT LIME. The token file quarantines --cw-rewards to
 * "rewards and money zones" and says it must not appear elsewhere. Asking a
 * branch to price a basket IS money, and the owner chose this blue on
 * 2026-09-04 after seeing it beside grey and olive alternatives. Two reasons
 * it is right here rather than a slip:
 *
 *   1. This card floats directly above FunnelKit's cart bubble, which is
 *      itself --cw-lime. A lime action there was green on green, and the
 *      earlier version compounded it with a lime left edge and a lime-washed
 *      icon chip: three greens fighting each other and the bubble.
 *   2. A quote is not an add-to-cart. Blue keeps the two actions telling the
 *      truth about what they do.
 *
 * So: do NOT "restore" lime here. The quote flow — this nudge, the basket
 * button, the request form and the tracking page — is one blue action.
 *
 * Radius is 8px throughout: the system's own (52 uses across the theme
 * against 14px's 27). Units are PX on purpose — Bricks sets
 * html { font-size: 62.5% }, so rem is 10px on this site and any rem value
 * copied from a normal design is wrong.
 */
.cwrq-nudge,
.cwrq-cart-cta {
	--cwrq-blue: var(--cw-rewards, #185aa6);
	--cwrq-blue-deep: var(--cw-rewards-deep, #12467f);
	--cwrq-blue-tint: var(--cw-rewards-tint, #e9f1fa);
	--cwrq-blue-line: var(--cw-rewards-line, #cdddf0);
	--cwrq-ink: var(--cw-ink, #263238);
	--cwrq-ink-2: var(--cw-ink-2, #52575a);
	--cwrq-grey: var(--cw-grey, #6b6b6b);
	--cwrq-faint: var(--cw-faint, #9a9a94);
	--cwrq-line: var(--cw-line, #e7e5df);
	--cwrq-line-2: var(--cw-line-2, #d6d3ca);
	--cwrq-ground: var(--cw-ground, #f7f7f5);
	--cwrq-card: var(--cw-card, #ffffff);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	box-sizing: border-box;
}
.cwrq-nudge *,
.cwrq-cart-cta * { box-sizing: border-box; }

/* ── The nudge ─────────────────────────────────────────────────────────── */
.cwrq-nudge {
	position: fixed;
	right: 36px;
	bottom: 120px; /* clears FunnelKit's 72px bubble at bottom:36px */
	z-index: 999996; /* above fkcart (10999) + PWA bar (99990); below the mobile bar (999999) */
	width: 320px;
	max-width: calc(100vw - 24px);
	background: var(--cwrq-card);
	color: var(--cwrq-ink);
	border: 1px solid var(--cwrq-line);
	border-radius: 8px;
	box-shadow: 0 10px 30px rgba(38, 50, 56, .14), 0 2px 6px rgba(0, 0, 0, .06);
	padding: 14px 16px 13px;
	opacity: 0;
	transform: translateY(12px) scale(.98);
	transition: opacity .28s ease, transform .28s ease;
	pointer-events: none;
}
.cwrq-nudge.is-in {
	opacity: 1;
	transform: none;
	pointer-events: auto;
}
.cwrq-nudge__row {
	display: flex;
	align-items: flex-start;
	gap: 11px;
}
.cwrq-nudge__icon {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	border-radius: 8px;
	background: var(--cwrq-blue-tint);
	border: 1px solid var(--cwrq-blue-line);
	color: var(--cwrq-blue);
	display: grid;
	place-items: center;
}
.cwrq-nudge__icon svg {
	width: 18px;
	height: 18px;
	display: block;
}
.cwrq-nudge__title {
	margin: 0;
	font-size: 15px;
	font-weight: 800;
	line-height: 1.25;
	color: var(--cwrq-ink);
}
.cwrq-nudge__body {
	margin: 5px 0 0;
	font-size: 13px;
	line-height: 1.45;
	color: var(--cwrq-ink-2);
}
.cwrq-nudge__actions {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 13px;
}
.cwrq-nudge__close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 26px;
	height: 26px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--cwrq-faint);
	font-size: 15px;
	line-height: 1;
	cursor: pointer;
}
.cwrq-nudge__close:hover { background: var(--cwrq-ground); color: var(--cwrq-ink); }
.cwrq-nudge__later {
	border: 0;
	background: transparent;
	color: var(--cwrq-grey);
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	padding: 8px 4px;
}
.cwrq-nudge__later:hover { color: var(--cwrq-ink); text-decoration: underline; }

/* ── Buttons (shared) ──────────────────────────────────────────────────── */
.cwrq-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	border: 1.5px solid transparent;
	border-radius: 8px;
	font-family: inherit;
	font-weight: 800;
	font-size: 13.5px;
	line-height: 1.2;
	padding: 10px 18px;
	text-decoration: none !important;
	cursor: pointer;
	transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.cwrq-btn--primary {
	background: var(--cwrq-blue);
	color: #fff !important;
}
.cwrq-btn--primary:hover { background: var(--cwrq-blue-deep); color: #fff !important; }
.cwrq-btn--ghost {
	background: #fff;
	border-color: var(--cwrq-line-2);
	color: var(--cwrq-ink-2) !important;
}
.cwrq-btn--ghost:hover { border-color: var(--cwrq-blue); color: var(--cwrq-blue) !important; }

/* ── Basket button ─────────────────────────────────────────────────────── */
.cwrq-cart-cta {
	margin-top: 10px;
}
.cwrq-cart-cta .cwrq-btn {
	width: 100%;
	padding: 12px 18px;
}
.cwrq-cart-cta__hint {
	margin: 8px 0 0;
	font-size: 12px;
	line-height: 1.45;
	color: var(--cwrq-blue);
	background: var(--cwrq-blue-tint);
	border: 1px solid var(--cwrq-blue-line);
	border-radius: 8px;
	padding: 8px 10px;
}
.cwrq-cart-cta--side { padding: 0 0 10px; }

/* Already requested — a quiet receipt, not another offer. */
.cwrq-cart-cta__sent {
	display: flex;
	align-items: baseline;
	gap: 6px;
	margin: 0 0 8px;
	font-size: 13px;
	font-weight: 800;
	line-height: 1.4;
	color: var(--cwrq-blue);
}
.cwrq-tick {
	flex: 0 0 auto;
	display: inline-grid;
	place-items: center;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--cwrq-blue);
	color: #fff;
	font-size: 11px;
	font-weight: 900;
}
.cwrq-cart-cta--sent .cwrq-cart-cta__hint {
	background: transparent;
	border: 0;
	padding: 6px 0 0;
	color: var(--cwrq-grey);
}

/* ── Mobile: sit above the theme's bottom tab bar ─────────────────────── */
@media (max-width: 767px) {
	.cwrq-nudge {
		right: 12px;
		left: 12px;
		width: auto;
		bottom: calc(58px + env(safe-area-inset-bottom, 0px) + 10px);
	}
	.cwrq-nudge.has-sticky-bar {
		bottom: calc(58px + env(safe-area-inset-bottom, 0px) + 74px);
	}
}
@media (prefers-reduced-motion: reduce) {
	.cwrq-nudge { transition: none; }
}
