/* Macrolyx — Market News cards. */

.mlx-news {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 0;
}

/* ---------------- Breaking ticker (slim card) ---------------- */
/* One breaking item at a time, sliding vertically; centered in the card
   vertically, left-aligned horizontally. No header/footer on this card. */

.mlx-news-tickerwrap {
	width: 100%;
	height: 100%;
	flex-direction: row;      /* Title on the left, slider fills the rest. */
	align-items: center;
	justify-content: flex-start;
	gap: 12px;
}

.mlx-news-ticker-title {
	flex: 0 0 8.3333%;        /* 1/12 of the card. */
	min-width: 66px;
	color: var(--mlx-short);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .04em;
	text-transform: uppercase;
	text-shadow: 0 0 8px rgba(var(--mlx-short-rgb), .55);
	border-inline-end: 1px solid var(--mlx-border);
	padding-inline-end: 10px;
	line-height: 1.2;
}

.mlx-news-ticker {
	position: relative;
	height: 22px;
	overflow: hidden;
	flex: 1 1 auto;           /* The remaining 11/12. */
	min-width: 0;
}

.mlx-news-ticker-track { position: absolute; inset: 0; }

.mlx-news-ticker-item {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: flex-start; /* Left-aligned. */
	gap: 8px;
	color: var(--mlx-text);
	font-size: 12.5px;
	text-decoration: none;
	opacity: 0;
	transform: translateY(100%);
}
.mlx-news-ticker-item.is-in {
	opacity: 1;
	transform: translateY(0);
	transition: transform .5s ease, opacity .5s ease;
}
.mlx-news-ticker-item.is-out {
	opacity: 0;
	transform: translateY(-100%);
	transition: transform .5s ease, opacity .5s ease;
}
.mlx-news-ticker-item:hover { color: var(--mlx-accent); }
.mlx-news-ticker-item b {
	color: var(--mlx-accent);
	font-variant-numeric: tabular-nums;
	font-weight: 700;
}
.mlx-news-ticker-flag {
	color: var(--mlx-short);
	font-weight: 700;
	letter-spacing: .06em;
	text-shadow: 0 0 7px var(--mlx-short);
	flex: 0 0 auto;
}
.mlx-news-ticker-empty { color: var(--mlx-muted); font-size: 12px; }

/* ---------------- Feed toolbar ---------------- */

.mlx-news-toolbar {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	padding: 0 0 8px;
}
.mlx-news-cats { display: flex; gap: 4px; flex-wrap: wrap; }

.mlx-news-search {
	margin-inline-start: auto;
	background: rgba(255, 255, 255, .06);
	border: 1px solid var(--mlx-border);
	border-radius: 8px;
	color: var(--mlx-text);
	font-size: 12px;
	padding: 5px 10px;
	width: 170px;
	outline: none;
}
.mlx-news-search:focus { border-color: var(--mlx-accent); }
.mlx-news-search::placeholder { color: var(--mlx-muted); }

.mlx-news-newpill {
	align-self: center;
	margin-bottom: 6px;
	background: var(--mlx-accent);
	color: var(--mlx-bg1);
	border: 0;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	padding: 3px 12px;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .4);
}

/* ---------------- Feed list ---------------- */

.mlx-news-list {
	flex: 1 1 auto;
	overflow: auto;
	min-height: 0;
	transition: opacity .18s ease;
}

.mlx-news-item { border-bottom: 1px solid rgba(255, 255, 255, .05); }
.mlx-news-item.is-breaking { border-inline-start: 2px solid var(--mlx-short); }

.mlx-news-row {
	display: flex;
	gap: 10px;
	padding: 9px 6px;
	cursor: pointer;
}
.mlx-news-row:hover { background: rgba(255, 255, 255, .03); }

.mlx-news-thumb {
	width: 56px;
	height: 42px;
	flex: 0 0 56px;
	border-radius: 6px;
	background-color: rgba(255, 255, 255, .05);
	background-size: cover;
	background-position: center;
}
.mlx-news-thumb.is-empty {
	background-image: linear-gradient(135deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
}

.mlx-news-main { min-width: 0; flex: 1 1 auto; }

.mlx-news-title {
	color: var(--mlx-text);
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.35;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.mlx-news-item.is-open .mlx-news-title { -webkit-line-clamp: unset; }

.mlx-news-dot {
	display: inline-block;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--mlx-short);
	box-shadow: 0 0 6px 1px var(--mlx-short);
	animation: mlx-glow 2.2s ease-in-out infinite;
	margin-inline-end: 6px;
	vertical-align: 1px;
}

.mlx-news-excerpt {
	margin-top: 3px;
	color: var(--mlx-muted);
	font-size: 11.5px;
	line-height: 1.45;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.mlx-news-item.is-open .mlx-news-excerpt { display: none; }

.mlx-news-meta {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
	margin-top: 4px;
	font-size: 10.5px;
	color: var(--mlx-muted);
}
.mlx-news-src { color: var(--mlx-accent); font-weight: 600; }
.mlx-news-tag {
	background: rgba(255, 255, 255, .07);
	border-radius: 999px;
	padding: 1px 8px;
	font-size: 10px;
}
.mlx-news-time { margin-inline-start: auto; white-space: nowrap; }

/* ---------------- Inline detail ---------------- */

.mlx-news-detail { padding: 2px 6px 12px 72px; }

.mlx-news-hero {
	height: 130px;
	border-radius: 8px;
	background-size: cover;
	background-position: center;
	margin-bottom: 8px;
}

.mlx-news-body {
	color: var(--mlx-text);
	font-size: 12px;
	line-height: 1.55;
}
.mlx-news-body p { margin: 0 0 7px; }
.mlx-news-body ul, .mlx-news-body ol { margin: 0 0 7px; padding-inline-start: 18px; }
.mlx-news-body li { margin-bottom: 3px; }
.mlx-news-body blockquote {
	margin: 0 0 7px;
	padding: 6px 10px;
	border-inline-start: 2px solid var(--mlx-accent);
	background: rgba(255, 255, 255, .04);
	border-radius: 0 6px 6px 0;
	color: var(--mlx-muted);
}
.mlx-news-body a { color: var(--mlx-accent); }

.mlx-news-read {
	display: inline-block;
	margin-top: 4px;
	color: var(--mlx-accent);
	font-size: 12px;
	font-weight: 600;
	text-decoration: none;
}

.mlx-news-more {
	display: block;
	width: 100%;
	margin: 8px 0 2px;
	background: rgba(255, 255, 255, .06);
	border: 1px solid var(--mlx-border);
	border-radius: 8px;
	color: var(--mlx-text);
	font-size: 12px;
	padding: 7px;
	cursor: pointer;
}
.mlx-news-more:hover { border-color: var(--mlx-accent); }

.mlx-news-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	min-height: 80px;
	color: var(--mlx-muted);
	font-size: 12px;
	text-align: center;
	padding: 16px;
}
