/*
 * Purchase discount progress (.cw-discount-progress): text + bar in the cart drawer and under the totals of the cart
 * page. Elements: __box, __text, __meter. Modifier --reached: the last tier was reached (success look, no bar).
 * The wrapper is an always-present live region and has no box of its own.
 */
.cw-discount-progress__box {
	display: grid;
	gap: calc(var(--cw-gap) * .66);
	padding: var(--cw-gap);
	border: 1px solid var(--cw-color-line);
	border-radius: var(--cw-radius);
	background: var(--cw-color-accent-soft);
	color: var(--cw-color-ink);
}

.cw-discount-progress__box[hidden] {
	display: none;
}

.cw-discount-progress__box--reached {
	border-color: var(--cw-color-success);
	background: var(--cw-color-success-soft);
	color: var(--cw-color-success);
}

.cw-discount-progress__text {
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
}

.cw-discount-progress__meter {
	display: block;
	width: 100%;
	height: calc(var(--cw-gap) / 2);
	appearance: none;
	overflow: hidden;
	border: 0;
	border-radius: var(--cw-radius-pill);
	background: var(--cw-color-line);
	color: var(--cw-color-brand);
}

.cw-discount-progress__meter[hidden] {
	display: none;
}

.cw-discount-progress__meter::-webkit-progress-bar {
	background: var(--cw-color-line);
}

.cw-discount-progress__meter::-webkit-progress-value {
	border-radius: var(--cw-radius-pill);
	background: var(--cw-color-brand);
}

.cw-discount-progress__meter::-moz-progress-bar {
	border-radius: var(--cw-radius-pill);
	background: var(--cw-color-brand);
}

/* Under the totals of the cart blocks. */
.wc-block-cart .cw-discount-progress {
	margin: var(--cw-gap) 0 0;
}
