/*
 * Freight Ticker — visual spec mirrors getfreightdata.com's ScrollingTicker.
 * All selectors are scoped under `.fwmm-ticker` so the plugin can't bleed
 * into FW.com's theme styles, and theme resets can't easily override us.
 *
 * IBM Plex Mono is loaded via @import; system monospace stack used as fallback
 * if the host site blocks Google Fonts.
 */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&display=swap');

.fwmm-ticker {
	overflow: hidden;
	background: #060b12;
	border-bottom: 1px solid #162032;
	white-space: nowrap;
	width: 100%;
	font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	box-sizing: border-box;
}

.fwmm-ticker *, .fwmm-ticker *::before, .fwmm-ticker *::after {
	box-sizing: border-box;
}

.fwmm-ticker__track {
	display: inline-flex;
	animation: fwmm-ticker-scroll 120s linear infinite;
	will-change: transform;
}

.fwmm-ticker:hover .fwmm-ticker__track {
	animation-play-state: paused;
}

.fwmm-ticker__item {
	display: inline-flex;
	align-items: center;
	font-size: 11px;
	letter-spacing: 0.06em;
	color: #4a6a80;
	padding: 5px 0;
	line-height: 1.4;
}

.fwmm-ticker__ticker {
	color: #b5c8d6;
}

.fwmm-ticker__value {
	color: #cce0f0;
	margin-left: 6px;
}

.fwmm-ticker__delta {
	margin-left: 5px;
	display: inline-flex;
	align-items: center;
	gap: 2px;
}

.fwmm-ticker__delta--up    { color: #22c55e; }
.fwmm-ticker__delta--down  { color: #ef4444; }
.fwmm-ticker__delta--flat  { color: #ffffff; }

.fwmm-ticker__arrow {
	display: inline-block;
	width: 0;
	height: 0;
	margin-right: 1px;
}

.fwmm-ticker__arrow--up {
	border-left: 3.5px solid transparent;
	border-right: 3.5px solid transparent;
	border-bottom: 6px solid currentColor;
}

.fwmm-ticker__arrow--down {
	border-left: 3.5px solid transparent;
	border-right: 3.5px solid transparent;
	border-top: 6px solid currentColor;
}

.fwmm-ticker__arrow--flat {
	width: 7px;
	height: 2px;
	background: currentColor;
	border-radius: 1px;
}

.fwmm-ticker__sep {
	display: inline-block;
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: #1e3050;
	margin: 0 12px;
	flex-shrink: 0;
}

@keyframes fwmm-ticker-scroll {
	0%   { transform: translateX(0); }
	100% { transform: translateX(-50%); }
}

/* Honor user motion preferences. The ticker still updates content on a timer,
 * but the marquee stops moving for users who've asked the OS to reduce motion. */
@media (prefers-reduced-motion: reduce) {
	.fwmm-ticker__track {
		animation: none;
	}
}
