/* First Ag Market Ticker — look & feel matched to firstagcapital.com */

.fac-ticker {
	position: relative;
	width: 100%;
	background: #f5f5f6;
	border-top: 1px solid #ececee;
	border-bottom: 1px solid #ececee;
	line-height: 1.25;
	overflow: hidden;
	/* Typography inherits from the theme so the bar blends with the site,
	   exactly as on firstagcapital.com. */
}

.fac-ticker__data { display: none; }

.fac-ticker__viewport {
	overflow: hidden;
	width: 100%;
}

.fac-ticker__track {
	display: flex;
	align-items: stretch;
	width: max-content;
	padding: 10px 0;
}

/* --- Marquee (default) --------------------------------------------------- */

.fac-ticker--scroll .fac-ticker__track {
	animation: fac-scroll var(--fac-dur, 60s) linear infinite;
	will-change: transform;
}

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

@keyframes fac-scroll {
	from { transform: translateX(0); }
	to   { transform: translateX(-50%); } /* track holds two copies */
}

@media (prefers-reduced-motion: reduce) {
	.fac-ticker--scroll .fac-ticker__track { animation: none; }
	.fac-ticker--scroll .fac-ticker__viewport { overflow-x: auto; }
}

/* --- Static variant ([fac_ticker scroll="no"]) ---------------------------- */

.fac-ticker--static .fac-ticker__track {
	width: 100%;
	flex-wrap: wrap;
	justify-content: center;
	row-gap: 8px;
}

.fac-ticker--static .fac-item:last-child { border-right: 0; }

/* --- Items ---------------------------------------------------------------- */

.fac-item {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 0 26px;
	border-right: 1px solid #d9dadd;
	white-space: nowrap;
}

.fac-item__main {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 15px;
	color: #3d4247;
}

.fac-item__icon {
	font-size: 16px;
	line-height: 1;
}

.fac-item__label {
	font-weight: 700;
	color: #17181a;
}

.fac-item__value {
	font-weight: 600;
	color: #232529;
	font-variant-numeric: tabular-nums;
}

.fac-item__sep {
	width: 1px;
	align-self: stretch;
	min-height: 18px;
	background: #d9dadd;
	margin: 0 4px;
}

.fac-item__change {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.fac-up   { color: #1d9e46; }
.fac-down { color: #d64545; }
.fac-flat { color: #9aa0a6; }

.fac-arr {
	width: 15px;
	height: 11px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	flex: none;
}

.fac-item__sub {
	margin-top: 2px;
	font-size: 11px;
	font-style: italic;
	color: #9aa0a6;
	text-align: center;
}

/* Source attribution line */
.fac-ticker__attrib {
	font-size: 10px;
	font-style: italic;
	color: #9aa0a6;
	text-align: center;
	padding: 0 14px 6px;
	line-height: 1.4;
}

/* Value-changed flash */
.fac-flash { animation: fac-flash 1.1s ease-out; }

@keyframes fac-flash {
	0%   { background: #fff3c4; }
	100% { background: transparent; }
}

/* --- Responsive ------------------------------------------------------------ */

@media (max-width: 782px) {
	.fac-item { padding: 0 16px; }
	.fac-item__main { font-size: 13.5px; gap: 6px; }
	.fac-item__sub { font-size: 10px; }
	.fac-ticker__track { padding: 8px 0; }
}
