/**
 * Ultimate Sales Machine — Scarcity Timer Styles
 */

/* ── Countdown Timer ──────────────────────────────── */
.usm-countdown {
	margin: 16px 0;
	padding: 16px 20px;
	background: linear-gradient(135deg, #fef2f2 0%, #fff1f2 100%);
	border: 1px solid #fecaca;
	border-radius: 10px;
	text-align: center;
}

.usm-countdown-heading {
	font-size: 14px;
	font-weight: 700;
	color: #991b1b;
	margin-bottom: 12px;
	letter-spacing: 0.3px;
}

.usm-countdown-boxes {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 4px;
}

.usm-countdown-box {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 52px;
}

.usm-countdown-value {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	background: #dc2626;
	color: #fff;
	font-size: 22px;
	font-weight: 800;
	border-radius: 8px;
	font-variant-numeric: tabular-nums;
	transition: transform 0.3s;
}

.usm-countdown-value.usm-countdown-flip {
	transform: scale(1.1);
}

.usm-countdown-label {
	font-size: 10px;
	font-weight: 600;
	color: #991b1b;
	text-transform: uppercase;
	margin-top: 4px;
	letter-spacing: 0.5px;
}

.usm-countdown-sep {
	font-size: 24px;
	font-weight: 800;
	color: #dc2626;
	padding-bottom: 18px;
}

/* ── Stock Scarcity Bar ───────────────────────────── */
.usm-stock-scarcity {
	margin: 12px 0;
	padding: 12px 16px;
	background: #fffbeb;
	border: 1px solid #fde68a;
	border-radius: 8px;
}

.usm-stock-text {
	font-size: 14px;
	font-weight: 700;
	color: #92400e;
	margin-bottom: 8px;
}

.usm-stock-bar-track {
	width: 100%;
	height: 10px;
	background: #f3f4f6;
	border-radius: 5px;
	overflow: hidden;
}

.usm-stock-bar-fill {
	height: 100%;
	border-radius: 5px;
	transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
	position: relative;
}

.usm-stock-bar-fill::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(
		90deg,
		rgba(255,255,255,0) 0%,
		rgba(255,255,255,0.3) 50%,
		rgba(255,255,255,0) 100%
	);
	animation: usm-shimmer 2s infinite;
}

@keyframes usm-shimmer {
	0%   { transform: translateX(-100%); }
	100% { transform: translateX(100%); }
}

/* ── Visitors Counter ─────────────────────────────── */
.usm-visitors-counter {
	margin: 12px 0;
	padding: 10px 16px;
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	border-radius: 8px;
}

.usm-visitors-text {
	font-size: 13px;
	font-weight: 600;
	color: #166534;
	transition: opacity 0.3s;
}

.usm-visitors-text.usm-visitors-pulse {
	animation: usm-pulse 0.6s ease-out;
}

@keyframes usm-pulse {
	0%   { opacity: 0.6; transform: scale(0.98); }
	50%  { opacity: 1;   transform: scale(1.02); }
	100% { opacity: 1;   transform: scale(1); }
}

/* ── Checkout Urgency Timer ───────────────────────── */
.usm-checkout-timer {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 14px 24px;
	margin-bottom: 24px;
	background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
	border: 1px solid #f59e0b;
	border-radius: 10px;
	font-size: 15px;
	font-weight: 600;
	color: #92400e;
	transition: background 0.3s, border-color 0.3s;
}

.usm-checkout-timer-icon {
	font-size: 20px;
}

.usm-checkout-timer-value {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 60px;
	padding: 4px 12px;
	background: #dc2626;
	color: #fff;
	font-size: 18px;
	font-weight: 800;
	border-radius: 6px;
	font-variant-numeric: tabular-nums;
	letter-spacing: 1px;
}

/* Urgent state: < 2 minutes */
.usm-checkout-timer--urgent {
	background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
	border-color: #ef4444;
	animation: usm-checkout-pulse 1s ease-in-out infinite;
}

.usm-checkout-timer--urgent .usm-checkout-timer-value {
	background: #991b1b;
}

/* Expired state */
.usm-checkout-timer--expired {
	background: #f3f4f6;
	border-color: #d1d5db;
	color: #6b7280;
}

.usm-checkout-timer--expired .usm-checkout-timer-value {
	background: #6b7280;
}

@keyframes usm-checkout-pulse {
	0%, 100% { transform: scale(1); }
	50%      { transform: scale(1.01); }
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 480px) {
	.usm-countdown-value {
		width: 40px;
		height: 40px;
		font-size: 18px;
	}

	.usm-countdown-box {
		min-width: 44px;
	}

	.usm-checkout-timer {
		flex-wrap: wrap;
		font-size: 13px;
		padding: 12px 16px;
	}
}
