/* ══════════════════════════════════════════════════════════════════
   FAN COMMENTS (Artist Tracker → Fan Comments, #artistFanComments)
   --------------------------------------------------------------------
   Root cause of the "no CSS / dense unstyled list" the client flagged
   (paste-1783376897095.png, Denton 2026-07-06): the fan-comment styles
   lived in src/features/management/grids.css, which the redesign shell
   never links — same dropped-CSS pattern already fixed for Events
   (overrides-events.css) and Sync Licensing / Brand Leads
   (management-panel.css). On top of that, the panel's card boxes use
   .card / .card-padded, which are defined ONLY in the unlinked
   src/core/layout.css, so KPIs, Fan Intel, Sentiment, Themes, Hot Takes
   and every comment card rendered as chrome-less plain-text blocks.

   Fix (CSS-only, modular, co-located, linked in index.html AFTER the
   other feature CSS): restore the card chrome + the fan-comment feature
   classes, all SCOPED to #artistFanComments so nothing can leak onto
   other panels that style .card differently.

   TOKEN NOTE (matches the management-panel.css gotcha): in this shell
   --divider aliases var(--border) at :root but --border is only set on
   body[data-variant="c"]; use var(--border) (inherited onto the card),
   with a hard rgba fallback. --gold is undefined in this shell → fall
   back to --amber for the hot-take accent.
   ══════════════════════════════════════════════════════════════════ */

/* ── Card chrome (restored from core/layout.css, scoped) ── */
#artistFanComments .card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border, rgba(0,0,0,0.08));
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
#artistFanComments .card-padded { padding: var(--space-4) var(--space-5); }

/* ── Comment feed cards ── */
#artistFanComments .fan-comment-item { transition: box-shadow var(--duration-base) var(--ease), border-color var(--duration-base) var(--ease); }
#artistFanComments .fan-comment-item:hover { box-shadow: var(--shadow-md, 0 6px 20px rgba(0,0,0,0.10)); }

/* ── Filter pills: styling comes from the Industry Wire .wf-pill recipe
   (wire.css) — .fan-filter-btn is only the JS hook. Feed toggles below. ── */
#artistFanComments .feed-toggle { display: flex; gap: var(--space-1); }
#artistFanComments .feed-toggle-btn {
  font-family: var(--font-body); font-size: 12px; font-weight: 700;
  padding: var(--space-1) var(--space-3); border-radius: 999px;
  border: 1px solid var(--border-med, rgba(0,0,0,0.12)); background: transparent; color: var(--text-3);
  cursor: pointer; transition: all 150ms var(--ease);
}
#artistFanComments .feed-toggle-btn.active { background: var(--green-dim); color: var(--green); border-color: rgba(45,106,79,0.4); }

/* ── By Video dropdown — green ghost trigger, house pop-out menu ── */
#artistFanComments .fc-video-ctx { position: relative; display: inline-block; margin-bottom: 14px; }
#artistFanComments .fc-video-trigger {
  font-family: var(--font-body); font-size: 13px; font-weight: 700;
  padding: 8px 18px; border-radius: 999px; border: 1px solid rgba(45,106,79,0.25);
  background: transparent; color: var(--green); cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; max-width: min(90vw, 460px);
  transition: all 150ms var(--ease);
}
#artistFanComments .fc-video-trigger:hover { background: var(--green-dim); border-color: rgba(45,106,79,0.4); }
#artistFanComments .fc-video-trigger .fc-vt-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
#artistFanComments .fc-video-trigger svg { width: 10px; height: 10px; flex-shrink: 0; transition: transform 150ms var(--ease); }
#artistFanComments .fc-video-ctx.open .fc-video-trigger svg { transform: rotate(180deg); }
#artistFanComments .fc-video-menu {
  position: absolute; left: 0; top: calc(100% + 8px); z-index: 200;
  min-width: 340px; max-width: min(90vw, 560px); max-height: 340px;
  overflow-y: auto; scrollbar-width: thin;
  background: var(--surface); border: 1px solid var(--border-med); border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12); padding: 6px; display: none;
}
#artistFanComments .fc-video-ctx.open .fc-video-menu { display: block; }

/* ── By Video selector — house menu rows (Tasks bubble recipe) ── */
#artistFanComments .fc-video-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; text-align: left; font-family: var(--font-body); font-size: 13px; font-weight: 600;
  color: var(--text-2); background: none; border: none; border-radius: 8px;
  padding: 8px 10px; cursor: pointer; transition: background 120ms var(--ease);
}
#artistFanComments .fc-video-row:hover,
#artistFanComments .fc-video-row.active { background: var(--green-dim); color: var(--green); }
#artistFanComments .fc-video-row .fc-video-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
#artistFanComments .fc-video-row .fc-video-count { font-family: var(--font-mono); font-size: 11px; font-weight: 500; color: var(--text-3); flex-shrink: 0; }
#artistFanComments .fc-video-row.active .fc-video-count { color: var(--green); }

/* ── Sentiment pulse (FAN MOOD) ── */
#artistFanComments .sentiment-bar { display: flex; height: 28px; border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; }
#artistFanComments .sentiment-bar div {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 700; color: #fff;
  min-width: 30px; transition: width var(--duration-slow) var(--ease);
}
#artistFanComments .sentiment-legend { display: flex; gap: var(--space-4); flex-wrap: wrap; font-size: var(--text-sm); color: var(--text-muted); margin-bottom: 8px; }
#artistFanComments .sentiment-legend span { display: inline-flex; align-items: center; gap: var(--space-1); }
#artistFanComments .sentiment-legend .dot { width: 8px; height: 8px; border-radius: var(--radius-full); display: inline-block; }
#artistFanComments .sentiment-summary { font-family: var(--font-mono); font-size: var(--text-sm); font-weight: 600; color: var(--text); margin-bottom: 16px; }

/* ── Per-video sentiment table ── */
#artistFanComments .video-sentiment-table { width: 100%; font-size: var(--text-sm); border-collapse: collapse; }
#artistFanComments .video-sentiment-table th {
  font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  color: var(--text-faint); text-align: left; padding: var(--space-2); border-bottom: 1px solid var(--border, rgba(0,0,0,0.08));
}
#artistFanComments .video-sentiment-table td {
  padding: var(--space-2); border-bottom: 1px solid var(--border-faint, rgba(0,0,0,0.04));
  color: var(--text-muted); cursor: pointer;
}
#artistFanComments .video-sentiment-table tr:hover td { color: var(--text); background: rgba(45,106,79,0.03); }
#artistFanComments .video-sentiment-table .mini-bar { display: flex; height: 6px; border-radius: var(--radius-sm); overflow: hidden; min-width: 80px; }
#artistFanComments .video-sentiment-table .mini-bar div { height: 100%; }

/* ── Trending theme pills — same ghost-pill family ── */
#artistFanComments .theme-pill {
  font-family: var(--font-body); font-size: 12px; font-weight: 700;
  padding: var(--space-2) var(--space-3); border-radius: 999px;
  border: 1px solid var(--border-med, rgba(0,0,0,0.12)); background: transparent; color: var(--text-2);
  cursor: pointer; transition: all 150ms var(--ease); display: inline-flex; align-items: center; gap: var(--space-2);
}
#artistFanComments .theme-pill:hover { border-color: rgba(45,106,79,0.4); color: var(--green); background: var(--green-dim); }
#artistFanComments .theme-pill.active { border-color: rgba(45,106,79,0.4); color: var(--green); background: var(--green-dim); }
#artistFanComments .theme-pill .pill-count { font-family: var(--font-mono); font-size: 10px; font-weight: 500; color: var(--text-3); }
