/* GITHUB STYLE CALENDAR OF CATCHES (USED ON POKEDEX PAGE) */

.catch-calendar-card {
  /* Lets the calendar scroll inside the card instead of stretching the grid */
  min-width: 0;
}

/* rtl makes the scroll start at the right, so the most recent weeks show first on small screens */
.catch-calendar {
  overflow-x: auto;
  padding-bottom: 1rem;
  direction: rtl;
}

.catch-calendar-body {
  direction: ltr;
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  column-gap: 1rem;
  row-gap: 0.5rem;
  width: max-content;
  /* Keeps it left aligned when it fits, despite the rtl above */
  margin-right: auto;
}

.catch-calendar-months,
.catch-calendar-grid {
  display: grid;
  grid-template-columns: repeat(53, 12px);
  column-gap: 3px;
}

.catch-calendar-months {
  grid-column: 2;
}

.catch-calendar-days,
.catch-calendar-grid {
  grid-template-rows: repeat(7, 12px);
  row-gap: 3px;
}

.catch-calendar-days {
  display: grid;
}

.catch-calendar-grid {
  grid-auto-flow: column;
}

.catch-calendar-label {
  color: var(--color-text-secondary);
  /* USES BODY-XS */
  font-family: var(--font-sans);
  font-size: var(--font-size-12);
  font-weight: var(--font-weight-medium);
  line-height: 12px;
  white-space: nowrap;
}

.catch-calendar-cell {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--color-surface-tertiary);
}

.catch-calendar-cell:hover {
  transform: scale(1.2);
}

/* One hue, lighter to darker as the count goes up. Opacity keeps it working on light and dark surfaces */
.catch-calendar-cell--1 { background: var(--color-accent); opacity: 0.3; }
.catch-calendar-cell--2 { background: var(--color-accent); opacity: 0.55; }
.catch-calendar-cell--3 { background: var(--color-accent); opacity: 0.8; }
.catch-calendar-cell--4 { background: var(--color-accent); }

.catch-calendar-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.catch-calendar-legend {
  display: flex;
  align-items: center;
  gap: 3px;
}

.catch-calendar-legend .catch-calendar-label {
  margin: 0 0.5rem;
}
