/*
 * Crazy Runners — promotions (inc/woo-promo.php): the page /promos/ and the promotion marks of the product page.
 * Loaded after style.css and woocommerce.css on product lists, product pages and the front page.
 *
 * Not here, on purpose: the sale badge ("−20 %", cards and product page), the "Dès …" price of a card and the dot
 * on a card's swatches are in assets/css/cards.css, which is loaded wherever a card is printed (cart cross-sells
 * included) and on product pages.
 * The page itself needs almost nothing: it is a product archive, styled like the others.
 */

/* ==========================================================================
   1. The page /promos/ when nothing is on promotion
   ========================================================================== */

.crs-promo-empty {
	max-width: 640px;
	margin: 8px 0 56px;
	padding: 28px 24px;
	border: 1px solid var(--crs-border);
	border-left: 4px solid var(--crs-accent);
	border-radius: var(--crs-radius);
	background: var(--crs-surface);
}

.crs-promo-empty__title {
	margin: 0 0 6px;
	color: var(--crs-text);
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.3;
}

.crs-promo-empty__text {
	margin: 0 0 20px;
	color: var(--crs-muted);
	line-height: 1.6;
}

.crs-promo-empty__action {
	margin: 0;
}

.crs-promo-empty .crs-btn {
	max-width: 100%;
	text-decoration: none;
}

@media (max-width: 479px) {
	.crs-promo-empty {
		padding: 22px 18px;
	}

	.crs-promo-empty .crs-btn {
		width: 100%;
	}
}

/* ==========================================================================
   2. Product page: "Dès 112,00 €", the main price of a model reduced in some colourways only
   ========================================================================== */

/*
 * The word is set like the crossed-out price of woocommerce.css, the amount like its reduced price.
 * Elsewhere the element takes the look of what surrounds it (a banner of the front page); on a card: cards.css.
 */
.woocommerce div.product p.price .crs-promo-from {
	color: var(--crs-muted);
	font-size: 1.0625rem;
	font-weight: 400;
}

.woocommerce div.product p.price .crs-promo-from .amount {
	color: var(--crs-accent-hover);
	font-size: 1.5rem;
	font-weight: 700;
}

/* "… au lieu de 140,00 €": the reference price, set like WooCommerce's crossed-out price. */
.woocommerce div.product p.price .crs-promo-from del,
.woocommerce div.product p.price .crs-promo-from del .amount {
	color: var(--crs-muted);
	font-size: 1.0625rem;
	font-weight: 400;
	opacity: 1;
}

.woocommerce div.product p.price .crs-promo-from ins {
	text-decoration: none;
}

/* ==========================================================================
   3. Product page: the colourways on promotion among the colour swatches
   ========================================================================== */

/*
 * A small "%" tag in the corner of the swatch, in the colour of the sale badge. The button's accessible name
 * and tooltip say "…, en promotion" (inc/woo-promo.php). "::before": "::after" is the bar of an unavailable colour.
 */
.crs-swatch.crs-promo-swatch::before {
	content: "%";
	position: absolute;
	top: 3px;
	right: 3px;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--crs-accent);
	box-shadow: 0 0 0 2px var(--crs-bg);
	color: #fff;
	font-size: .625rem;
	font-weight: 700;
	line-height: 1;
}

/* A colour shown as a name: the tag sits on the chip's edge instead of over the text. */
.crs-swatch.crs-swatch--text.crs-promo-swatch {
	padding-right: 28px;
}

.crs-swatch.crs-swatch--text.crs-promo-swatch::before {
	top: 50%;
	right: 7px;
	transform: translateY(-50%);
}

@media (forced-colors: active) {
	.crs-swatch.crs-promo-swatch::before {
		border: 1px solid CanvasText;
	}
}
