/* ---------- Notes & Reminders (S331, S339) ---------- */
/* Split from base.css — all note-* and notes-* classes. */

.notes-section { margin-bottom: 20px; }

.notes-section-title {
  font-family: var(--font-numbers);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.note-card {
  display: flex;
  align-items: stretch;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 2px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  transition: border-color 150ms ease;
  overflow: hidden;
}
.note-card:hover { border-color: var(--text-muted); }
.note-card--pinned { border-left-color: var(--gold); }

.note-card-body {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
}

.note-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.note-card-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
}

.note-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.note-card-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: 6px;
  line-height: 1.5;
  white-space: pre-wrap;
}

/* --- Checklist --- */

.note-checklist {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--border-subtle);
}

.note-checklist-progress {
  font-family: var(--font-numbers);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.note-cl-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 3px 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
  cursor: pointer;
}
.note-cl-item--done .note-cl-text {
  text-decoration: line-through;
  opacity: 0.5;
}

.note-cl-check {
  flex-shrink: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.note-cl-item--done .note-cl-check { color: var(--gold); }

.note-cl-edit-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.note-cl-check-edit {
  flex-shrink: 0;
  font-size: 1rem;
  cursor: pointer;
  color: var(--text-muted);
}

.note-cl-input {
  flex: 1;
  font-size: 0.9rem;
  padding: 4px 8px;
}

/* --- Attachments --- */

.note-attachments {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.note-attachment {
  display: block;
  width: 60px;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  transition: border-color 150ms ease;
}
.note-attachment:hover { border-color: var(--gold); }

.note-attachment-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.note-attachment--file {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  color: var(--text-muted);
  background: var(--bg-card-hover);
}
.note-attachment--file::after { content: '📎'; font-size: 1.2rem; }
.note-attachment--file .note-attachment-img { display: none; }

.note-attachment-wrap { display: inline-flex; }

.note-audio-player {
  height: 36px;
  max-width: 240px;
  border-radius: 6px;
}

.note-recording-indicator {
  color: #e74c3c;
  font-size: 0.78rem;
  padding: 4px 0;
  animation: note-rec-pulse 1s ease-in-out infinite;
}
@keyframes note-rec-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.note-att-audio { border-radius: 4px; }

.note-att-list { display: flex; flex-direction: column; gap: 4px; }

.note-att-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.note-att-thumb {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
}

.note-att-id {
  font-family: var(--font-numbers);
  font-size: 0.8rem;
  color: var(--text-muted);
  flex: 1;
}

/* --- Links --- */

.note-link { color: var(--gold); word-break: break-all; }
.note-link:hover { color: var(--gold-bright); text-decoration: underline; }

/* --- Tags --- */

.note-tags { display: flex; gap: 4px; flex-wrap: wrap; }

.note-tag {
  font-family: var(--font-numbers);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 2px 8px;
  border-radius: 8px;
  background: var(--gold-glow);
  color: var(--gold-dim);
}

/* --- Badges --- */

.note-badge {
  font-family: var(--font-numbers);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.note-badge-overdue { color: var(--red); background: var(--red-dim); }
.note-badge-today { color: var(--amber); background: var(--amber-dim); }
.note-badge-upcoming { color: var(--gold); background: var(--gold-glow-strong); }

/* --- Pin --- */

.note-pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: none;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  padding: 3px 5px;
  transition: color 150ms ease, border-color 150ms ease;
}
.note-pin:hover { color: var(--gold); border-color: var(--border-subtle); }
.note-pin--active { color: var(--gold); }

/* --- Footer + Edit --- */

.note-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  gap: 8px;
}

.note-edit-btn {
  font-family: var(--font-numbers);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 2px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  margin-left: auto;
  flex-shrink: 0;
  transition: color 150ms ease, border-color 150ms ease;
}
.note-edit-btn:hover { color: var(--text-primary); border-color: var(--text-muted); }

.note-delete {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  line-height: 1;
  transition: color 150ms ease;
}
.note-delete:hover { color: var(--red); }

/* --- Form / Modal --- */

.note-form {
  background: var(--bg-card);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.note-form-actions { display: flex; gap: 8px; }

.note-edit-modal { max-width: min(440px, 90vw); }
.note-edit-modal .form-input { margin-bottom: 0; }
.note-edit-modal #ne-title { font-weight: 500; font-size: 1.05rem; }

.note-edit-row {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}
.note-edit-label { flex: 1; min-width: 0; }
.note-edit-label-text {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

/* --- Filters --- */

.notes-filters { margin-bottom: 16px; }

.notes-filter-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.notes-filter-btn {
  font-family: var(--font-numbers);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 150ms ease;
}
.notes-filter-btn:hover { border-color: var(--gold); color: var(--text-primary); }
.notes-filter-btn--active {
  border-color: var(--gold);
  background: var(--gold-glow);
  color: var(--gold);
}

.notes-filter-tag {
  font-family: var(--font-numbers);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 3px 10px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 150ms ease;
}
.notes-filter-tag:hover { border-color: var(--gold-dim); color: var(--text-secondary); }
.notes-filter-tag--active {
  border-color: var(--gold);
  background: var(--gold-glow-strong);
  color: var(--gold);
}

.notes-filter-count {
  font-size: 0.7rem;
  opacity: 0.6;
}

/* --- Grip / Drag --- */

.note-grip {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  cursor: grab;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
  opacity: 0.35;
  user-select: none;
  touch-action: none;
  border-right: 1px solid var(--border-subtle);
  transition: opacity 150ms ease, background 150ms ease;
}
.note-card:hover .note-grip { opacity: 0.7; background: rgba(255,255,255,0.02); }
.note-grip:active { cursor: grabbing; opacity: 1; background: rgba(255,255,255,0.04); }

.note-card--dragging {
  opacity: 0.85;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  border-color: var(--gold);
  position: relative;
  z-index: 10;
}

/* --- Checked --- */

.note-card--checked { opacity: 0.5; }
.note-card--checked .note-card-body { padding: 12px 16px; }
.note-card--checked .note-card-title { text-decoration: line-through; }

.note-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-right: 6px;
  flex-shrink: 0;
  transition: color 150ms ease;
}
.note-check:hover { color: var(--gold); }
.note-check--done { color: var(--gold); }

/* --- Tag input (editor) --- */

.note-tag-input-wrap { position: relative; }

.note-tag-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.note-tag-chip {
  font-family: var(--font-numbers);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 2px 8px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 150ms ease;
}
.note-tag-chip:hover { border-color: var(--gold); color: var(--gold); }
.note-tag-chip--active {
  background: var(--gold-glow);
  border-color: var(--gold);
  color: var(--gold);
}

/* --- Notifications --- */

.note-notif-count {
  font-family: var(--font-numbers);
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.note-notifs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  margin-bottom: 6px;
}

.note-notif-add {
  font-size: 0.82rem;
  color: var(--gold);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.note-notif-add:hover { color: var(--gold-bright); }

.note-notif-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.note-notif-select {
  flex: 1;
  font-size: 0.88rem;
  padding: 4px 8px;
}

.note-notif-remove {
  font-size: 0.82rem;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
}
.note-notif-remove:hover { color: var(--red); }
