/* training-progress-grid.css — Activity heatmap for the Training dashboard */

.progress-grid {
  display: grid;
  grid-template-columns: 28px 1fr;
  grid-template-rows: 20px 1fr;
  gap: 0;
  overflow-x: auto;
  padding-bottom: var(--gap-sm);
}

/* Month labels sit in top-right cell */
.progress-grid__months {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  grid-template-columns: repeat(53, 13px);
  gap: 2px;
  padding-left: 0;
  position: relative;
  height: 20px;
}

.progress-grid__month-label {
  font-family: var(--font-sans);
  font-size: 0.625rem;
  color: var(--text-muted);
  white-space: nowrap;
  line-height: 20px;
}

/* Day-of-week labels in left column */
.progress-grid__dow {
  grid-column: 1;
  grid-row: 2;
  display: grid;
  grid-template-rows: repeat(7, 13px);
  gap: 2px;
  align-items: center;
}

.progress-grid__dow-label {
  font-family: var(--font-sans);
  font-size: 0.625rem;
  color: var(--text-muted);
  text-align: right;
  padding-right: 4px;
  line-height: 13px;
}

/* The main 53-column week grid */
.progress-grid__grid {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(53, 13px);
  gap: 2px;
}

.progress-grid__col {
  display: grid;
  grid-template-rows: repeat(7, 13px);
  gap: 2px;
}

/* Individual day cell */
.progress-grid__cell {
  width: 13px;
  height: 13px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-elevated));
  cursor: default;
  transition: opacity 0.1s;
}

.progress-grid__cell[data-future] {
  opacity: 0.3;
}

/* Activity intensity levels — derived from accent */
.progress-grid__cell[data-level="0"] {
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-elevated));
}

.progress-grid__cell[data-level="1"] {
  background: color-mix(in srgb, var(--accent) 28%, var(--bg-elevated));
}

.progress-grid__cell[data-level="2"] {
  background: color-mix(in srgb, var(--accent) 52%, var(--bg-elevated));
}

.progress-grid__cell[data-level="3"] {
  background: color-mix(in srgb, var(--accent) 75%, var(--bg-elevated));
}

.progress-grid__cell[data-level="4"] {
  background: var(--accent);
}

.progress-grid__cell[role="button"] {
  cursor: pointer;
}

.progress-grid__cell[role="button"]:hover {
  opacity: 0.8;
}

/* ── Dashboard card wrapper ─────────────────────────────────────────────── */

.training-card--progress-grid {
  overflow: hidden;
}

.training-card--progress-grid .progress-grid {
  margin-top: var(--gap-sm);
}
