/**
 * Woodmart Discount Progress Notice
 * Small, RTL-aware, theme-friendly styles. Colors come from CSS variables set
 * inline from the admin settings, with sensible fallbacks.
 */

.wdpn-notice {
	--wdpn-primary: #83b735;
	--wdpn-bg: #eef1f4;
	--wdpn-success: #2e7d32;
	--wdpn-text: #333;
	box-sizing: border-box;
	margin: 12px 0;
	padding: 12px 14px;
	border-radius: 12px;
	background: var(--wdpn-bg);
	color: var(--wdpn-text);
	font-size: 14px;
	line-height: 1.5;
	text-align: start;
}

.wdpn-notice * {
	box-sizing: border-box;
}

.wdpn-message {
	margin: 0 0 8px;
	font-weight: 600;
}

.wdpn-bar {
	position: relative;
	height: 10px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.08);
	overflow: hidden;
}

.wdpn-bar-fill {
	position: absolute;
	inset-block: 0;
	inset-inline-start: 0;
	width: 0;
	min-width: 0;
	border-radius: 999px;
	background: var(--wdpn-primary);
	transition: width 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.wdpn-reached .wdpn-bar-fill {
	background: var(--wdpn-success);
}

.wdpn-reached .wdpn-message {
	color: var(--wdpn-success);
}

/* Keep WooCommerce price markup on one line. */
.wdpn-notice .woocommerce-Price-amount {
	font-weight: 700;
	white-space: nowrap;
}

/* Context tweaks. */
.wdpn-context-minicart {
	margin: 10px 0;
	font-size: 13px;
}

.wdpn-context-product {
	margin: 14px 0;
}

@media (prefers-reduced-motion: reduce) {
	.wdpn-bar-fill {
		transition: none;
	}
}
