@import url('./primitives.css');
@import url('./task-metadata.css');
@import url('./workspace-row.css');
@import url('./pending-delete.css');
@import url('./outline-element.css');

/* Collection shells own their existing border/selection geometry. Standalone
   instances provide that surface themselves, with the same owned controls. */
.todo-row > dd-todo-row, .dd-work-row > dd-todo-row { display:contents; }
dd-todo-row *, dd-todo-row *::before { box-sizing:border-box; }
dd-todo-row [hidden], dd-pending-delete[hidden] { display:none !important; }
dd-todo-row dd-button { display:contents; }
dd-todo-row:where(:not(.todo-row *, .dd-work-row *)) { display:block; min-width:0; position:relative; padding:8px; color:var(--text,#e6e6e6); font:inherit; background:var(--surface,#101315); border:1px solid var(--border,#2a3035); border-radius:3px; }
dd-todo-row:where(:not(.todo-row *, .dd-work-row *)) .row-primary { display:flex; align-items:flex-start; gap:8px; min-width:0; }
dd-todo-row:where(:not(.todo-row *, .dd-work-row *)) .todo-body { flex:1; min-width:0; padding:2px 0; border:0; background:transparent; color:inherit; text-align:left; font:inherit; cursor:pointer; overflow-wrap:anywhere; }
dd-todo-row:where(:not(.todo-row *, .dd-work-row *)) .todo-text { white-space:pre-wrap; }
dd-todo-row:where(:not(.todo-row *, .dd-work-row *)).completed .todo-text { color:var(--text-muted,#8a9299); text-decoration:line-through; }
dd-todo-row:where(:not(.todo-row *, .dd-work-row *)) .priority-stamp { margin-left:8px; color:var(--accent-strong,#b7ffb0); font-size:12px; }
dd-todo-row:where(:not(.todo-row *, .dd-work-row *)) :is(.check-button,.drag-handle) { flex:0 0 24px; width:24px; min-height:24px; padding:0; border:1px solid var(--border,#2a3035); background:var(--canvas,#0b0d0e); color:inherit; font:inherit; cursor:pointer; }
dd-todo-row:where(:not(.todo-row *, .dd-work-row *)) .drag-handle { border:0; cursor:grab; touch-action:none; }
dd-todo-row:where(:not(.todo-row *, .dd-work-row *)) .row-actions { display:flex; flex-wrap:wrap; gap:4px; justify-content:flex-end; }
dd-todo-row:where(:not(.todo-row *, .dd-work-row *)) .row-controls { position:relative; min-width:0; min-height:24px; margin-top:4px; }
dd-todo-row:where(:not(.todo-row *, .dd-work-row *)) .metadata { font-size:12px; }
dd-todo-row:where(:not(.todo-row *, .dd-work-row *)) .row-actions button { min-width:28px; min-height:28px; padding:4px; }
dd-todo-row .row-actions button svg { width:16px; height:16px; }
dd-todo-row .shared-row-action svg { display:block; }
dd-todo-row:where(:not(.todo-row *, .dd-work-row *)) :focus-visible { outline:2px solid var(--accent-strong,#b7ffb0); outline-offset:2px; }
dd-todo-row:where(:not(.todo-row *, .dd-work-row *)).selected { border-color:var(--text,#e6e6e6); }
dd-todo-row:where(:not(.todo-row *, .dd-work-row *)).active { box-shadow:inset 3px 0 var(--accent-strong,#b7ffb0); }
dd-todo-row:where(:not(.todo-row *, .dd-work-row *)):is(.grabbed,.dragging) { background:rgb(160 110 45 / 18%); }
dd-todo-row.pending-delete :is(.row-actions,.shared-row-actions) { visibility:hidden; }
dd-todo-row:where(:not(.todo-row *, .dd-work-row *)) .delete-inline-hint { position:relative; inset:auto; min-height:24px; background:#32191b; color:#ffb7b7; }
@media(max-width:480px) {
  dd-todo-row:where(:not(.todo-row *, .dd-work-row *)) .row-primary { flex-wrap:wrap; }
  dd-todo-row:where(:not(.todo-row *, .dd-work-row *)) .row-primary > .row-actions { width:100%; }
  dd-todo-row:where(:not(.todo-row *, .dd-work-row *)) :is(.check-button,.drag-handle) { min-height:40px; flex-basis:32px; }
  dd-todo-row:where(:not(.todo-row *, .dd-work-row *)) .row-actions button { min-height:40px; min-width:40px; }
}
