/* Styles for assets/js/github-calendar.js. Palette kept from the previous calendar. */
:root {
  --gh-day-0: #dddbdb;
  --gh-day-1: #39dd34;
  --gh-day-2: #45a045;
  --gh-day-3: #047526;
  --gh-day-4: #0a4208;
  --gh-border: #dee2e6;
  --gh-muted: #6c757d;
}

/* On a dark background the light palette's darkest greens disappear, so use a rising scale. */
[data-theme="dark"] {
  --gh-day-0: #2c3032;
  --gh-day-1: #0e4429;
  --gh-day-2: #006d32;
  --gh-day-3: #26a641;
  --gh-day-4: #39d353;
  --gh-border: #3a3f42;
  --gh-muted: #9aa0a6;
}

.gh-calendar {
  border: 1px solid var(--gh-border);
  border-radius: 6px;
  padding: 12px 12px 0;
  overflow: hidden;
}

.gh-calendar-graph-link {
  display: block;
}

.gh-calendar-graph {
  display: block;
  width: 100%;
  height: auto;
}

.gh-calendar-label {
  font-size: 9px;
  fill: var(--gh-muted);
}

.gh-calendar-day[data-level="0"], .gh-calendar-legend-day[data-level="0"] { fill: var(--gh-day-0); background: var(--gh-day-0); }
.gh-calendar-day[data-level="1"], .gh-calendar-legend-day[data-level="1"] { fill: var(--gh-day-1); background: var(--gh-day-1); }
.gh-calendar-day[data-level="2"], .gh-calendar-legend-day[data-level="2"] { fill: var(--gh-day-2); background: var(--gh-day-2); }
.gh-calendar-day[data-level="3"], .gh-calendar-legend-day[data-level="3"] { fill: var(--gh-day-3); background: var(--gh-day-3); }
.gh-calendar-day[data-level="4"], .gh-calendar-legend-day[data-level="4"] { fill: var(--gh-day-4); background: var(--gh-day-4); }

.gh-calendar-legend {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  margin: 6px 0 12px;
  font-size: 12px;
  color: var(--gh-muted);
}

.gh-calendar-legend-day {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 2px;
}

.gh-calendar-stats {
  display: flex;
  margin: 0 -12px;
  border-top: 1px solid var(--gh-border);
}

.gh-calendar-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px;
  text-align: center;
}

.gh-calendar-stat + .gh-calendar-stat {
  border-left: 1px solid var(--gh-border);
}

.gh-calendar-stat-title,
.gh-calendar-stat-detail {
  font-size: 12px;
  color: var(--gh-muted);
}

.gh-calendar-stat-value {
  font-size: 24px;
  font-weight: 300;
  line-height: 1.4;
}

.gh-calendar-error {
  text-align: center;
  color: var(--gh-muted);
}

@media (max-width: 576px) {
  .gh-calendar-stats {
    flex-direction: column;
  }

  .gh-calendar-stat + .gh-calendar-stat {
    border-left: none;
    border-top: 1px solid var(--gh-border);
  }

  .gh-calendar-stat-value {
    font-size: 20px;
  }
}
