/* ==========================================================================
   ANALYTICS.CSS - Visual Analytics, Charts & Trend Breakdown
   ========================================================================== */

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}

.col-span-12 {
  grid-column: span 12;
}

.col-span-8 {
  grid-column: span 8;
}

.col-span-6 {
  grid-column: span 6;
}

.col-span-4 {
  grid-column: span 4;
}

@media (max-width: 1024px) {
  .col-span-8, .col-span-6, .col-span-4 {
    grid-column: span 12;
  }
}

.chart-container {
  position: relative;
  width: 100%;
  height: 320px;
  margin-top: 1rem;
}

.chart-container-sm {
  position: relative;
  width: 100%;
  height: 240px;
  margin-top: 0.5rem;
}

/* Weight summary hero card */
.weight-hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.weight-mini-stat {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
}

.weight-mini-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.weight-mini-val {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 0.2rem;
}

/* Streak Leaderboard */
.streak-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.streak-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: transform var(--transition-fast);
}

.streak-item:hover {
  transform: translateX(4px);
  border-color: var(--text-muted);
}

.streak-habit-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.streak-flame {
  font-size: 1.25rem;
  color: #f59e0b;
}

.streak-counts {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.streak-num {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
}

.streak-unit {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Correlation / Insights Box */
.insight-callout {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-top: 1rem;
}

.insight-icon {
  font-size: 1.3rem;
  color: var(--primary);
  margin-top: 2px;
}

.insight-text h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.insight-text p {
  font-size: 0.825rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}
