/* =========================================================
   Trending Flames
   1-4 flame "how hot is this article right now" badge.
   ========================================================= */

.trending-flames-badge {
	--tf-flame-hot: #ff5a1f;
	--tf-flame-hotter: #ff8a00;
	--tf-flame-unlit: #d8d4cc;
	--tf-ink: #14130f;
	--tf-ink-soft: #5c5a52;

	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 6px 0 22px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

.trending-flames-icons {
	display: inline-flex;
	align-items: flex-end;
	gap: 2px;
}

.trending-flames-icon {
	display: inline-block;
	width: 20px;
	height: 20px;
	line-height: 0;
}

.trending-flames-svg {
	width: 100%;
	height: 100%;
	display: block;
}

/* Unlit flames: faint outline only, no glow, no animation. */
.trending-flames-icon.is-unlit .trending-flames-svg {
	fill: var(--tf-flame-unlit);
}

/* Lit flames: warm gradient fill + a subtle flicker/pulse loop. */
.trending-flames-icon.is-lit .trending-flames-svg {
	fill: var(--tf-flame-hot);
	filter: drop-shadow(0 0 4px rgba(255, 90, 31, 0.35));
	animation: trending-flames-flicker 1.8s ease-in-out infinite;
	transform-origin: bottom center;
}

@keyframes trending-flames-flicker {
	0%, 100% {
		transform: scale(1) rotate(0deg);
		fill: var(--tf-flame-hot);
	}
	35% {
		transform: scale(1.08) rotate(-2deg);
		fill: var(--tf-flame-hotter);
	}
	65% {
		transform: scale(0.96) rotate(2deg);
		fill: var(--tf-flame-hot);
	}
}

/* Tier 4 gets a slightly stronger glow across all its flames — the
   "completely red hot" state should read as visibly more intense than
   a 2- or 3-flame badge, not just "one more icon." */
.trending-flames-tier-4 .trending-flames-icon.is-lit .trending-flames-svg {
	filter: drop-shadow(0 0 7px rgba(255, 90, 31, 0.55));
}

.trending-flames-label {
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--tf-flame-hot);
	white-space: nowrap;
}

/* --- Reduced motion --- */

@media (prefers-reduced-motion: reduce) {
	.trending-flames-icon.is-lit .trending-flames-svg {
		animation: none;
	}
}
