/* Tasks in the Next steps list (crm/web/pages/tasks.py; the founder, 2026-10-06: "merge with next steps").
   A task's row is a next step's (app.css `.step`); what is here is only what a task has more. The theme's
   variables are app.css's. */

/* labels as chips between the day and the title; URGENT in the critical colours */
.task-labels { display: inline-flex; flex-wrap: wrap; gap: 4px; vertical-align: baseline; }
.chip.urgent, .chip-button.urgent { background: var(--critical-wash); color: var(--critical-ink); }
.chip.urgent { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--critical) 30%, transparent); }
.chip-button.urgent[aria-pressed="true"] { background: var(--critical); border-color: var(--critical); color: #fff; }

.task-for { color: var(--ink-2); }
.task-notes { font-size: 0.92rem; padding: 2px 4px; color: var(--ink-2); }

/* the muted line under a task: where it came from, "+ Label", "+ Notes" (on hover), Delete */
.task-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; }
.task-foot .inline-add { margin: 0; }
.step:focus-within .inline-add { display: inline-block; }
.task-delete { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
/* quiet until it is meant: a red word under every task read as an alarm (2026-10-06) */
.task-delete .btn { color: var(--muted); border-color: transparent; }
.task-delete .btn:hover, .task-delete .btn:focus-visible { color: var(--critical-ink); border-color: var(--critical); }
.task-delete .form-error:empty { display: none; }
.task-note .step-text { font-weight: 400; }

/* the owners' checkboxes in the editor */
.task-owners-pick { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.task-owners-pick .check { display: inline-flex; align-items: center; gap: 6px; }

/* the label filter above the list */
.task-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; font-size: 0.88rem; }
.task-filter .chip-button { text-decoration: none; }

/* the quick add */
.task-quick-add { display: flex; flex-direction: column; gap: 8px; }
.task-add-text { width: 100%; box-sizing: border-box; font: inherit; min-height: 2.4em; resize: vertical; overflow: hidden; }
.task-add-options { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.task-for-choice { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.task-for-choice .muted { margin-right: 4px; font-size: 0.85rem; }
.seg { cursor: pointer; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span {
  display: inline-block; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--hairline);
  background: var(--surface); color: var(--ink-2); font-size: 0.85rem;
}
.seg:hover span { color: var(--ink); border-color: var(--baseline); }
.seg input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.task-quick-add .inline-due { margin: 0; }
.task-add-labels { display: inline-flex; align-items: center; gap: 6px; }
.task-add-labels input { width: 12em; max-width: 100%; }
.task-added { margin: 0; font-size: 0.88rem; color: var(--good-ink); }

/* Today: one line to add a task under the list */
.task-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--grid); }
.task-quick-input { flex: 1 1 14em; min-width: 0; font: inherit; }
.task-quick .more { font-size: 0.88rem; }
.task-quick .form-error, .task-quick .task-added { flex: 1 1 100%; }

@media (max-width: 560px) {
  .task-delete { margin-left: 0; }
  .task-add-labels input { width: 100%; }
  .task-add-labels { flex: 1 1 100%; }
}

/* the comments on a task: a <details> under the title and notes, the latest comment its summary */
.task-comments-box { font-size: 0.9rem; }
.task-comments-box > summary { cursor: pointer; color: var(--ink-2); overflow-wrap: anywhere; }
.task-comments-n { font-weight: 600; margin-right: 6px; }
.task-comments-last { color: var(--muted); }
.task-comment-list { list-style: none; margin: 6px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.task-comment { padding-left: 10px; border-left: 2px solid var(--hairline); }
.task-comment .task-delete { margin-left: 0; }
.task-comment-add { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px 8px; }
.task-comment-add textarea { flex: 1 1 16em; min-width: 0; box-sizing: border-box; font: inherit; min-height: 2.2em; resize: vertical; overflow: hidden; }
.task-comment-add .form-error { flex: 1 1 100%; }
.task-comments .inline-add { margin: 0; }
