/**
 * Noghteh CRO — scoped progress bar + scarcity timer.
 */

.noghteh-progress {
	--noghteh-cro-accent: #0f766e;
	--noghteh-cro-accent-soft: rgba(15, 118, 110, 0.12);
	--noghteh-cro-track: #e6ebf0;
	--noghteh-cro-text: #1c2430;
	--noghteh-cro-muted: #5b6575;
	--noghteh-cro-success: #15803d;

	box-sizing: border-box;
	width: 100%;
	margin: 0 0 1rem;
	padding: 0.85rem 1rem;
	background: linear-gradient(180deg, #f7faf9 0%, #eef5f3 100%);
	border: 1px solid #d5e3df;
	border-radius: 10px;
	color: var(--noghteh-cro-text);
	font-size: 13px;
	line-height: 1.5;
}

.noghteh-progress *,
.noghteh-progress *::before,
.noghteh-progress *::after {
	box-sizing: border-box;
}

.noghteh-progress__text {
	margin: 0 0 0.55rem;
	font-weight: 600;
	font-size: 0.95em;
}

.noghteh-progress__track {
	position: relative;
	width: 100%;
	height: 10px;
	overflow: hidden;
	background: var(--noghteh-cro-track);
	border-radius: 999px;
}

.noghteh-progress__bar {
	display: block;
	height: 100%;
	width: 0;
	background: linear-gradient(90deg, #0f766e 0%, #14b8a6 100%);
	border-radius: inherit;
	transition: width 0.45s ease;
}

.noghteh-progress__meta {
	margin-top: 0.4rem;
	color: var(--noghteh-cro-muted);
	font-size: 12px;
}

.noghteh-progress.is-unlocked {
	background: linear-gradient(180deg, #f0fdf4 0%, #dcfce7 100%);
	border-color: #bbf7d0;
}

.noghteh-progress.is-unlocked .noghteh-progress__text {
	color: var(--noghteh-cro-success);
}

.noghteh-progress.is-unlocked .noghteh-progress__bar {
	background: linear-gradient(90deg, #15803d 0%, #22c55e 100%);
}

.noghteh-progress--mini {
	margin: 0 0 0.75rem;
	padding: 0.65rem 0.75rem;
	font-size: 12px;
}

.noghteh-progress--mini .noghteh-progress__track {
	height: 8px;
}

.noghteh-progress--mini .noghteh-progress__meta {
	display: none;
}

.noghteh-scarcity {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	width: 100%;
	margin: 0 0 1rem;
	padding: 0.75rem 0.9rem;
	background: linear-gradient(90deg, #fff7ed 0%, #ffedd5 100%);
	border: 1px solid #fdba74;
	border-radius: 10px;
	color: #9a3412;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.45;
	animation: noghteh-scarcity-pulse 2.4s ease-in-out infinite;
}

.noghteh-scarcity__icon {
	flex: 0 0 10px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #ea580c;
	box-shadow: 0 0 0 0 rgba(234, 88, 12, 0.45);
	animation: noghteh-scarcity-dot 1.6s ease-out infinite;
}

.noghteh-scarcity__text {
	flex: 1 1 auto;
}

.noghteh-scarcity__time {
	display: inline-block;
	padding: 0.05em 0.35em;
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.65);
	font-variant-numeric: tabular-nums;
	font-weight: 700;
}

.noghteh-scarcity.is-expired {
	display: none !important;
}

@keyframes noghteh-scarcity-pulse {
	0%,
	100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(-1px);
	}
}

@keyframes noghteh-scarcity-dot {
	0% {
		box-shadow: 0 0 0 0 rgba(234, 88, 12, 0.45);
	}
	70% {
		box-shadow: 0 0 0 8px rgba(234, 88, 12, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(234, 88, 12, 0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.noghteh-scarcity,
	.noghteh-scarcity__icon,
	.noghteh-progress__bar {
		animation: none !important;
		transition: none !important;
	}
}

/* Woodmart / Elementor isolation */
body.woocommerce-cart .noghteh-progress,
body.woocommerce-checkout .noghteh-progress,
body.woocommerce-checkout .noghteh-scarcity,
.widget_shopping_cart .noghteh-progress {
	float: none !important;
	max-width: 100%;
	clear: both;
}
