/* Habit rows (inside a group) */
.habit-row {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 10px;
  cursor: pointer;
  color: inherit;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.18s ease, transform 0.12s ease;
}

.habit-row:hover {
  box-shadow: var(--shadow-md);
}

.habit-row:active {
  transform: scale(0.99);
}

.habit-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-right: 112px;
  gap: 10px;
}

.habit-row .name {
  font-size: 16px;
  font-weight: 650;
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.habit-row .name span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.color-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 15%, transparent);
}

.habit-row .stats {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.mini-heatmap {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, 1fr);
  gap: 3px;
  overflow: hidden;
  height: 58px;
}

.mini-heatmap .cell {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--cell-empty);
}


/* To-do-knap på mål: markér hele målet som gennemført */
.todo-check {
  width: 24px;
  height: 24px;
  flex: none;
  padding: 0;
  border-radius: 50%;
  border: 2px solid var(--baseline);
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.todo-check:hover {
  border-color: var(--accent);
}

.todo-check.checked {
  background: var(--accent);
  border-color: var(--accent);
}

.todo-check.checked::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-ink);
  font-size: 14px;
  font-weight: 700;
}

.habit-row .name:has(.todo-check) {
  display: flex;
  align-items: center;
  gap: 10px;
}

.habit-row.is-completed .name span:not(.color-dot) {
  text-decoration: line-through;
  color: var(--text-muted);
}

.habit-row.is-completed .mini-heatmap {
  opacity: 0.55;
}
