/* The task row partial (app/views/tasks/_task.html.erb). Not a component:
   it has a model name in it. */

/* A turbo-frame is an unknown element, so it lays out inline unless told
   otherwise. Every frame here wraps block content. */
turbo-frame {
  display: block;
}

/* The inline edit form, in place of a row. Not a Card: inline it already sits
   inside one, and nesting the two draws a box in a box. */
.task-form {
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.task-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.task-row__main {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.task-row__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.task-row__title {
  font-weight: var(--weight-medium);
}

.task-row__title--done {
  text-decoration: line-through;
  color: var(--text-muted);
}

.task-row__due--overdue {
  color: var(--error-700);
  font-weight: var(--weight-medium);
}

.task-row__toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: var(--text-lg);
  line-height: var(--leading-tight);
  padding: 0;
  width: auto;
  color: var(--text-muted);
}

.task-row__actions {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

/* --- Pipeline board ---------------------------------------------------- */

.board {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  overflow-x: auto;
  padding-bottom: var(--space-4);
}

.board__column {
  flex: 0 0 16rem;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.board__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--text-muted);
  padding: 0 var(--space-1);
}

/* Marked up so a sortable Stimulus controller can attach later. */
.board__cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-height: var(--space-8);
}

.tile-row {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}
