/* ============================================================
   Datamart — DS.TaskList — JEDEN výpis úkolů (deal drawer,
   osoba, schůzka). Anatomie řádku: hairline řádek = disclosure /
   lead · kulatý checkbox (accent) · název · počty · termín
   (Dnes = warning, po termínu = critical) · řešitel (avatar ±
   jméno). Skupinové lišty, AI návrhy s hover akcemi, ghost
   „Přidat úkol / podúkol". Páruje s components/TaskList.tsx.
   Load after colors_and_type.css.
   Ported verbatim from DS _ds/task-list.css — do not hand-edit; re-sync from DS.
   ============================================================ */
.tl {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* progress header */
.tl-prog {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-2);
}
.tl-prog .l {
  font: 500 12px var(--font-mono);
  color: var(--fg-secondary);
  font-variant-numeric: tabular-nums;
}
.tl-prog .bar {
  width: 84px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--line-200);
  overflow: hidden;
  flex: none;
}
.tl-prog .bar i {
  display: block;
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--positive);
}

/* grouped container — flat children: .tl-grp / .tl-row / .tl-addrow */
.tl-grouped {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* group bar (suggested → count, progress → total/done) */
.tl-grp {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 26px;
  padding: var(--sp-1) var(--sp-2) var(--sp-1);
  margin-top: var(--sp-4);
}
.tl-grouped > .tl-grp:first-child {
  margin-top: 0;
}
.tl-grp .l {
  font: 650 12px var(--font-display);
  color: var(--ink-900);
  letter-spacing: -0.01em;
}
.tl-grp .cnt {
  font: 600 11px var(--font-mono);
  color: var(--fg-muted);
  font-variant-numeric: tabular-nums;
}
.tl-grp .bar {
  width: 84px;
  height: 6px;
  margin-left: auto;
  border-radius: var(--radius-pill);
  background: var(--line-200);
  overflow: hidden;
  flex: none;
}
.tl-grp .bar i {
  display: block;
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--positive);
}

/* task row — hairline between rows; inline style owns padding-left (depth) */
.tl-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 40px;
  padding: var(--sp-2) var(--sp-2);
  border-top: 1px solid var(--border);
}
.tl-grouped > :first-child {
  border-top: 0;
}
.tl-grp + .tl-row {
  border-top: 0;
}
.tl-row:hover {
  background: var(--hover-surface);
}

/* leading slot — disclosure or spacer, keeps checkboxes aligned */
.tl-lead {
  width: 18px;
  flex: none;
}
.tl-disc {
  width: 18px;
  height: 18px;
  flex: none;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  background: transparent;
  border-radius: var(--radius-xs);
  color: var(--fg-muted);
  cursor: pointer;
}
.tl-disc:hover {
  background: var(--active-surface);
  color: var(--fg-secondary);
}
.tl-disc .ti {
  font-size: 14px;
  transition: transform 120ms ease;
}
.tl-disc.open .ti {
  transform: rotate(90deg);
}

/* round checkbox — accent when done */
.tl-rcheck {
  width: 18px;
  height: 18px;
  flex: none;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-strong);
  background: var(--surface-100);
  color: var(--fg-on-accent);
  cursor: pointer;
}
.tl-rcheck:hover {
  border-color: var(--accent);
}
.tl-rcheck.on {
  background: var(--accent);
  border-color: var(--accent);
}
.tl-rcheck .ti {
  font-size: 12px;
}

