/* Traka do besplatne dostave (prenesena iz plugina Free Shipping Progress, iste klase). */
/* ===== Free Shipping Progress Bar =====
   Boje se mogu prilagoditi preko CSS varijabli, npr. u Customizer → Additional CSS:
   .fsp-freeship { --fsp-accent: #0a3a7a; --fsp-fill-start: #fbb800; --fsp-fill-end: #d99b00; }
*/
.fsp-freeship {
	--fsp-bg:         #f8f9fb;
	--fsp-line:       #e5e5e5;
	--fsp-fg:         #1a1a1a;
	--fsp-accent:     #0a3a7a; /* icon color */
	--fsp-accent-dk:  #082f63; /* strong (amount) color */
	--fsp-track:      #e6eaf0;
	--fsp-fill-start: #fbb800;
	--fsp-fill-end:   #d99b00;

	background: var(--fsp-bg);
	border: 1px solid var(--fsp-line);
	border-radius: 12px;
	padding: 14px 16px;
	margin: 0 0 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	box-sizing: border-box;
}
.fsp-freeship *, .fsp-freeship *::before, .fsp-freeship *::after { box-sizing: inherit; }

.fsp-freeship__text {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	line-height: 1.4;
	color: var(--fsp-fg);
}
.fsp-freeship__text strong { color: var(--fsp-accent-dk); font-weight: 700; }
.fsp-freeship__icon { flex: 0 0 18px; color: var(--fsp-accent); }

.fsp-freeship__track {
	width: 100%;
	height: 8px;
	background: var(--fsp-track);
	border-radius: 999px;
	overflow: hidden;
}
.fsp-freeship__fill {
	height: 100%;
	background: linear-gradient(90deg, var(--fsp-fill-start) 0%, var(--fsp-fill-end) 100%);
	border-radius: 999px;
	transition: width .4s ease;
	min-width: 0;
}

/* Reached state — green */
.fsp-freeship.is-reached {
	background: #e8f8ee;
	border-color: rgba(22, 163, 74, .3);
}
.fsp-freeship.is-reached .fsp-freeship__icon,
.fsp-freeship.is-reached .fsp-freeship__text strong { color: #15803d; }
.fsp-freeship.is-reached .fsp-freeship__fill {
	background: linear-gradient(90deg, #22c55e 0%, #15803d 100%);
}

/* Hidden placeholder (empty cart with "hide when empty" enabled) — kept in
   the DOM so AJAX fragments have an element to swap once items are added. */
.fsp-freeship--hidden { display: none; }

/* Celebration when the threshold is crossed. */
.fsp-freeship.fsp-celebrate { animation: fsp-glow 1.2s ease; }
.fsp-freeship.fsp-celebrate .fsp-freeship__icon { animation: fsp-pop .7s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes fsp-glow {
	0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, .45); }
	70%  { box-shadow: 0 0 0 12px rgba(34, 197, 94, 0); }
	100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
@keyframes fsp-pop {
	0%   { transform: scale(.4) rotate(-20deg); }
	60%  { transform: scale(1.3); }
	100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
	.fsp-freeship.fsp-celebrate,
	.fsp-freeship.fsp-celebrate .fsp-freeship__icon { animation: none; }
}

/* Cart page: full width, tighter gap below. */
.woocommerce-cart .fsp-freeship { max-width: none; width: 100%; margin: 0 0 12px; }

/* Mini-cart (Elementor Menu Cart / WC cart widget): tighter spacing to fit
   the drawer, slightly smaller text. */
.widget_shopping_cart .fsp-freeship,
.elementor-menu-cart__main .fsp-freeship {
	margin: 10px 0;
	padding: 12px 14px;
}
.widget_shopping_cart .fsp-freeship__text,
.elementor-menu-cart__main .fsp-freeship__text { font-size: 12px; }
