/* ==========================================================================
   Aaima Table Rate Shipping — free shipping bar
   Colours and blink timing are injected as CSS variables from the settings.
   ========================================================================== */

.atrs-bar-wrap {
	margin: 0 0 1.5em;
}

.atrs-bar-wrap.atrs-empty {
	margin: 0;
}

.atrs-bar {
	background: var(--atrs-bg, #f6f7f7);
	color: var(--atrs-text, #1d2327);
	border-radius: 8px;
	padding: 14px 18px;
	border: 1px solid rgba(0, 0, 0, .08);
}

/* ---- Message ---- */
.atrs-message {
	display: flex;
	align-items: center;
	gap: 9px;
	font-size: .95em;
	line-height: 1.4;
}

.atrs-icon {
	flex-shrink: 0;
	font-size: 1.15em;
	line-height: 1;
}

.atrs-text {
	font-weight: 600;
}

/* ---- Progress bar ---- */
.atrs-track {
	position: relative;
	height: 9px;
	margin-top: 10px;
	background: rgba(0, 0, 0, .09);
	border-radius: 20px;
	overflow: hidden;
}

.atrs-fill {
	height: 100%;
	width: 0;
	border-radius: 20px;
	background: var(--atrs-progress, #2271b1);
	transition: width .45s ease;
}

.atrs-scale {
	display: flex;
	justify-content: space-between;
	margin-top: 5px;
	font-size: .78em;
	opacity: .65;
}

.atrs-scale .amount,
.atrs-scale bdi {
	white-space: nowrap;
}

/* ---- Unlocked state ---- */
.atrs-unlocked .atrs-fill {
	background: var(--atrs-unlocked, #00a32a);
}

.atrs-unlocked .atrs-text {
	color: var(--atrs-unlocked, #00a32a);
}

.atrs-unlocked {
	border-color: var(--atrs-unlocked, #00a32a);
}

/* ---- Blink ----
   A soft pulse rather than a hard on/off flash: it still catches the eye,
   but it does not strobe. The count is capped from the settings so the
   animation stops on its own. */
@keyframes atrs-pulse {
	0%   { transform: scale(1);     box-shadow: 0 0 0 0 rgba(0, 163, 42, .45); }
	50%  { transform: scale(1.015); box-shadow: 0 0 0 9px rgba(0, 163, 42, 0); }
	100% { transform: scale(1);     box-shadow: 0 0 0 0 rgba(0, 163, 42, 0); }
}

@keyframes atrs-fade {
	0%, 100% { opacity: 1; }
	50%      { opacity: .55; }
}

.atrs-blink {
	animation: atrs-pulse var(--atrs-blink-speed, 900ms) ease-in-out var(--atrs-blink-count, 6);
}

.atrs-blink .atrs-icon {
	display: inline-block;
	animation: atrs-fade var(--atrs-blink-speed, 900ms) ease-in-out var(--atrs-blink-count, 6);
}

/* Anyone who has asked for less motion gets a static bar. */
@media (prefers-reduced-motion: reduce) {
	.atrs-blink,
	.atrs-blink .atrs-icon {
		animation: none;
	}

	.atrs-fill {
		transition: none;
	}
}

/* ---- Compact, for the mini cart ---- */
.atrs-compact {
	padding: 10px 12px;
	border-radius: 6px;
}

.atrs-compact .atrs-message {
	font-size: .85em;
	gap: 7px;
}

.atrs-compact .atrs-track {
	height: 6px;
	margin-top: 8px;
}

.atrs-compact .atrs-scale {
	display: none;
}

/* ---- Plain style ---- */
.atrs-style-plain .atrs-track,
.atrs-style-plain .atrs-scale {
	display: none;
}
