/**
 * Tier sale price: sale price, original struck through, countdown line under
 * both. Markup from Goldvion_Sale_Price::html(); colours and sizes are the
 * custom properties it prints inline from WooCommerce -> Settings -> Products
 * -> Sale prices.
 *
 * Sizes are `em` multipliers of whatever size the price already renders at
 * in that spot (x-large on the home card, xx-large in the modal, large in
 * the builder), so one setting stays proportionate on all three.
 */

.gv-price--sale {
	display: inline-flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.25rem;
}

.gv-price__amounts {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: baseline;
	column-gap: 0.5em;
}

/* Each price and its optional prefix/suffix wording share one size, colour
   and font (a chosen font is printed inline against the group). */
.gv-price__group {
	display: inline-flex;
	align-items: baseline;
	column-gap: 0.3em;
}

.gv-price__group--now,
.gv-price--sale > .gv-price__now,
.gv-price__ended .gv-price__now {
	font-size: calc( var( --gv-sale-now-size, 1 ) * 1em );
	color: var( --gv-sale-now-color, #b3261e );
}

.gv-price__group--was {
	font-size: calc( var( --gv-sale-was-size, 0.85 ) * 1em );
	color: var( --gv-sale-was-color, #26241f );
}

.gv-price__was {
	text-decoration: line-through;
}

.gv-price__offer {
	font-family: var( --wp--preset--font-family--body, sans-serif );
	font-size: var( --wp--preset--font-size--small, 0.875rem );
	line-height: 1.4;
	color: var( --gv-sale-label-color, #b3261e );
	font-variant-numeric: tabular-nums;
}

/* The price shown once the countdown reaches zero, before sale-countdown.js
   swaps it in. `[hidden]` alone loses to any `display` rule above. */
.gv-price__ended[hidden] {
	display: none;
}
