/* Live Economy ticker — the embeddable face of the Galaxy Money-Cam.
   Self-contained, design-token driven, dark-first. Every interactive element
   has hover / focus-visible states; the list is a real, keyboard-navigable list. */

.eco-ticker {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 18px;
	border: 1px solid var(--hairline, #1c1c1c);
	border-radius: 16px;
	background:
		radial-gradient(120% 140% at 100% 0%, rgba(196, 181, 253, 0.08), transparent 60%),
		var(--surface-0, #0b0b0b);
	font-family: var(--font-body, system-ui, sans-serif);
	color: var(--text, #f6f6f6);
}

.eco-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}
.eco-title {
	display: flex;
	flex-direction: column;
	gap: 2px;
	text-decoration: none;
	color: inherit;
	border-radius: 8px;
}
.eco-title-main {
	font-family: var(--font-display, var(--font-body));
	font-weight: 700;
	font-size: 1.02rem;
	letter-spacing: -0.01em;
}
.eco-title-sub {
	font-size: 0.72rem;
	color: var(--text-3, #8a8a8a);
}
.eco-title:hover .eco-title-main { color: var(--wallet-accent, #c4b5fd); }

.eco-status {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--text-3, #8a8a8a);
	white-space: nowrap;
}
.eco-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: currentColor;
	box-shadow: 0 0 8px currentColor;
}
.eco-status--live { color: #4ade80; }
.eco-status--live .eco-dot { animation: eco-pulse 2s ease-in-out infinite; }
.eco-status--stale { color: #fbbf24; }
@keyframes eco-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) {
	.eco-status--live .eco-dot { animation: none; }
}

/* Hottest earner — the discovery hook */
.eco-hot {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 12px 14px;
	border: 1px solid var(--wallet-stroke, rgba(139, 92, 246, 0.30));
	border-radius: 12px;
	background: var(--wallet-accent-soft, rgba(139, 92, 246, 0.10));
}
.eco-hot-eyebrow {
	font-size: 0.64rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wallet-accent, #c4b5fd);
}
.eco-hot-link {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	text-decoration: none;
	color: inherit;
}
.eco-hot-name {
	font-family: var(--font-display, var(--font-body));
	font-weight: 700;
	font-size: 1.05rem;
	letter-spacing: -0.01em;
}
.eco-hot-link:hover .eco-hot-name { text-decoration: underline; }
.eco-hot-amt {
	font-family: var(--font-mono, ui-monospace, monospace);
	font-size: 0.78rem;
	color: var(--wallet-accent-strong, #a78bfa);
	white-space: nowrap;
}

/* Window stats */
.eco-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	font-size: 0.72rem;
	color: var(--text-3, #8a8a8a);
}
.eco-stats:empty { display: none; }
.eco-stats strong {
	color: var(--text, #f6f6f6);
	font-family: var(--font-mono, ui-monospace, monospace);
	font-weight: 600;
}

/* Flow list */
.eco-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
}
.eco-row {
	display: flex;
	align-items: center;
	gap: 4px;
	border-top: 1px solid var(--hairline, #1c1c1c);
}
.eco-row:first-child { border-top: none; }
.eco-row-link {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1;
	min-width: 0;
	padding: 9px 4px;
	text-decoration: none;
	color: inherit;
	border-radius: 8px;
}
.eco-row-link:hover { background: var(--surface-2, #181818); }
.eco-kind {
	flex: 0 0 auto;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--k, #9fb4d6);
	box-shadow: 0 0 8px var(--k, #9fb4d6);
}
.eco-row-main {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 0.82rem;
}
.eco-row-amt {
	flex: 0 0 auto;
	font-family: var(--font-mono, ui-monospace, monospace);
	font-size: 0.76rem;
	color: var(--text-2, #a8a8a8);
}
.eco-row-ago {
	flex: 0 0 auto;
	width: 34px;
	text-align: right;
	font-size: 0.7rem;
	color: var(--text-4, #6e6e6e);
	font-variant-numeric: tabular-nums;
}
.eco-row-tx {
	flex: 0 0 auto;
	padding: 4px 6px;
	color: var(--text-4, #6e6e6e);
	font-size: 0.8rem;
	text-decoration: none;
	border-radius: 6px;
}
.eco-row-tx:hover { color: var(--wallet-accent, #c4b5fd); background: var(--surface-2, #181818); }

/* Newly-arrived rows flash gently (skipped under reduced-motion via no class) */
.eco-row--fresh { animation: eco-flash 1.4s ease-out; }
@keyframes eco-flash {
	0% { background: var(--wallet-accent-fill, rgba(139, 92, 246, 0.15)); }
	100% { background: transparent; }
}

.eco-empty {
	padding: 16px 4px;
	font-size: 0.8rem;
	color: var(--text-3, #8a8a8a);
	text-align: center;
}
.eco-empty a { color: var(--wallet-accent, #c4b5fd); text-decoration: none; }
.eco-empty a:hover { text-decoration: underline; }

.eco-note {
	margin: 0;
	font-size: 0.72rem;
	color: var(--text-3, #8a8a8a);
}

/* Loading skeleton */
.eco-row--skeleton {
	height: 38px;
	border-top: 1px solid var(--hairline, #1c1c1c);
	position: relative;
	overflow: hidden;
}
.eco-row--skeleton::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, transparent, var(--surface-2, #181818), transparent);
	animation: eco-shimmer 1.3s ease-in-out infinite;
}
@keyframes eco-shimmer {
	0% { transform: translateX(-100%); }
	100% { transform: translateX(100%); }
}
@media (prefers-reduced-motion: reduce) {
	.eco-row--skeleton::after { animation: none; opacity: 0.4; }
}

/* Shared focus ring for every interactive element in the widget */
.eco-ticker a:focus-visible,
.eco-ticker button:focus-visible {
	outline: 2px solid var(--wallet-focus, rgba(139, 92, 246, 0.70));
	outline-offset: 2px;
}
