/* ═══════════════════════════════════════════════════════════════════════
   news.css — Phase 3: Market Intelligence tab.
   Replaces all inline styles in news.js with semantic CSS classes.
   Dynamic values (computed colors, percentages) remain inline in JS.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Page layout ─────────────────────────────────────────────────────── */
.ni-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--green);
  margin-bottom: 14px;
}
.ni-page-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
}
.ni-page-meta { font-size: 11px; color: var(--dimmer); }

/* 2-column layout */
.ni-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 16px;
  margin-bottom: 16px;
}
.ni-right-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Shared panel card ───────────────────────────────────────────────── */
.ni-panel {
  background: var(--surface);
  border: 1px solid var(--border);
}
.ni-panel-header {
  background: var(--green);
  padding: 8px 12px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.ni-panel-body     { padding: 12px 14px; }
.ni-panel-body-lg  { padding: 14px; }

/* ── Economic Calendar ───────────────────────────────────────────────── */
.ni-cal-panel  { border: 1px solid var(--border); }
.ni-cal-header { background: var(--green); padding: 10px 14px; }
.ni-cal-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.ni-cal-title {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.ni-cal-sub   { font-size: 11px; color: rgba(255,255,255,.5); margin-left: 10px; }
.ni-cal-count { font-size: 10px; color: rgba(255,255,255,.5); }
.ni-cal-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ni-cal-input {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 8px;
  outline: none;
  border-radius: 2px;
}
.ni-cal-sep { color: rgba(255,255,255,.4); }
.ni-cal-filter-wrap { display: flex; gap: 4px; margin-left: auto; }
.ni-cal-filter-btn {
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 2px;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.ni-cal-filter-btn.active {
  border: 1px solid rgba(255,255,255,.8);
  background: rgba(255,255,255,.2);
  color: #fff;
}
.ni-cal-filter-btn.inactive {
  border: 1px solid rgba(255,255,255,.3);
  background: transparent;
  color: rgba(255,255,255,.6);
}
.ni-cal-scroll { max-height: calc(100vh - 340px); overflow-y: auto; }
.ni-cal-footer {
  padding: 7px 14px;
  background: var(--bg1);
  border-top: 1px solid var(--border);
  font-size: 10px;
  color: var(--dimmer);
  display: flex;
  gap: 16px;
}
.ni-cal-empty { padding: 28px; text-align: center; background: var(--surface); }
.ni-cal-empty-title { font-size: 13px; font-weight: 600; color: var(--dim); margin-bottom: 6px; }
.ni-cal-empty-sub   { font-size: 12px; color: var(--dimmer); }

/* ── Event card ──────────────────────────────────────────────────────── */
.ni-event-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left-width: 3px; /* color set inline per impact level */
  padding: 12px 14px;
  transition: background .1s;
}
.ni-event-card:hover { background: var(--bg2); }
.ni-event-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.ni-event-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--white);
  line-height: 1.4;
  flex: 1;
}
.ni-event-bias-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid; /* color set inline */
}
.ni-event-reason { font-size: 11px; color: var(--dim); line-height: 1.5; margin-bottom: 6px; }
.ni-event-footer { display: flex; justify-content: space-between; font-size: 10px; color: var(--dimmer); }
.ni-event-impact { font-weight: 600; text-transform: uppercase; font-size: 9px; /* color inline */ }
.ni-event-data {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
  font-size: 11px;
}
.ni-event-data span   { color: var(--dim); }
.ni-event-data strong { color: var(--white); font-family: var(--mono); }

