/* ═══════════════════════════════════════════════════════════════
   Spectator Daily Digest — Styles
   📰 Narrative game summaries with score bars & highlights
   ═══════════════════════════════════════════════════════════════ */

/* ── Layout ──────────────────────────────────────────────────── */

.digest-layout {
  display: flex;
  gap: 16px;
  min-height: 500px;
}

.digest-sidebar {
  width: 280px;
  flex-shrink: 0;
  border-right: 1px solid #e2e8f0;
  padding-right: 16px;
  overflow-y: auto;
  max-height: 80vh;
}

.digest-main {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  max-height: 80vh;
}

.digest-sidebar-title {
  font-size: 14px;
  font-weight: 600;
  color: #475569;
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── List Items ──────────────────────────────────────────────── */

.digest-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 4px;
}

.digest-list-item:hover {
  background: #f1f5f9;
}

.digest-list-item.active {
  background: linear-gradient(135deg, #eef2ff, #e8f4fd);
  border-left: 3px solid #6366f1;
}

.digest-list-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.digest-list-info {
  flex: 1;
  min-width: 0;
}

.digest-list-headline {
  font-size: 13px;
  font-weight: 500;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.digest-list-meta {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
}

.digest-list-mvp {
  font-size: 14px;
  flex-shrink: 0;
}

/* ── Detail View ─────────────────────────────────────────────── */

.digest-detail {
  padding: 0 8px;
}

.digest-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.digest-type-badge {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.digest-date {
  font-size: 13px;
  color: #64748b;
}

.digest-headline {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  margin: 8px 0 16px;
  line-height: 1.3;
}

/* ── MVP Card ────────────────────────────────────────────────── */

.digest-mvp-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #f59e0b;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 20px;
}

.digest-mvp-icon {
  font-size: 32px;
}

.digest-mvp-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #92400e;
}

.digest-mvp-name {
  font-size: 18px;
  font-weight: 700;
  color: #78350f;
}

.digest-mvp-reason {
  font-size: 13px;
  color: #92400e;
  margin-top: 2px;
}

/* ── Score Bars ──────────────────────────────────────────────── */

.digest-scores h3,
.digest-highlights h3,
.digest-narrative h3 {
  font-size: 15px;
  font-weight: 600;
  color: #334155;
  margin: 20px 0 12px;
}

.digest-score-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.digest-score-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.digest-score-label {
  width: 140px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.digest-agent-name {
  font-weight: 600;
  color: #1e293b;
}

.digest-tier-badge {
  font-size: 10px;
  background: #e2e8f0;
  color: #475569;
  padding: 1px 6px;
  border-radius: 10px;
}

.digest-score-bar-wrapper {
  flex: 1;
  height: 24px;
  background: #f1f5f9;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

.digest-score-bar {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  border-radius: 12px;
  transition: width 0.6s ease;
  min-width: 2px;
}

.digest-score-value {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.digest-score-delta {
  font-size: 12px;
  font-weight: 600;
  width: 60px;
  text-align: right;
  flex-shrink: 0;
}

.digest-score-delta.positive { color: #16a34a; }
.digest-score-delta.negative { color: #dc2626; }
.digest-score-delta.neutral { color: #94a3b8; }

/* ── Highlights ──────────────────────────────────────────────── */

.digest-highlight-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 6px;
  background: #f8fafc;
  border-left: 3px solid #e2e8f0;
  transition: transform 0.15s ease;
}

.digest-highlight-item:hover {
  transform: translateX(4px);
}

.digest-highlight-item.importance-high {
  border-left-color: #ef4444;
  background: #fef2f2;
}

.digest-highlight-item.importance-medium {
  border-left-color: #f59e0b;
  background: #fffbeb;
}

.digest-highlight-item.importance-low {
  border-left-color: #6366f1;
  background: #eef2ff;
}

.digest-highlight-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.digest-highlight-text {
  font-size: 13px;
  color: #334155;
}

/* ── Narrative ───────────────────────────────────────────────── */

.digest-narrative-text {
  font-size: 14px;
  line-height: 1.7;
  color: #475569;
  background: #f8fafc;
  padding: 16px 20px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.digest-narrative-text h4 {
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  margin: 12px 0 6px;
}

.digest-narrative-text strong {
  color: #1e293b;
}

/* ── Footer ──────────────────────────────────────────────────── */

.digest-meta-footer {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

/* ── Empty State ─────────────────────────────────────────────── */

.digest-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #94a3b8;
}

.digest-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.digest-empty-state h3 {
  color: #475569;
  margin: 0 0 8px;
}

.digest-empty-state p {
  font-size: 14px;
}

.digest-no-data {
  color: #94a3b8;
  font-size: 13px;
  font-style: italic;
}

/* ── Stats Mini ──────────────────────────────────────────────── */

.digest-stats-mini {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  margin-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.digest-stat-item {
  font-size: 11px;
  color: #94a3b8;
}

/* ── Dark Mode ───────────────────────────────────────────────── */

.dark .digest-sidebar {
  border-right-color: #334155;
}

.dark .digest-sidebar-title {
  color: #94a3b8;
}

.dark .digest-list-item:hover {
  background: #1e293b;
}

.dark .digest-list-item.active {
  background: linear-gradient(135deg, #1e1b4b, #172554);
  border-left-color: #818cf8;
}

.dark .digest-list-headline {
  color: #e2e8f0;
}

.dark .digest-headline {
  color: #f1f5f9;
}

.dark .digest-date {
  color: #94a3b8;
}

.dark .digest-mvp-card {
  background: linear-gradient(135deg, #422006, #451a03);
  border-color: #b45309;
}

.dark .digest-mvp-label { color: #fbbf24; }
.dark .digest-mvp-name { color: #fde68a; }
.dark .digest-mvp-reason { color: #fbbf24; }

.dark .digest-scores h3,
.dark .digest-highlights h3,
.dark .digest-narrative h3 {
  color: #cbd5e1;
}

.dark .digest-agent-name { color: #e2e8f0; }
.dark .digest-tier-badge { background: #334155; color: #94a3b8; }
.dark .digest-score-bar-wrapper { background: #1e293b; }
.dark .digest-score-value { color: #94a3b8; }

.dark .digest-highlight-item {
  background: #1e293b;
  border-left-color: #475569;
}

.dark .digest-highlight-item.importance-high {
  border-left-color: #ef4444;
  background: #1c1917;
}

.dark .digest-highlight-item.importance-medium {
  border-left-color: #f59e0b;
  background: #1c1917;
}

.dark .digest-highlight-item.importance-low {
  border-left-color: #818cf8;
  background: #1e1b4b;
}

.dark .digest-highlight-text { color: #cbd5e1; }

.dark .digest-narrative-text {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}

.dark .digest-narrative-text h4 { color: #cbd5e1; }
.dark .digest-narrative-text strong { color: #e2e8f0; }

.dark .digest-meta-footer {
  color: #64748b;
  border-top-color: #334155;
}

.dark .digest-stats-mini {
  border-top-color: #334155;
}

.dark .digest-empty-state h3 { color: #94a3b8; }

/* ── Mobile ──────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .digest-layout {
    flex-direction: column;
  }

  .digest-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
    padding-right: 0;
    padding-bottom: 12px;
    max-height: 200px;
  }

  .dark .digest-sidebar {
    border-bottom-color: #334155;
  }

  .digest-main {
    max-height: none;
  }

  .digest-headline {
    font-size: 18px;
  }

  .digest-score-label {
    width: 100px;
  }

  .digest-score-delta {
    width: 50px;
    font-size: 11px;
  }

  .digest-mvp-card {
    padding: 10px 14px;
  }

  .digest-mvp-icon {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .digest-score-row {
    flex-wrap: wrap;
  }

  .digest-score-label {
    width: 100%;
  }

  .digest-score-bar-wrapper {
    width: calc(100% - 60px);
  }
}
