/* ── Checklist Node Row ───────────────────────────────────────────────── */

.checklist-node {
  display: flex;
  align-items: center;
  padding: 12px 10px;
  border-bottom: 1px solid var(--border-color, #3a3a5a);
  cursor: pointer;
  transition: background 0.1s;
  gap: 10px;
  min-height: 48px;
  user-select: none;
}

.checklist-node:hover {
  background: var(--bg-hover, rgba(99, 102, 241, 0.06));
}

.checklist-node.selected {
  background: var(--accent-primary-dim, rgba(99, 102, 241, 0.15));
}

.checklist-node.edit-mode {
  cursor: grab;
}

.checklist-node.edit-mode:active {
  cursor: grabbing;
}

.checklist-node-folder-icon {
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
  cursor: pointer;
  margin-right: -4px;
  position: relative;
  top: -1px;
}

/* ── Checkbox ────────────────────────────────────────────────────────── */

.checklist-checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  min-width: 22px;
  border: 2px solid var(--text-muted, #6b6b8d);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  flex-shrink: 0;
}

.checklist-checkbox:hover {
  border-color: var(--accent-primary, #6366f1);
}

.checklist-checkbox.checked {
  background: var(--accent-primary, #6366f1);
  border-color: var(--accent-primary, #6366f1);
  color: #fff;
}

/* ── Title ───────────────────────────────────────────────────────────── */

.checklist-node-title {
  flex: 1;
  font-size: 15px;
  line-height: 1.3;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.checklist-node-title.checked {
  opacity: 0.5;
}

.checklist-node-title-text {
  cursor: pointer;
}

.checklist-node-title.checked .checklist-node-title-text {
  text-decoration: line-through;
}

.checklist-node-rename-input {
  width: 100%;
  background: var(--bg-secondary, #1a1a2e);
  border: 1px solid var(--accent-primary, #6366f1);
  color: var(--text-primary, #e8e8f2);
  font-size: 15px;
  padding: 2px 6px;
  border-radius: 4px;
  outline: none;
}

/* ── Actions (right side) ────────────────────────────────────────────── */

.checklist-node-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* ── Counter Badge ───────────────────────────────────────────────────── */

.checklist-counter-badge {
  display: flex;
  gap: 1px;
  font-size: 12px;
  font-weight: 600;
}

.checklist-counter-unchecked,
.checklist-counter-total {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 4px;
  line-height: 1;
}

.checklist-counter-unchecked {
  background: var(--accent-primary, #6366f1);
  color: #fff;
}

.checklist-counter-unchecked.all-done {
  background: #22c55e;
}

.checklist-counter-total {
  background: var(--bg-hover, rgba(99, 102, 241, 0.2));
  color: var(--text-secondary, #a0a0c0);
}

/* ── Plus Button (add sub-item) ──────────────────────────────────────── */

.checklist-node-plus-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-muted, #6b6b8d);
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  transition: color 0.15s;
}

.checklist-node-plus-btn:hover {
  color: var(--accent-primary, #6366f1);
}

/* ── Chevron (drill-down indicator) ──────────────────────────────────── */

.checklist-node-chevron {
  display: flex;
  align-items: center;
  color: var(--text-muted, #6b6b8d);
}

/* ── Drag Handle ─────────────────────────────────────────────────────── */

.checklist-node-drag-handle {
  display: flex;
  align-items: center;
  color: var(--text-muted, #6b6b8d);
  cursor: grab;
  padding: 2px;
  flex-shrink: 0;
}

.checklist-node-drag-handle:active {
  cursor: grabbing;
}

/* ── Edit Mode Buttons ───────────────────────────────────────────────── */

.checklist-node-rename-btn,
.checklist-node-delete-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}

.checklist-node-rename-btn {
  color: var(--text-secondary, #a0a0c0);
}

.checklist-node-rename-btn:hover {
  color: var(--accent-primary, #6366f1);
  background: rgba(99, 102, 241, 0.1);
}

.checklist-node-delete-btn {
  color: var(--text-muted, #6b6b8d);
}

.checklist-node-delete-btn:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

/* ── Indented Mode: Expand/Collapse Controls ─────────────────────────── */

.checklist-node-expand-controls {
  display: flex;
  align-items: center;
  gap: 2px;
}

.checklist-node-toggle-btn,
.checklist-node-expand-all-btn,
.checklist-node-collapse-all-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-muted, #6b6b8d);
  cursor: pointer;
  padding: 2px;
  border-radius: 3px;
}

.checklist-node-toggle-btn:hover,
.checklist-node-expand-all-btn:hover,
.checklist-node-collapse-all-btn:hover {
  color: var(--text-primary, #e8e8f2);
  background: var(--bg-hover, rgba(99, 102, 241, 0.1));
}

.checklist-node-expand-all-btn,
.checklist-node-collapse-all-btn {
  gap: -2px;
}

/* ── Indented tree group ─────────────────────────────────────────────── */

.checklist-tree-indented-group {
  /* Container for an indented node + its children */
}
