/* widgets/tasks/tasks.css
 * Phase 1 – List-style widget (micro-card rows)
 * Consistent with Priority / Team / Notes list archetypes
 */

.widget-tasks {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Status line ("3 open tasks", "No tasks yet", etc.) */
.widget-tasks .tasks-status {
  font-size: 0.8rem;
  opacity: 0.75;
  margin-bottom: 0.25rem;
}

/* List container */
.widget-tasks .tasks-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

/* Row / card */
.widget-tasks .task-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;

  padding: 0.35rem 0.45rem;
  border-radius: 6px;

  /* Same visual treatment used across Priority / Team / Notes */
  background: rgba(255, 255, 255, 0.06);

  /* Ensure long titles behave like other widgets */
  overflow: hidden;
}

/* Checkbox itself (left edge) */
.widget-tasks .task-checkbox {
  flex: 0 0 auto;
  width: 0.9rem;
  height: 0.9rem;
  margin: 0;
  padding: 0;

  /* Let platform draw native box for now; just nudge it into place */
  cursor: pointer;
}

/* Main text block (title + optional due) */
.widget-tasks .task-main {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  flex: 1 1 auto;
  min-width: 0; /* allow ellipsis */
}

/* Title text */
.widget-tasks .task-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.85rem;
}

/* Optional “due date” meta */
.widget-tasks .task-due {
  font-size: 0.75rem;
  opacity: 0.75;
  white-space: nowrap;
  margin-left: auto;
}

/* Completed state – strike-through + soften */
.widget-tasks .task-item.task-item--completed .task-title {
  text-decoration: line-through;
  opacity: 0.6;
}

/* Optional: dim the checkbox a bit when done */
.widget-tasks .task-item.task-item--completed .task-checkbox {
  opacity: 0.8;
}

/* Mini/compact modes can shrink text slightly if needed */
.widget.widget--mode-mini .widget-tasks .task-title,
.widget.widget--mode-compact .widget-tasks .task-title {
  font-size: 0.8rem;
}

.widget.widget--mode-mini .widget-tasks .task-due,
.widget.widget--mode-compact .widget-tasks .task-due {
  font-size: 0.7rem;
}