/* Notes tab: search, habit filter, the journal of day notes. */

.notes-tools { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.notes-search { width: 100%; padding: 10px 14px; }

/* Habit filter: wraps on wide screens, one sideways-scrolling row on phones. */
.note-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.note-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 220px;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border-input);
  background: var(--surface); color: var(--text-muted); font: inherit; font-size: 13px; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.note-chip:hover { border-color: var(--accent); color: var(--accent); }
.note-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.note-chip-n { font-size: 11px; opacity: .75; font-variant-numeric: tabular-nums; }

.notes-count { font-size: 12px; color: var(--text-faint); margin-bottom: 12px; }

.note-standing {
  font-size: 13px; color: var(--text-muted); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere;
  border-left: 3px solid var(--accent-ring); padding: 2px 0 2px 10px; margin-bottom: 18px;
}
.note-standing-label { display: block; font-size: 11px; color: var(--text-faint); margin-bottom: 2px; }

.notes-month {
  font-size: 11px; font-weight: 600; color: var(--text-faint); text-transform: uppercase;
  letter-spacing: .05em; margin: 22px 0 8px;
}
.notes-month:first-of-type { margin-top: 0; }
.notes-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }

/* Each note is one button: tap it to open that day. */
.note-entry {
  display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 12px 14px;
}
.note-entry:hover { border-color: var(--border-hover); }
.note-entry:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.note-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 12px; color: var(--text-faint); margin-bottom: 6px; }
.note-date { color: var(--text-muted); font-weight: 600; }
.note-habit { color: var(--accent); font-weight: 600; overflow-wrap: anywhere; }
.note-status { margin-left: auto; }
.note-status.done { color: var(--success); }
.note-text { display: block; font-size: 14px; line-height: 1.55; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.note-text mark, .note-standing mark { background: var(--accent-soft); color: var(--text); border-radius: 3px; box-shadow: 0 0 0 1px var(--accent-ring); }

.notes-more { display: flex; justify-content: center; margin-top: 16px; }

/* Stats: "📝 3 notes" on a habit's heatmap opens its notes. */
.heatmap-notes { font-size: 12px; margin-left: auto; color: var(--accent); }

@media (max-width: 640px) {
  .note-filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
  .note-filters::-webkit-scrollbar { display: none; }
  .note-chip { flex-shrink: 0; }
}