/* title — grows (never ellipsizes at rest); counts sit inline right after the text */
.tl-title {
  flex: 1;
  min-width: 0;
  font: 500 13px var(--font-sans);
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tl-row.done .tl-title {
  text-decoration: line-through;
  color: var(--fg-muted);
}

/* counts — comments / subtasks (inline, right after the title text) */
.tl-counts {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-left: var(--sp-2);
  vertical-align: -2px;
}
.tl-counts .tc {
  display: inline-flex;
  align-items: center;
  gap: 3px; /* ds-ok: 1:1 z DS _ds/task-list.css — mikro-mezera číslo↔ikonka v counts (off-scale) */
  font: 600 11px var(--font-mono);
  color: var(--fg-muted);
  font-variant-numeric: tabular-nums;
}
.tl-counts .tc .ti {
  font-size: 13px;
}

/* trailing meta — due + owner (+ hover actions on suggestions) */
.tl-meta {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
}
.tl-rdue {
  flex: none;
  min-width: 42px;
  text-align: right;
  font: 500 11px var(--font-mono);
  color: var(--fg-secondary);
  font-variant-numeric: tabular-nums;
}
.tl-rdue.now {
  color: var(--warning-ink);
  font-weight: 600;
}
.tl-rdue.over {
  color: var(--critical-ink);
  font-weight: 600;
}
/* owner name = DS entity reference (mini) — dashed underline is the affordance */
.tl-person {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-width: 0;
  margin: 0;
  padding: 0 1px;
  background: none;
  border: 0;
  border-radius: var(--radius-xs);
  font: inherit;
  cursor: pointer;
}
/* named owner — fixed column so due dates align regardless of name length */
.tl-meta .tl-person:not(:only-child) {
  width: 148px;
}
.tl-person .nm {
  overflow: hidden;
  text-overflow: ellipsis;
}
.tl-person:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.tl-person .nm {
  flex: 1;
  min-width: 0;
  text-align: left;
  font: 500 12px var(--font-sans);
  color: var(--fg-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: underline dashed var(--border-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.tl-person:hover .nm {
  color: var(--ink-900);
  text-decoration-color: var(--ink-500);
}
.tl-av {
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 600 9px var(--font-display);
  color: hsl(var(--av-hue) 52% 42%);
  background: var(--surface-75);
  border: 1.5px solid hsl(var(--av-hue) 62% 60%);
}

/* AI suggestion actions — hidden at rest, revealed on row hover */
.tl-sugact {
  display: none;
  align-items: center;
  gap: var(--sp-1);
}
.tl-row.sug:hover .tl-sugact {
  display: inline-flex;
}
.tl-row.sug:hover .tl-rdue,
.tl-row.sug:hover .tl-person {
  display: none;
}
.tl-sugact button {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  height: 24px;
  padding: 0 var(--sp-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-100);
  font: 600 11px var(--font-sans);
  color: var(--fg-secondary);
  cursor: pointer;
}
.tl-sugact button .ti {
  font-size: 13px;
}
.tl-sugact button:hover {
  background: var(--hover-surface);
  color: var(--ink-900);
}
.tl-sugact button.dismiss:hover {
  color: var(--critical-ink);
  border-color: var(--critical);
}
.tl-sugact button.approve {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--fg-on-accent);
}
.tl-sugact button.approve:hover {
  background: var(--accent-press);
  border-color: var(--accent-press);
  color: var(--fg-on-accent);
}

/* ghost add row — „Přidat úkol / podúkol" */
.tl-addrow {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 32px;
  padding: var(--sp-1) var(--sp-2);
  border-top: 1px solid var(--border);
  font: 500 12px var(--font-sans);
  color: var(--fg-muted);
  cursor: pointer;
}
.tl-addrow:hover {
  background: var(--hover-surface);
  color: var(--fg-secondary);
}
.tl-addrow .ic {
  width: 18px;
  flex: none;
  display: grid;
  place-items: center;
}
.tl-addrow .ic .ti {
  font-size: 14px;
}

/* ============================================================
   APP-EXTENSIONS — vědomá rozšíření nad verbatim port (ds-sync-check
   je vede jako APP-EXTENSIONS; při re-syncu z DS tuto sekci zachovat)
   ============================================================ */
/* skeleton wrapper (DS.Skeleton.Tasks) */
.tl-list {
  gap: 1px;
  display: flex;
  flex-direction: column;
}
/* dark remap avataru (DS zdroj je light-only) */
[data-theme='dark'] .tl-av {
  color: hsl(var(--av-hue, 222) 70% 72%);
  border-color: hsl(var(--av-hue, 222) 52% 52%);
}
/* klávesnicová parita s hoverem: focus-within odhalí akce A schová
   termín/řešitele stejně jako :hover (jinak řádek přeteče — AI review !91) */
.tl-row.sug:focus-within .tl-sugact {
  display: inline-flex;
}
.tl-row.sug:focus-within .tl-rdue,
.tl-row.sug:focus-within .tl-person {
  display: none;
}
