/* My To Do List (Today page), plus the two floating widgets it shares a shell
   with: the "My To Do" quick-add where Feedback used to hover, and Feedback
   itself now hanging off the bottom of the left rail. */

.todo-wrap { display: flex; flex-direction: column; gap: 12px; }

.todo-bar { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.todo-bar b { font-size: 15px; }
.todo-bar .muted { max-width: 640px; }
.todo-status { font-size: 12px; font-weight: 600; color: var(--muted); min-width: 90px; text-align: right; }
.todo-status.bad { color: var(--red); }

/* Three side by side, and as tall as the page allows, because the whole point
   is that there is blank space below the entries to click into. */
.todo-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: stretch; }

.todo-col {
  display: flex; flex-direction: column; min-width: 0;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
}
.todo-colhead {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-bottom: 1px solid var(--border); background: #f8fafc;
}
.todo-colhead h3 { font-size: 13.5px; }
.todo-count { background: #e2e8f0; color: #334155; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 1px 7px; }
/* icon() ships no width or height and the global default is 16px, which is a
   size too big sitting next to 13.5px column headings. */
.todo-colhead .icon-btn svg { width: 14px; height: 14px; }

.todo-sheet {
  flex: 1; display: flex; flex-direction: column; gap: 14px;
  padding: 12px 14px 0; min-height: 55vh; cursor: text;
  /* The entries are meant to read and behave like plain text. */
  user-select: text; -webkit-user-select: text;
}
/* Eats the rest of the column so a click low down still lands on the sheet. */
.todo-blank { flex: 1; min-height: 90px; color: var(--muted); font-size: 12.5px; padding-bottom: 12px; }

.todo-entry {
  font-size: 13.5px; line-height: 1.5; color: var(--text);
  border-radius: 7px; margin: 0 -5px; padding: 2px 5px;
}
.todo-entry:hover { background: #f1f5f9; }
.todo-bullet { font-weight: 700; color: var(--muted); }
.todo-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.todo-when { font-size: 10.5px; color: var(--muted); white-space: nowrap; margin-left: 6px; }
.todo-entry.done .todo-text { color: var(--muted); }
.todo-entry.done .todo-bullet { color: var(--green); }

.todo-entry.editing { background: #eff6ff; outline: 2px solid var(--blue); outline-offset: 1px; cursor: default; }
.todo-entry.editing:hover { background: #eff6ff; }
.todo-editrow { display: flex; align-items: flex-start; gap: 6px; }
.todo-input {
  flex: 1; min-width: 0; border: none; background: transparent; outline: none; resize: none;
  font: inherit; line-height: 1.5; color: var(--text); padding: 0; overflow: hidden;
}
/* The tooltip the spec asks for: delete, or mark as finished. */
.todo-tip { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.todo-tip .btn.sm { font-size: 11.5px; padding: 3px 8px; }
.todo-tip svg { width: 12px; height: 12px; }
.todo-tip .todo-del:hover { background: #fee2e2; border-color: var(--red); color: #b91c1c; }

@media (max-width: 900px) {
  .todo-cols { grid-template-columns: 1fr; }
  .todo-sheet { min-height: 220px; }
}

/* ---- Feedback, moved to the bottom of the left rail ---- */

.rail-foot { padding: 8px 0 0; margin-top: 8px; border-top: 1px solid var(--navy-2); }
.rail-fb {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 9px 12px; border: none; border-radius: 8px; background: none;
  color: #cbd5e1; font-weight: 500; font-size: 13.5px; text-align: left; cursor: pointer;
}
.rail-fb:hover { background: var(--navy-2); color: #fff; }
.rail-fb.on { background: var(--blue); color: #fff; }
.rail-fb svg { width: 17px; height: 17px; flex: none; }

/* The panel opens beside the button that opens it, not in the far corner where
   the launcher used to live. */
.fb-panel.fb-at-rail { left: 14px; right: auto; bottom: 84px; }

@media (max-width: 860px) {
  /* The rail turns into a horizontal strip at the top on narrow screens, so
     the button rides along in it and the panel drops from the top. */
  .rail-foot { border-top: none; margin-top: 0; padding: 0; flex: none; }
  .rail-fb { width: auto; padding: 8px 10px; font-size: 12.5px; white-space: nowrap; }
  .fb-panel.fb-at-rail { left: 12px; right: 12px; top: 76px; bottom: auto; width: auto; }
}

/* ---- The "My To Do" quick-add, where Feedback used to hover ---- */

.fb-panel .td-note { display: block; margin-bottom: 8px; }
.fb-panel .td-target { font-weight: 700; color: var(--text); }
