/* Caveman Special Discount — front end */
:root {
	--csd-accent: #d6372b;
	--csd-ok: #3aa65c;
}

/* Line prices in the basket */
.csd-item-price del,
.csd-item-subtotal del { opacity: .55; margin-right: .35em; }
.csd-item-price ins,
.csd-item-subtotal ins { text-decoration: none; font-weight: 600; }

.csd-pct {
	display: inline-block; margin-left: .4em; padding: .1em .45em; border-radius: 3px;
	font-size: .72em; font-weight: 700; line-height: 1.4; letter-spacing: .02em;
	background: var(--csd-accent); color: #fff; vertical-align: middle;
}

/* Totals rows */
.csd-total th, .csd-total td { color: var(--csd-accent); font-weight: 600; }

.csd-tick { width: .85em; height: .85em; stroke: currentColor; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.08em; margin-right: .3em; }
.csd-active { color: var(--csd-ok); font-weight: 600; font-size: .85em; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.csd-remove { font-size: .85em; opacity: .7; margin-left: .4em; }

/* Code chip */
.csd-code-chip {
	display: inline-flex; align-items: center; gap: .5em;
	background: rgba(0,0,0,.35); border: 1px dashed rgba(255,255,255,.45); border-radius: 4px;
	padding: .3em .7em; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .95em; letter-spacing: .12em; color: inherit;
}
.csd-chip-apply, .csd-bar-apply, .csd-badge-apply {
	font-family: inherit; font-size: .8em; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
	color: var(--csd-accent) !important; text-decoration: none !important; white-space: nowrap;
}
.csd-chip-apply { border-left: 1px solid rgba(255,255,255,.3); padding-left: .6em; }
.csd-chip-apply:hover, .csd-bar-apply:hover, .csd-badge-apply:hover { text-decoration: underline !important; }
.csd-chip-ok { border-left: 1px solid rgba(255,255,255,.3); padding-left: .6em; color: var(--csd-ok); font-size: .8em; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-family: inherit; }

/* Offer card (basket / checkout / shortcode). Dark by default to sit in the Order Summary. */
.csd-offer {
	margin: 0 0 1em; padding: .9em 1em; border-radius: 6px;
	background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-left: 3px solid var(--csd-accent);
	color: inherit; font-size: .92em; line-height: 1.5;
}
.csd-offer p { margin: 0 0 .5em; }
.csd-offer p:last-child { margin-bottom: 0; }
.csd-offer-head { display: flex; align-items: center; gap: .5em; margin-bottom: .5em; }
.csd-offer-title { font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: .85em; }
.csd-offer-state { margin-left: auto; }
.csd-tag-icon { width: 1em; height: 1em; stroke: var(--csd-accent); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.csd-steps { margin: .5em 0 0; padding: 0; list-style: none; counter-reset: csd; }
.csd-steps li { counter-increment: csd; position: relative; padding-left: 1.7em; margin: 0 0 .25em; }
.csd-steps li::before {
	content: counter(csd); position: absolute; left: 0; top: .15em; width: 1.2em; height: 1.2em; border-radius: 50%;
	background: var(--csd-accent); color: #fff; font-size: .75em; font-weight: 700; display: flex; align-items: center; justify-content: center;
}

/* Light-background contexts (checkout, shortcode on a page) */
.woocommerce-checkout .csd-offer,
.csd-offer.csd-on-light {
	background: rgba(214,55,43,.07); border-color: rgba(0,0,0,.08); color: inherit;
}
.woocommerce-checkout .csd-code-chip,
.csd-on-light .csd-code-chip { background: #fff; border-color: #999; color: #1d1d1d; }
.woocommerce-checkout .csd-chip-apply,
.csd-on-light .csd-chip-apply { border-left-color: #ccc; }

/* Product page badge */
.csd-badge {
	margin: .5em 0 1em; padding: .6em .9em; border-left: 3px solid var(--csd-accent);
	background: rgba(214,55,43,.08); border-radius: 0 4px 4px 0; font-size: .95em; line-height: 1.5;
}
.csd-badge-apply { margin-left: .4em; }

/* Site-wide bar */
.csd-bar {
	display: flex; justify-content: center; align-items: center; gap: .8em; flex-wrap: wrap;
	background: #111; color: #fff; font-size: .9em; padding: .55em 1em; text-align: center;
}
.csd-bar .csd-active { color: #7ed49a; }

/* Test mode tag (admins only see it) */
.csd-test-tag {
	display: inline-block; margin-left: .5em; padding: .1em .5em; border-radius: 3px;
	background: #f0b429; color: #1d1d1d; font-size: .7em; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; vertical-align: middle;
}

/* Code row in a theme-owned order summary (csd_code_chip_html) */
.csd-code-chip-on { padding: .25em .6em; font-size: .85em; }
.csd-code-chip-on .csd-chip-ok { padding-left: .45em; }
.csd-code-chip-on .csd-tick { margin: 0; }
.csd-code-remove { color: rgba(255,255,255,.4) !important; display: inline-flex; align-items: center; text-decoration: none !important; }
.csd-code-remove:hover { color: var(--csd-accent) !important; }
.csd-saving-row .oc-sum-line-val { color: #f08a80; font-weight: 600; }

/* Card inside the dark summary: breathing room above the promo box / button */
.oc-sum-total .csd-offer { margin: 14px 0; }