/* ── Fear & Greed ────────────────────────────────────────────────────── */
.ni-fg-body    { padding: 14px; display: flex; align-items: center; gap: 16px; }
.ni-fg-gauge   { position: relative; width: 64px; height: 64px; flex-shrink: 0; }
.ni-fg-svg     { width: 64px; height: 64px; transform: rotate(-90deg); }
.ni-fg-val-wrap {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.ni-fg-value   { font-family: var(--mono); font-size: 17px; font-weight: 700; line-height: 1; /* color inline */ }
.ni-fg-right   { flex: 1; }
.ni-fg-label   { font-size: 15px; font-weight: 700; margin-bottom: 4px; /* color inline */ }
.ni-fg-desc    { font-size: 11px; color: var(--dim); line-height: 1.5; }
.ni-fg-history { display: flex; gap: 2px; align-items: flex-end; margin-top: 8px; }
.ni-fg-bar     { flex: 1; border-radius: 1px; cursor: default; /* height & bg inline */ }
.ni-fg-hist-lbl { font-size: 9px; color: var(--dimmer); margin-top: 2px; }

/* ── Aggregate Sentiment ─────────────────────────────────────────────── */
.ni-sent-value    { font-family: var(--mono); font-size: 22px; font-weight: 700; margin-bottom: 8px; /* color inline */ }
.ni-sent-bar-wrap { height: 5px; border-radius: 3px; overflow: hidden; background: var(--bg3); margin-bottom: 6px; }
.ni-sent-bar      { display: flex; height: 100%; }
.ni-sent-bull     { background: var(--green); /* width inline */ }
.ni-sent-bear     { background: var(--red);   /* width inline */ }
.ni-sent-split    { display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 6px; }
.ni-sent-split .pos, .ni-sent-split .neg { font-weight: 600; }
.ni-sent-count    { font-size: 11px; color: var(--dim); }

/* ── Reddit panel ────────────────────────────────────────────────────── */
.ni-reddit-header {
  background: var(--green);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ni-reddit-title  { font-size: 10px; font-weight: 600; color: #fff; letter-spacing: .1em; text-transform: uppercase; }
.ni-reddit-live   { font-size: 9px; color: rgba(255,255,255,.6); }
.ni-reddit-body   { padding: 12px 14px; }
.ni-reddit-mood   { font-family: var(--mono); font-size: 18px; font-weight: 700; margin-bottom: 5px; /* color inline */ }
.ni-reddit-stats  { font-size: 11px; color: var(--dim); margin-bottom: 8px; }
.ni-reddit-post   { display: block; background: var(--bg1); border: 1px solid var(--border); padding: 8px 10px; text-decoration: none; }
.ni-reddit-post-lbl   { font-size: 10px; color: var(--dimmer); margin-bottom: 3px; }
.ni-reddit-post-title { font-size: 11px; color: var(--white); line-height: 1.4; }
.ni-reddit-post-meta  { font-size: 10px; color: var(--dimmer); margin-top: 4px; }
.ni-reddit-error  { padding: 12px 14px; color: var(--dim); font-size: 11px; }

/* ── Trending ────────────────────────────────────────────────────────── */
.ni-trending-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
}
.ni-trending-num  { font-family: var(--mono); font-size: 11px; color: var(--dimmer); width: 16px; }
.ni-trending-sym  { font-size: 11px; font-weight: 700; /* color inline: green if current coin, else white */ }
.ni-trending-name { font-size: 11px; color: var(--dim); flex: 1; }
.ni-trending-you  { font-size: 9px; color: var(--green); font-weight: 700; background: var(--green-bg); padding: 1px 5px; }
.ni-trending-empty { color: var(--dim); font-size: 11px; }

/* ── Signal × Sentiment matrix ──────────────────────────────────────── */
.ni-matrix-row {
  padding: 7px 12px;
  border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;
}
.ni-matrix-row.bold-green { border-left-color: var(--green); background: var(--green-bg); }
.ni-matrix-row.bold-red   { border-left-color: var(--red);   background: var(--red-bg); }
.ni-matrix-cond   { font-size: 11px; color: var(--dim); margin-bottom: 1px; }
.ni-matrix-result { font-size: 11px; font-weight: 700; /* color inline */ }

/* ── Next event countdown ────────────────────────────────────────────── */
.ni-countdown { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--red); }
.ni-countdown-body  { padding: 12px 14px; }
.ni-countdown-title { font-size: 12px; font-weight: 600; color: var(--white); margin-bottom: 4px; }
.ni-countdown-top   { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.ni-countdown-time  { font-family: var(--mono); font-size: 18px; font-weight: 700; color: var(--red); }
.ni-countdown-when  { font-size: 11px; color: var(--dim); }
.ni-countdown-bias  { display: flex; align-items: center; gap: 8px; }
.ni-countdown-bias-icon { font-size: 13px; font-weight: 700; /* color inline */ }
.ni-countdown-reason{ font-size: 11px; color: var(--dim); }
.ni-countdown-data  { display: flex; gap: 10px; margin-top: 6px; font-size: 10px; color: var(--dim); }
.ni-countdown-data strong { color: var(--white); font-family: var(--mono); }

/* ── News feed ───────────────────────────────────────────────────────── */
.ni-feed-section { margin-top: 16px; }
.ni-feed-grid    { display: grid; grid-template-columns: repeat(2,1fr); gap: 6px; }
.ni-feed-empty   {
  padding: 24px;
  background: var(--bg1);
  border: 1px solid var(--border);
  text-align: center;
  color: var(--dim);
  font-size: 12px;
  grid-column: 1 / -1;
}

/* ── Article card ────────────────────────────────────────────────────── */
.ni-article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left-width: 3px; /* color inline per sentiment */
  padding: 11px 13px;
  margin-bottom: 6px;
  transition: background .1s;
}
.ni-article:hover { background: var(--bg2); }
.ni-article-top   { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 5px; }
.ni-article-link  { font-size: 12px; font-weight: 600; color: var(--white); text-decoration: none; line-height: 1.4; flex: 1; }
.ni-article-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  white-space: nowrap;
  letter-spacing: .06em;
  border: 1px solid; /* color + bg inline */
}
.ni-article-footer { display: flex; justify-content: space-between; font-size: 10px; color: var(--dimmer); }

/* ── Skeleton (loading state) ────────────────────────────────────────── */
.ni-skel-header { padding-bottom: 10px; border-bottom: 2px solid var(--green); margin-bottom: 14px; }
.ni-skel-title  { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.ni-skel-right  { display: flex; flex-direction: column; gap: 12px; }

/* ── Phase 7 additions ────────────────────────────────────────────────── */
/* "LIVE" badge inside panel header (Reddit panel header, generic usage) */
.ni-live-badge { font-size: 9px; opacity: .6; margin-left: 6px; }
