/* news.css ─ News tab: filter suite, saved-articles, NEW badge, per-card actions. */

/* News-tab filter suite. Sits between the metal picker and the article feed.
   Search box + recency dropdown + Clear share one row; the source chip
   strip wraps below; the result counter sits under both. */
.news-filter-bar {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin: 8px 0 6px;
}
.news-filter-search {
  flex: 1 1 auto;
  min-width: 0;
  background: #1a1d28;
  border: 1px solid #2a2e3e;
  color: #d8dceb;
  border-radius: 4px;
  padding: 5px 8px;
  font-size: 12px;
}
.news-filter-search::placeholder { color: #555c70; }
.news-filter-search:focus { outline: none; border-color: #c9a84c; }
.news-filter-recency {
  background: #1a1d28;
  border: 1px solid #2a2e3e;
  color: #d8dceb;
  border-radius: 4px;
  padding: 5px 6px;
  font-size: 12px;
  cursor: pointer;
}
.news-filter-clear {
  background: transparent;
  border: 1px solid #2a2e3e;
  color: #b8bdd0;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11.5px;
  cursor: pointer;
}
.news-filter-clear:hover { background: #1a1d28; color: #d8dceb; }
.news-filter-clear:disabled { opacity: 0.4; cursor: default; }
.news-filter-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 6px;
}
.news-filter-sources:empty { display: none; }
.news-filter-source-btn {
  background: rgba(201, 168, 76, 0.12);
  border: 1px solid #c9a84c;
  color: #c9a84c;
  padding: 2px 8px;
  border-radius: 9px;
  font-size: 10.5px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.news-filter-source-btn:hover { background: rgba(201, 168, 76, 0.22); }
.news-filter-source-btn.excluded {
  background: transparent;
  color: #555c70;
  border-color: #2a2e3e;
}
.news-filter-source-btn.excluded:hover { background: #1a1d28; color: #777e92; }
.news-filter-count {
  font-size: 11px;
  color: #777e92;
  margin-bottom: 6px;
}
.news-filter-count:empty { display: none; }

/* "★ Saved" filter button — same shape as Clear; lights up gold when active. */
#news-filter-saved.active {
  background: rgba(255, 215, 0, 0.15);
  color: #ffd700;
  border-color: #ffd700;
}

/* Per-card action buttons — Save (★) + Insert into deck (↪). Float top-right
   of each card; show on hover for less visual noise, full-opacity when active
   (saved articles keep their star visible). */
.mkt-news-card { position: relative; }
.mkt-news-card-actions {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  gap: 2px;
  opacity: 0.45;
  transition: opacity 0.12s;
}
.mkt-news-card:hover .mkt-news-card-actions { opacity: 1; }
.mkt-news-card-action-btn {
  background: transparent;
  border: 1px solid #2a2e3e;
  color: #b8bdd0;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 3px;
  cursor: pointer;
  line-height: 1.2;
}
.mkt-news-card-action-btn:hover { background: #1a1d28; color: #d8dceb; }
.mkt-news-card-action-btn.saved {
  opacity: 1;
  color: #ffd700;
  border-color: #ffd700;
  background: rgba(255, 215, 0, 0.10);
}
.mkt-news-card-actions:has(.saved) { opacity: 1; }

/* Metal-tag chips on merged-feed cards — tiny pill showing which metal feed
   this article came from (Pt / Pd / Rh / etc.) when multi-metal is active. */
.mkt-news-card-metals {
  display: inline-flex;
  gap: 3px;
  margin-right: 6px;
}
.mkt-news-card-metal-tag {
  font-size: 9px;
  font-weight: 600;
  padding: 0 5px;
  border-radius: 7px;
  background: rgba(201, 168, 76, 0.18);
  color: #c9a84c;
  letter-spacing: 0.3px;
}

/* NEW badge — articles published since last visit (per metal). */
.mkt-news-card-new {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  padding: 0 5px;
  border-radius: 7px;
  background: #2da44e;
  color: #fff;
  margin-right: 6px;
  letter-spacing: 0.5px;
}

/* Search-match highlighting inside title / snippet. */
.mkt-news-card mark {
  background: rgba(255, 215, 0, 0.35);
  color: inherit;
  padding: 0 1px;
  border-radius: 2px;
}

/* Saved-articles pinned section — floats at top of feed when any are saved. */
.news-saved-section {
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 4px;
  padding: 6px 8px 2px;
  margin-bottom: 8px;
  background: rgba(255, 215, 0, 0.04);
}
.news-saved-section-head {
  font-size: 10.5px;
  color: #ffd700;
  font-weight: 600;
  margin-bottom: 4px;
}

