/* ============================================================
   TODO PAGE — /todo/main.css
   Requires global /main.css to be loaded first.
   ============================================================ */

/* ── Todo layout (fills .main like notes-layout) ─────────── */

.todo-layout {
  
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

#todo-list {
  
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 2px 1px;
}

/* ── Add area ────────────────────────────────────────────── */

.add-area {
  background: var(--mid);
  border-radius: var(--radius);
  padding: 12px 12px;
  margin-bottom: 12px;
  flex-shrink: 0;
}


.add-area input {
  width: 100%;
  box-sizing: border-box;
  border: none;
  border-radius: var(--radius);
  background-color: var(--light);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  height: 30px;
  padding: 5px;
  margin-bottom: 8px;
  outline: none;
}

.add-area input::placeholder {
  color: var(--text);
}

.add-area input:focus {
  border-bottom-color: var(--light);
}

.add-area textarea {
  height: 48px;
  font-size: 13px;
  color: var(--accent);
  padding: 0;
  line-height: 1.5;
}

.add-area textarea::placeholder {
  color: var(--accent);
  opacity: 0.7;
}

.plusbutton {
  display: flex;
  justify-content: flex-end;
}

.plusbutton button {
  display: flex;
  justify-content: flex-end;
  flex-direction: row;
  gap: 4px;
  flex-shrink: 0;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius);
  border: 1px solid var(--light);
  background: var(--mid);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition:
    border-color 0.2s,
    background 0.2s,
    color 0.2s;
  cursor: pointer;
  white-space: nowrap;
  gap: 1px;

}



.plusbutton button:hover {
  background: var(--dark);
}

.plusbutton button img {
  height: 20px;
}

/* ── Section labels ──────────────────────────────────────── */

.section-label {
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 12px 0 6px;
  opacity: 0.7;
}

/* ── Todo item card ──────────────────────────────────────── */

.todo-item {
  background: var(--mid);
  border-radius: var(--radius);
  padding: 11px 13px;
  margin-bottom: 6px;
  transition: opacity 0.2s;
}

.todo-item.done {
  opacity: 0.5;
}

.item-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

/* ── Checkbox ────────────────────────────────────────────── */

.cb {
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  flex-shrink: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  transition: background 0.15s, border-color 0.15s;
  box-sizing: border-box;
}

.cb.unchecked:hover {
  border-color: var(--text);
}

.cb img {
    width: 20px;

}

.cb.checked {
  border-color: var(--light);
  background: var(--dark)
}

.cb.checked img {
  filter: brightness(0) invert(1);
}

/* ── Item body ───────────────────────────────────────────── */

.item-body {
  flex: 1;
  min-width: 0;
}

.item-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  word-break: break-word;
}

.todo-item.done .item-title {
  text-decoration: line-through;
  opacity: 0.6;
}

.item-desc {
  font-size: 12px;
  color: var(--accent);
  line-height: 1.55;
  margin-top: 4px;
  word-break: break-word;
}

.item-desc.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.expand-btn {
  font-size: 11px;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 0;
  margin-top: 2px;
  display: inline-block;
  transition: color 0.15s;
}

.expand-btn:hover {
  color: var(--text);
}

/* ── Meta timestamps ─────────────────────────────────────── */

.item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 7px;
  font-size: 11px;
  color: var(--accent);
  opacity: 0.6;
}

.meta-piece {
  display: flex;
  align-items: center;
  gap: 4px;
}

.meta-piece img {
  width: 11px;
  filter: var(--icolor);
}

/* ── Action buttons (edit / delete) ─────────────────────── */

.item-actions {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s;
}

.todo-item:hover .item-actions {
  opacity: 1;
}

.act-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  transition: background 0.15s;
}

.act-btn:hover {
  background: var(--light);
}

.act-btn img {
  width: 16px;
  filter: var(--icolor);
}

.act-btn.del:hover img {
  filter: invert(40%) sepia(80%) saturate(500%) hue-rotate(320deg);
}

/* ── Edit card ───────────────────────────────────────────── */

.edit-card {
  background: var(--mid);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 6px;
  outline: 1px solid var(--accent);
}

.edit-card input,
.edit-card textarea {
  width: 100%;
  box-sizing: border-box;
  background: transparent;
  border: none;
  color: var(--text);
  outline: none;
  resize: none;
}

.edit-card input {
  font-size: 14px;
  font-weight: 500;
  height: 28px;
  border-bottom: 1px solid var(--light);
  padding: 0 0 8px;
  margin-bottom: 8px;
}

.edit-card textarea {
  font-size: 13px;
  height: 48px;
  color: var(--accent);
  line-height: 1.5;
  padding: 0;
}

.edit-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.edit-footer button {
  height: 28px;
  padding: 0 12px;
  background: var(--light);
  border: none;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.edit-footer button:hover {
  background: var(--dark);
}

/* ── Empty state ─────────────────────────────────────────── */

.empty {
  font-size: 13px;
  color: var(--accent);
  padding: 8px 0;
  opacity: 0.6;
}



.right {
  margin-left: auto;
}
