/**
 * Free-shipping bar (shortcode `pp_free_shipping` and its Elementor widget).
 *
 * The accent colour is the theme's own primary when it exposes one, falling back
 * to the WordPress admin blue — the same approach the gift bar takes, so the two
 * bars sit together on a cart page without disagreeing about the brand colour.
 *
 * The fill width arrives as `--pp-free-shipping-width`, set inline by the
 * renderer because only PHP knows the percentage. The property carries the
 * value while this stylesheet keeps the styling — the same contract the gift
 * bar uses with `--pp-gift-width`, and the only form of inline style the
 * project's cross-module gate allows.
 */

.pp-free-shipping {
	--pp-free-shipping-accent: var(--wd-primary-color, #2271b1);
	margin: 0 0 16px;
	padding: 12px 14px;
	border: 1px solid #e2e4e7;
	border-radius: 6px;
	background: #fbfbfc;
}

.pp-free-shipping.is-qualified {
	border-color: #b8e0bf;
	background: #f3fbf4;
}

.pp-free-shipping-text {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	color: #1d2327;
}

.pp-free-shipping.is-qualified .pp-free-shipping-text {
	color: #1d5c28;
}

.pp-free-shipping-track {
	margin: 8px 0 6px;
	height: 8px;
	overflow: hidden;
	border-radius: 999px;
	background: #e6e8eb;
}

.pp-free-shipping-fill {
	display: block;
	width: var(--pp-free-shipping-width, 0%);
	height: 100%;
	border-radius: inherit;
	background: linear-gradient(90deg, var(--pp-free-shipping-accent, #2271b1), #72aee6);
	transition: width 0.4s ease;
}

.pp-free-shipping.is-qualified .pp-free-shipping-fill {
	background: #46b450;
}

.pp-free-shipping-threshold {
	margin: 0;
	color: #646970;
	font-size: 12px;
}

/* The compact variant is a sentence in a narrow widget area: no box, no bar,
 * no threshold line — a bordered block there reads as an error state. */
.pp-free-shipping--mini {
	margin: 0 0 8px;
	padding: 0;
	border: 0;
	background: none;
}

.pp-free-shipping--mini .pp-free-shipping-text {
	font-size: 13px;
	font-weight: 500;
	color: #50575e;
}

@media (prefers-reduced-motion: reduce) {
	.pp-free-shipping-fill {
		transition: none;
	}
}
