/* /reports/_lib/hal-spotlight.css
   Dual-view ticker spotlight — adds a sticky "spotlighting {TICKER}" bar
   plus a styled panel that each dashboard fills with its ticker-specific
   data via a renderHalSpotlight(ticker, container) adapter function.
   The dashboard's existing portfolio/universe view stays unchanged. */

.hal-spotlight-bar {
  position: sticky; top: 0; z-index: 9000;
  display: none;
  align-items: center; gap: 14px;
  padding: 14px 22px;
  background: linear-gradient(135deg, #5B21B6, #0D9373);
  border-bottom: 2px solid #4C1D95;
  font-size: 15px; color: #FFFFFF; font-weight: 700;
  letter-spacing: 0.2px;
  box-shadow: 0 4px 12px rgba(91,33,182,0.25);
}
.hal-spotlight-bar.show { display: flex; }
.hal-spotlight-bar strong {
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.5px;
  background: rgba(255,255,255,0.20);
  padding: 3px 12px;
  border-radius: 8px;
  margin: 0 4px;
}
.hal-spotlight-bar em { color: rgba(255,255,255,0.92); font-style: normal; font-weight: 600; }
.hal-spotlight-bar .clear-link {
  margin-left: auto;
  color: #FFFFFF;
  background: rgba(255,255,255,0.22);
  padding: 6px 14px;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.3px;
  transition: background 0.15s;
}
.hal-spotlight-bar .clear-link:hover { background: rgba(255,255,255,0.36); }

/* ── H1 ticker pill (auto-injected by hal-spotlight.js) ────────── */
/* Keeps the spotlighted ticker visible right next to the page title
   so even when the user scrolls past the sticky bar, they always see
   "📍 MSFT" next to the dashboard name. Click × to clear. */
.hal-spotlight-h1-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 10px;
  margin-left: 10px;
  background: linear-gradient(135deg, #5B21B6, #0D9373);
  color: #FFFFFF;
  border-radius: 999px;
  font-size: 0.75em;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: none;
  vertical-align: middle;
  box-shadow: 0 2px 6px rgba(91,33,182,0.30);
  line-height: 1.2;
}
.hal-spotlight-h1-badge .pin { font-size: 0.95em; }
.hal-spotlight-h1-badge .tk { font-weight: 900; letter-spacing: 0.5px; }
.hal-spotlight-h1-badge .x {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  margin-left: 2px;
  transition: background 0.15s, transform 0.15s;
}
.hal-spotlight-h1-badge .x:hover { background: rgba(255,255,255,0.45); transform: scale(1.10); }

.hal-spotlight-section {
  display: none;
  margin: 24px 0;
  padding: 20px 22px;
  background: #FFFFFF;
  border: 2px solid rgba(139,92,246,.40);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(139,92,246,.10);
  position: relative;
}
.hal-spotlight-section.show { display: block; }
.hal-spotlight-section::before {
  content: '';
  position: absolute; top: -1px; left: -1px; right: -1px; height: 3px;
  background: linear-gradient(90deg, #8B5CF6, #0D9373);
  border-radius: 12px 12px 0 0;
}
.hal-spotlight-section h2 {
  font-size: 17px; font-weight: 800; color: #4C1D95;
  margin: 0 0 14px;
  display: flex; align-items: center; gap: 8px;
  letter-spacing: -0.01em;
}
.hal-spotlight-section .kicker {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: #6D28D9; font-weight: 700; margin-bottom: 4px;
}

.hal-spotlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.hal-spotlight-tile {
  padding: 12px 14px;
  background: #F7FAF9;
  border: 1px solid #E0E6E3;
  border-radius: 8px;
}
.hal-spotlight-tile .label {
  font-size: 10px; text-transform: uppercase; letter-spacing: .08em;
  color: #0B7A60; font-weight: 700; margin-bottom: 4px;
}
.hal-spotlight-tile .value {
  font-size: 18px; font-weight: 800; color: #1B2A4A;
  line-height: 1.2;
}
.hal-spotlight-tile .value.pos { color: #059669; }
.hal-spotlight-tile .value.neg { color: #B91C1C; }
.hal-spotlight-tile .value.muted { color: #6B7280; font-size: 14px; }
.hal-spotlight-tile .sub {
  font-size: 11px; color: #4A5568; margin-top: 3px; line-height: 1.4;
}

.hal-spotlight-note {
  margin-top: 12px; padding: 10px 14px;
  background: rgba(245, 158, 11, 0.08);
  border-left: 3px solid #F59E0B;
  border-radius: 0 6px 6px 0;
  font-size: 12px; color: #78350F; line-height: 1.5;
}
.hal-spotlight-loading {
  padding: 16px; color: #4A5568; font-size: 13px;
  display: flex; align-items: center; gap: 8px;
}
.hal-spotlight-loading::before {
  content: ''; width: 14px; height: 14px;
  border: 2px solid #E0E6E3; border-top-color: #8B5CF6;
  border-radius: 50%; animation: spinHalSpot .8s linear infinite;
}
@keyframes spinHalSpot { to { transform: rotate(360deg); } }
.hal-spotlight-error {
  padding: 12px 14px; color: #B91C1C; font-size: 13px;
  background: #FEF2F2; border-radius: 6px;
  border-left: 3px solid #DC2626;
}

/* ── Enhanced bar fields (price, change, rating, plan, conviction) ─── */
/* These are injected by hal-spotlight.js after fetching the HAL orchestrator
   response. Designed to wrap gracefully on narrow viewports and stay legible
   against the bar's purple→green gradient. */
.hal-spotlight-bar { flex-wrap: wrap; row-gap: 8px; }
.hal-spotlight-bar .hs-icon { font-size: 16px; }
.hal-spotlight-bar .hs-ticker strong {
  font-weight: 900; font-size: 18px; letter-spacing: 0.5px;
  background: rgba(255,255,255,0.20);
  padding: 3px 12px; border-radius: 8px;
}
.hal-spotlight-bar .hs-price {
  font-weight: 800; font-size: 15px;
  background: rgba(255,255,255,0.14); padding: 3px 10px; border-radius: 6px;
}
.hal-spotlight-bar .hs-change {
  font-weight: 700; font-size: 13px; padding: 3px 8px; border-radius: 6px;
}
.hal-spotlight-bar .hs-change.pos { background: rgba(16,185,129,0.36); color: #ECFDF5; }
.hal-spotlight-bar .hs-change.neg { background: rgba(239,68,68,0.40);  color: #FEF2F2; }
.hal-spotlight-bar .hs-rating {
  font-weight: 900; font-size: 12px; letter-spacing: 0.5px;
  padding: 4px 11px; border-radius: 999px; text-transform: uppercase;
}
.hal-spotlight-bar .hs-rating.green { background: #ECFDF5; color: #065F46; }
.hal-spotlight-bar .hs-rating.amber { background: #FEF3C7; color: #92400E; }
.hal-spotlight-bar .hs-rating.red   { background: #FEF2F2; color: #991B1B; }
.hal-spotlight-bar .hs-rating.gray  { background: #F1F5F9; color: #1F2937; }
.hal-spotlight-bar .hs-plan {
  font-weight: 600; font-size: 12.5px; color: rgba(255,255,255,0.95);
  border-left: 1px solid rgba(255,255,255,0.30); padding-left: 12px;
}
.hal-spotlight-bar .hs-conv {
  font-weight: 700; font-size: 12px; color: rgba(255,255,255,0.85);
  background: rgba(0,0,0,0.20); padding: 3px 8px; border-radius: 6px;
}

/* ── "HAL says..." universal summary block (renders inside the panel
       above whatever the dashboard's renderHalSpotlight() returns) ─── */
.hal-says {
  margin-bottom: 18px;
  padding: 18px 20px;
  background: linear-gradient(135deg, #F5F3FF, #ECFDF5);
  border: 1px solid rgba(139,92,246,0.30);
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(91,33,182,0.06);
}
.hal-says-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  margin-bottom: 10px;
}
.hal-says-icon { font-size: 22px; }
.hal-says-label {
  font-weight: 900; font-size: 14px; letter-spacing: 0.5px;
  text-transform: uppercase; color: #4C1D95;
}
.hal-says-rating {
  font-weight: 900; font-size: 13px; letter-spacing: 0.6px;
  padding: 5px 14px; border-radius: 999px; text-transform: uppercase;
}
.hal-says-rating.green { background: #D1FAE5; color: #065F46; }
.hal-says-rating.amber { background: #FEF3C7; color: #92400E; }
.hal-says-rating.red   { background: #FEE2E2; color: #991B1B; }
.hal-says-rating.gray  { background: #E5E7EB; color: #374151; }
.hal-says-conv {
  font-size: 12.5px; color: #4B5563; margin-left: auto;
}
.hal-says-conv strong { color: #1F2937; font-weight: 800; }
.hal-says-pm {
  font-size: 14px; line-height: 1.6; color: #1F2937;
  margin: 0 0 14px; font-style: italic;
}
.hal-says-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 12px;
}
.hal-says-col {
  padding: 12px 14px; border-radius: 8px; background: rgba(255,255,255,0.70);
}
.hal-says-col.bull { border-left: 4px solid #10B981; }
.hal-says-col.bear { border-left: 4px solid #EF4444; }
.hal-says-col-h {
  font-size: 11px; font-weight: 800; letter-spacing: 0.5px;
  text-transform: uppercase; margin-bottom: 6px;
}
.hal-says-col.bull .hal-says-col-h { color: #065F46; }
.hal-says-col.bear .hal-says-col-h { color: #991B1B; }
.hal-says-col ul { margin: 0; padding-left: 18px; }
.hal-says-col li { font-size: 13px; line-height: 1.55; margin: 4px 0; color: #1F2937; }
.hal-says-flags {
  margin-top: 8px; font-size: 12px; color: #4B5563;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.hal-says-flags-h { font-weight: 700; color: #991B1B; text-transform: uppercase; letter-spacing: 0.4px; font-size: 11px; }
.hal-says-flag {
  background: #FEE2E2; color: #991B1B; padding: 3px 9px; border-radius: 999px;
  font-weight: 700; font-size: 11.5px;
}
.hal-says-skeleton {
  padding: 18px 20px; color: #6B7280; font-size: 13px; font-style: italic;
  background: rgba(139,92,246,0.04); border-radius: 8px; margin-bottom: 14px;
}

