/* ── stats.css — Project Statistics panel/modal styles ── */

/* Full-screen overlay */
.stats-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
  padding: 1rem;
  box-sizing: border-box;
}

/* Inner panel */
.stats-panel {
  background: var(--bg);
  border-radius: 12px;
  padding: 2rem;
  max-width: 700px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  font-family: var(--font-ui, system-ui, sans-serif);
  color: var(--text);
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.stats-panel::-webkit-scrollbar {
  width: 5px;
}

.stats-panel::-webkit-scrollbar-track {
  background: transparent;
}

.stats-panel::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

/* Header row: title + close button */
.stats-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.875rem;
}

/* Close button inside header (style set inline in render(), kept here for reference) */
.stats-close-btn {
  flex-shrink: 0;
}

.stats-close-btn:hover {
  background: var(--surface) !important;
  color: var(--text) !important;
}

/* Section headings above grid and chart */
.stats-section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/* SVG chart container */
.stats-chart-wrap {
  margin: 1rem 0 0.5rem;
  overflow: hidden;
  border-radius: var(--radius, 8px);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.75rem 0.5rem 0.25rem;
  box-sizing: border-box;
}

/* Day labels below bars — also used inline in SVG text elements */
.stats-chart-day-label {
  font-size: 0.6rem;
  fill: var(--muted);
  font-family: var(--font-ui, sans-serif);
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .stats-modal {
    align-items: flex-end;
    padding: 0;
  }

  .stats-panel {
    max-width: 100%;
    width: 100%;
    border-radius: 12px 12px 0 0;
    max-height: 90vh;
    padding: 1.25rem 1rem;
  }
}
