/*
 * A class on sale: the crossed-out normal price, the sale price, and the tag (inc/class-sale.php).
 *
 * Loaded on every page, because a price can appear on almost any of them — a class page, a
 * category page, the homepage strip, the gift panel, All Classes. It is forty lines.
 *
 * The three parts sit on ONE line and wrap as a unit, so a narrow card never leaves "On Sale"
 * stranded under a price with nothing beside it.
 */

.sc-sale {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 .5rem;
}

/* The old price: quieter than the new one, and never the thing the eye lands on first. */
.sc-sale-was {
	color: #8a7a7e;
	font-weight: 400;
	/* Its own rule rather than the browser's: the default line sits mid-glyph on this face and
	   reads as a strikethrough through the dollar sign. */
	text-decoration: line-through;
	text-decoration-thickness: 1px;
	text-decoration-color: #c9bcbf;
}

.sc-sale-now {
	font-weight: 700;
}

.sc-sale-suffix {
	font-weight: 400;
}

/*
 * The tag. Red on the palest pink rather than white on red: a solid red pill next to a red Book
 * button turns the card into two competing buttons, and this one is not clickable.
 */
.sc-sale-tag {
	padding: .15em .55em;
	border-radius: 2rem;
	background: #ffe9ee;
	color: #d9304b;
	font-size: .72em;
	font-weight: 700;
	letter-spacing: .03em;
	text-transform: uppercase;
	white-space: nowrap;
}

/* On a class page the price is large, so the tag does not need to scale with it. */
.class-price .sc-sale-tag {
	font-size: .5em;
	vertical-align: middle;
}
