/* TS – Free Shipping Bar – public styles
 * Modern flat look: no card shadow, slim pill-shaped progress bar.
 */

.mfsb-wrapper {
	width: 100%;
	box-sizing: border-box;
}

.mfsb-free-shipping {
	box-sizing: border-box;
	width: 100%;
	margin: 0.75rem 0 1rem;
	padding: 0.85rem 1.1rem 1rem;
	background-color: #ecfdf5;            /* soft emerald tint */
	border: 1px solid #a7f3d0;            /* matching subtle border */
	border-radius: 12px;
	color: var(--fsb-text-color, inherit);
}

.mfsb-free-shipping * {
	box-sizing: border-box;
}

/* Defensive – strip any inherited shadows / filters from the host theme */
.mfsb-wrapper,
.mfsb-wrapper *,
.mfsb-free-shipping,
.mfsb-free-shipping * {
	box-shadow: none !important;
	text-shadow: none !important;
	filter: none !important;
}

.mfsb-free-shipping.fsb-center-text,
.mfsb-free-shipping.fsb-center-text .fsb-title,
.mfsb-free-shipping.fsb-center-text .fsb-description {
	text-align: center;
}

/* Title */
.mfsb-free-shipping .fsb-title {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
	font-size: 1em;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0.01em;
	color: #065f46;                       /* deep emerald, reads well on tint */
}
.mfsb-free-shipping .fsb-title .woocommerce-Price-amount.amount {
	color: #047857;                       /* highlight the dollar amount */
	font-weight: 700;
}

/* Description */
.mfsb-free-shipping .fsb-description {
	display: block;
	width: 100%;
	margin-top: 0.4rem;
	font-size: 0.85em;
	opacity: 0.8;
}
.mfsb-free-shipping .fsb-description .woocommerce-Price-amount.amount {
	font-weight: 600;
}

/* Progress bar – slim pill on the tinted card */
.mfsb-free-shipping .fsb-progress-bar {
	display: block;
	position: relative;
	width: 100%;
	height: var(--fsb-bar-height, 10px);
	margin: 0.7rem 0 0;
	padding: 0;
	overflow: hidden;
	background-color: #ffffff;            /* white track contrasts the tint */
	border: 0;
	border-radius: var(--fsb-bar-radius, 999px);
}

.mfsb-free-shipping .fsb-progress-bar .fsb-progress-amount {
	display: block;
	position: relative;
	height: 100%;
	background-color: var(--fsb-bar-inner-color, #10b981);
	border-radius: var(--fsb-bar-radius, 999px);
	transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Subtle shine sweep across the fill */
.mfsb-free-shipping .fsb-progress-bar.shine .fsb-progress-amount::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		90deg,
		transparent,
		rgba(255, 255, 255, 0.45),
		transparent
	);
	transform: translateX(-100%);
	animation: mfsb-shine 2.4s ease-in-out infinite;
}

/* Diagonal stripes – kept light so the bar still reads flat */
.mfsb-free-shipping .fsb-progress-bar.stripes .fsb-progress-amount {
	background-image: linear-gradient(
		135deg,
		rgba(255, 255, 255, 0.18) 25%,
		transparent 25%,
		transparent 50%,
		rgba(255, 255, 255, 0.18) 50%,
		rgba(255, 255, 255, 0.18) 75%,
		transparent 75%,
		transparent
	);
	background-size: 24px 24px;
	animation: mfsb-stripes 2.5s linear infinite;
}

/* Reached state */
.mfsb-free-shipping.fsb-threshold-reached {
	background-color: #d1fae5;            /* slightly stronger emerald when unlocked */
	border-color: #6ee7b7;
}
.mfsb-free-shipping.fsb-threshold-reached .fsb-title {
	font-weight: 700;
	color: #065f46;
}

@keyframes mfsb-stripes {
	0%   { background-position: 0 0; }
	100% { background-position: 48px 0; }
}

@keyframes mfsb-shine {
	0%   { transform: translateX(-100%); }
	60%  { transform: translateX(100%); }
	100% { transform: translateX(100%); }
}

/* Mini cart context – tighten spacing inside the drawer */
.widget_shopping_cart .mfsb-wrapper,
.woocommerce-mini-cart__buttons + .mfsb-wrapper,
.woocommerce-mini-cart .mfsb-wrapper {
	margin: 0.5rem 0 0.75rem;
}
.widget_shopping_cart .mfsb-free-shipping,
.woocommerce-mini-cart .mfsb-free-shipping {
	padding: 0.7rem 0.85rem 0.85rem;
	border-radius: 10px;
}
.widget_shopping_cart .mfsb-free-shipping .fsb-title,
.woocommerce-mini-cart .mfsb-free-shipping .fsb-title {
	font-size: 0.9em;
}

