/* ═══════════════════════════════════════════════
   Harvey Family App — List page styles
   ═══════════════════════════════════════════════ */

.list-header {
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(1.25rem, env(safe-area-inset-top)) 1.25rem 0.9rem;
  border-bottom: 0.5px solid var(--border);
}


.list-header-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.3px;
}

.list-body {
  padding-bottom: 6rem;
}

/* ── Task items ── */
.task-item {
  display: flex;
  align-items: center;
  padding: 0 1.25rem 0 1rem;
  min-height: 54px;
  border-bottom: 0.5px solid var(--border);
  background: var(--bg);
  -webkit-tap-highlight-color: transparent;
  touch-action: pan-y;
}

.task-item.is-dragging {
  opacity: 0.25;
}

/* Checkbox button */
.tk-cb {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--border);
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: border-color .15s, background .15s;
  margin-right: 14px;
}
.tk-cb.checked {
  background: var(--primary);
  border-color: var(--primary);
}
.tk-cb.checked svg { display: block; }
.tk-cb svg { display: none; }

/* Task text — tappable to edit */
.tk-text {
  flex: 1;
  font-size: 15px;
  color: var(--text);
  padding: 15px 0;
  line-height: 1.4;
  word-break: break-word;
  cursor: text;
}
.tk-text.checked {
  text-decoration: line-through;
  color: var(--muted);
}

/* Inline edit input */
.tk-edit-input {
  flex: 1;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: none;
  border: none;
  outline: none;
  padding: 15px 0;
  line-height: 1.4;
  width: 100%;
}

/* Drag handle */
.tk-drag {
  width: 40px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  color: var(--muted);
  flex-shrink: 0;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
.tk-drag:active { cursor: grabbing; }

/* Delete button (done items) */
.tk-del {
  width: 40px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.tk-del:active { color: var(--red); }

/* ── Add new item row ── */
.add-row {
  display: flex;
  align-items: center;
  padding: 0 1.25rem 0 1rem;
  min-height: 54px;
  border-bottom: 0.5px solid var(--border);
}
.add-row-circle {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--border);
  flex-shrink: 0;
  margin-right: 14px;
  opacity: 0.4;
}
.add-row-input {
  flex: 1;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: none;
  border: none;
  outline: none;
  padding: 15px 0;
}
.add-row-input::placeholder { color: var(--muted); }

/* ── Done section ── */
.done-header-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 14px 1.25rem;
  background: none;
  border: none;
  border-bottom: 0.5px solid var(--border);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-align: left;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

#done-chevron { transition: transform .2s; }

/* ── Drag ghost ── */
.drag-ghost {
  position: fixed;
  pointer-events: none;
  z-index: 1000;
  box-shadow: 0 6px 24px rgba(0,0,0,.18);
  background: var(--surface);
  border-radius: 4px;
  display: flex;
  align-items: center;
  padding: 0 1.25rem 0 1rem;
}

/* ── Drop indicator ── */
.drop-line {
  height: 2px;
  background: var(--primary);
  margin: -1px 1.25rem;
  border-radius: 2px;
  pointer-events: none;
  display: none;
}
.drop-line.visible { display: block; }

/* ── Empty state ── */
.list-empty {
  padding: 2rem 1.25rem;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}
