/* Xohar Stock Urgency & Trust Badge — frontend styles */

.xsu-stock-bar-wrap {
	margin: 8px 0;
	font-family: inherit;
}

.xsu-stock-bar-track {
	width: 100%;
	height: 6px;
	background: #e5e7eb;
	border-radius: 999px;
	overflow: hidden;
}

.xsu-stock-bar-fill {
	height: 100%;
	border-radius: 999px;
	transition: width 0.4s ease;
	background: #16a34a; /* default ok = green */
}

.xsu-stock-bar-wrap.xsu-ok .xsu-stock-bar-fill {
	background: #16a34a;
}

.xsu-stock-bar-wrap.xsu-urgent .xsu-stock-bar-fill {
	background: #dc2626;
}

.xsu-stock-bar-wrap.xsu-out .xsu-stock-bar-fill {
	background: #9ca3af;
}

.xsu-stock-bar-label {
	display: inline-block;
	margin-top: 4px;
	font-size: 12px;
	font-weight: 600;
	color: #374151;
}

.xsu-stock-bar-wrap.xsu-urgent .xsu-stock-bar-label {
	color: #dc2626;
	animation: xsu-pulse 1.6s ease-in-out infinite;
}

@keyframes xsu-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.55; }
}

/* Trust badge */
.xsu-trust-badge {
	--xsu-badge-color: #1d4ed8;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 10px 0;
	padding: 6px 12px;
	border-radius: 6px;
	background: color-mix(in srgb, var(--xsu-badge-color) 10%, white);
	border: 1px solid color-mix(in srgb, var(--xsu-badge-color) 35%, white);
}

.xsu-badge-icon {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

.xsu-badge-text {
	font-size: 12.5px;
	font-weight: 600;
	color: var(--xsu-badge-color);
}

/* Product card layout tweak */
li.product .xsu-stock-bar-wrap {
	text-align: left;
}

li.product .xsu-trust-badge {
	font-size: 11px;
	padding: 4px 8px;
}

li.product .xsu-badge-icon {
	width: 13px;
	height: 13px;
}
