/*
 * Free Shipping Progress Bar - front-end styles
 * Uses CSS custom properties (with safe fallbacks) so the widget blends
 * with WoodMart's design tokens as well as any other WooCommerce theme.
 */

#fspb-progress-wrapper.fspb-wrapper {
	--fspb-color-start: #ff6a00;
	--fspb-color-complete: #3fbd5c;
	--fspb-radius: var( --wd-brd-radius, 6px );
	--fspb-font: var( --wd-form-font, inherit );

	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	margin: 0 0 24px;
	padding: 16px 18px;
	background: #f7f7f7;
	border: 1px solid #ececec;
	border-radius: var( --fspb-radius );
	font-family: var( --fspb-font );
	-webkit-font-smoothing: antialiased;
}

#fspb-progress-wrapper.fspb-wrapper * {
	box-sizing: border-box;
}

#fspb-progress-wrapper .fspb-message {
	font-size: 14px;
	line-height: 1.4;
	font-weight: 600;
	color: #333;
	margin: 0 0 10px;
	text-align: center;
}

#fspb-progress-wrapper.fspb-complete .fspb-message {
	color: var( --fspb-color-complete );
}

#fspb-progress-wrapper .fspb-track {
	position: relative;
	width: 100%;
	height: 10px;
	border-radius: 999px;
	background: #e4e4e4;
	overflow: hidden;
}

#fspb-progress-wrapper .fspb-bar {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	width: 0%;
	border-radius: 999px;
	background: var( --fspb-color-start );
	transition: width 0.6s ease, background-color 0.4s ease;
}

#fspb-progress-wrapper.fspb-complete .fspb-bar {
	background: var( --fspb-color-complete );
}

/* RTL support (common for Toman/Persian stores). */
body.rtl #fspb-progress-wrapper .fspb-bar {
	left: auto;
	right: 0;
}

/* Small screens: tighten spacing so the widget stays comfortable on mobile. */
@media ( max-width: 480px ) {
	#fspb-progress-wrapper.fspb-wrapper {
		padding: 12px 14px;
		margin-bottom: 16px;
	}

	#fspb-progress-wrapper .fspb-message {
		font-size: 13px;
	}

	#fspb-progress-wrapper .fspb-track {
		height: 8px;
	}
}

/* WoodMart wraps the cart shortcode in .woocommerce; make sure our block
   never fights the theme's own max-width/columns layout. */
.woocommerce #fspb-progress-wrapper.fspb-wrapper {
	clear: both;
}
