/* ── News section ───────────────────────────────────────── */
#news-section { }

.news-controls { background: #161b22; border: 1px solid #30363d; border-radius: 8px; padding: 14px 18px; margin-bottom: 20px; display: flex; flex-direction: column; gap: 10px; }
.news-controls-top { display: flex; align-items: center; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid #21262d; }
#news-refresh-btn { padding: 5px 14px; background: transparent; border: 1px solid #30363d; border-radius: 6px; color: #8b949e; font-size: 13px; cursor: pointer; transition: all 0.15s; }
#news-refresh-btn:hover { border-color: #58a6ff; color: #58a6ff; }
#news-refresh-btn:disabled { opacity: 0.4; cursor: default; }
#news-last-updated { font-size: 11px; color: #8b949e; margin-left: auto; }
#sentiments-refresh-btn { padding: 5px 14px; background: transparent; border: 1px solid #30363d; border-radius: 6px; color: #8b949e; font-size: 13px; cursor: pointer; transition: all 0.15s; }
#sentiments-refresh-btn:hover { border-color: #58a6ff; color: #58a6ff; }
#sentiments-refresh-btn:disabled { opacity: 0.4; cursor: default; }
#sentiments-cooldown { font-size: 11px; color: #484f58; }
#sentiments-last-updated { font-size: 11px; color: #8b949e; margin-left: auto; }

.news-filter-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.news-filter-label { font-size: 11px; font-weight: 600; color: #484f58; text-transform: uppercase; letter-spacing: 0.6px; min-width: 68px; }
.news-filter-btns { display: flex; gap: 4px; flex-wrap: wrap; }
.news-source-row { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; min-height: 0; }

.filter-pill, .news-filter, .news-relevance, .sentiments-llm, .news-ticker-filter, .news-source-filter, .sentiments-ticker-filter, .profile-ticker-filter, .congress-ticker-filter { padding: 4px 12px; background: transparent; border: 1px solid #30363d; border-radius: 20px; color: #8b949e; font-size: 12px; cursor: pointer; transition: all 0.15s; white-space: nowrap; }
.filter-pill:hover, .news-filter:hover, .news-relevance:hover, .sentiments-llm:hover, .news-ticker-filter:hover, .news-source-filter:hover, .sentiments-ticker-filter:hover, .profile-ticker-filter:hover, .congress-ticker-filter:hover { border-color: #58a6ff; color: #e0e0e0; }
.filter-pill.active, .news-filter.active, .news-relevance.active, .sentiments-llm.active, .news-ticker-filter.active, .news-source-filter.active, .sentiments-ticker-filter.active, .profile-ticker-filter.active, .congress-ticker-filter.active { background: #21262d; color: #e0e0e0; border-color: #58a6ff; }
.news-filter.bullish.active { background: #3fb95022; border-color: #3fb950; color: #3fb950; }
.news-filter.bearish.active { background: #f8514922; border-color: #f85149; color: #f85149; }
.news-filter.neutral.active  { background: #8b949e22; border-color: #8b949e; color: #8b949e; }

.sentiments-data-badge { padding: 4px 12px; background: #21262d; border: 1px solid #58a6ff; border-radius: 20px; color: #58a6ff; font-size: 12px; font-weight: 600; letter-spacing: 0.4px; cursor: default; }

.news-relevance-badge { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 20px; background: #30363d; color: #8b949e; border: 1px solid #484f58; letter-spacing: 0.4px; text-transform: uppercase; }
.news-sentiment { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 20px; letter-spacing: 0.4px; text-transform: uppercase; }
.news-sentiment.bullish { background: #3fb95022; color: #3fb950; border: 1px solid #3fb95044; }
.news-sentiment.bearish { background: #f8514922; color: #f85149; border: 1px solid #f8514944; }
.news-sentiment.neutral  { background: #8b949e22; color: #8b949e;  border: 1px solid #8b949e44; }

/* ── Overall sentiment cards ────────────────────────────── */
.news-overall-row { display: flex; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.news-overall-card { border-radius: 10px; padding: 20px 24px; display: flex; gap: 20px; align-items: flex-start; background: #161b22; border: 1px solid #30363d; flex: 1; min-width: 280px; }
.news-overall-indicator { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 88px; padding: 14px 10px; border-radius: 8px; gap: 4px; flex-shrink: 0; }
.news-overall-bullish .news-overall-indicator { background: #3fb95018; border: 1px solid #3fb95044; }
.news-overall-bearish .news-overall-indicator { background: #f8514918; border: 1px solid #f8514944; }
.news-overall-neutral  .news-overall-indicator { background: #8b949e18; border: 1px solid #8b949e44; }
.news-overall-icon { font-size: 26px; line-height: 1; }
.news-overall-bullish .news-overall-icon { color: #3fb950; }
.news-overall-bearish .news-overall-icon { color: #f85149; }
.news-overall-neutral  .news-overall-icon { color: #8b949e; }
.news-overall-horizon { font-size: 10px; color: #484f58; background: #21262d; border: 1px solid #30363d; border-radius: 4px; padding: 1px 5px; margin-top: 2px; letter-spacing: 0.4px; }
.news-overall-loading { opacity: 0.6; }
.news-overall-indicator-loading { background: #21262d; min-width: 88px; min-height: 72px; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
.news-overall-skeleton { height: 12px; border-radius: 6px; margin-bottom: 8px; background: linear-gradient(90deg, #21262d 25%, #30363d 50%, #21262d 75%); background-size: 800px 100%; animation: shimmer 1.4s infinite linear; }
.news-overall-skeleton-short { width: 60%; }
.news-overall-word { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; }
.news-overall-bullish .news-overall-word { color: #3fb950; }
.news-overall-bearish .news-overall-word { color: #f85149; }
.news-overall-neutral  .news-overall-word { color: #8b949e; }
.news-overall-body { flex: 1; min-width: 0; }
.news-overall-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.news-overall-label { font-size: 10px; font-weight: 700; color: #484f58; text-transform: uppercase; letter-spacing: 0.8px; }
.news-overall-reasoning { font-size: 13.5px; color: #c9d1d9; line-height: 1.7; margin: 0; }
.sentiment-points { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.sentiment-points li { font-size: 13.5px; color: #c9d1d9; line-height: 1.6; padding-left: 12px; border-left: 2px solid #30363d; }
.news-overall-headlines { margin: 12px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.news-overall-headline { font-size: 12px; color: #8b949e; padding-left: 10px; border-left: 2px solid #30363d; line-height: 1.5; transition: color 0.15s; }
.news-overall-headline:hover { color: #c9d1d9; border-left-color: #58a6ff; }
@keyframes news-card-flash { 0%,100% { background: transparent; } 30% { background: #1f3a5f; } }
.news-card-highlight { animation: news-card-flash 1.8s ease; }

/* ── Earnings prediction card ─────────────────────────────── */
.earnings-card { flex: 1 1 100%; }
.earnings-details { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.earnings-date { font-size: 13px; color: #c9d1d9; font-weight: 600; }
.earnings-eps { font-size: 12px; color: #8b949e; background: #21262d; border: 1px solid #30363d; border-radius: 4px; padding: 2px 8px; }
.earnings-card .news-overall-reasoning { max-width: 900px; }

/* ── Loading / empty states ─────────────────────────────── */
.news-loading, .news-empty { color: #8b949e; font-size: 14px; padding: 40px 0; text-align: center; grid-column: 1 / -1; }
.news-loading { display: flex; align-items: center; justify-content: center; gap: 6px; }
.loading-dots { display: inline-flex; gap: 4px; align-items: center; margin-left: 2px; }
.loading-dots span { width: 5px; height: 5px; border-radius: 50%; background: #484f58; animation: dot-pulse 1.4s ease-in-out infinite; }
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dot-pulse { 0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; } 40% { transform: scale(1); opacity: 1; } }

/* ── News grid container ───────────────────────────────── */
#news-container, #world-news-container { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 760px) { #news-container, #world-news-container { grid-template-columns: 1fr; } }

/* ── News cards ─────────────────────────────────────────── */
.news-card { background: #161b22; border: 1px solid #30363d; border-radius: 8px; padding: 16px 20px; transition: border-color 0.15s; display: flex; flex-direction: column; }
.news-card:hover { border-color: #58a6ff44; }
.news-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.news-ticker { font-size: 11px; font-weight: 700; background: #21262d; border-radius: 4px; padding: 2px 7px; letter-spacing: 0.5px; }
.news-source { font-size: 11px; color: #8b949e; background: #21262d; border: 1px solid #30363d; border-radius: 4px; padding: 2px 7px; }
.news-date { font-size: 11px; color: #484f58; margin-left: auto; }
.news-title { display: inline; font-size: 15px; font-weight: 600; color: #e0e0e0; text-decoration: none; line-height: 1.4; cursor: pointer; }
.news-title-wrap { margin-bottom: 6px; }
.news-title:hover { color: #58a6ff; }
.news-summary { font-size: 13px; color: #8b949e; line-height: 1.5; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
