/* =============================================
   NOTES PAGE
   ============================================= */

.notes-page {
  padding: 1.5rem 1rem;
  max-width: 640px;
  margin: 0 auto;
}

.notes-header {
  margin-bottom: 1.5rem;
}

.notes-title {
  font-family: var(--headline-font);
  font-size: 1.75rem;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.notes-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ── Compose Area ─────────────────────────────────────────────── */

.note-compose {
  margin-bottom: 2rem;
}

.note-compose-inner {
  background: var(--surface-container-low);
  border-radius: var(--radius-lg);
  padding: 1rem;
  border: 1px solid var(--outline-variant);
}

.note-color-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.875rem;
  flex-wrap: wrap;
  align-items: center;
}

.note-color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--outline-variant);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

.note-color-swatch--none { background: var(--surface); }
.note-color-swatch--rose { background: var(--color-rose); }
.note-color-swatch--amber { background: var(--color-amber); }
.note-color-swatch--emerald { background: var(--color-emerald); }
.note-color-swatch--sky { background: var(--color-sky); }
.note-color-swatch--violet { background: var(--color-violet); }

.note-color-swatch:hover {
  transform: scale(1.15);
}

.note-color-swatch.selected {
  box-shadow: 0 0 0 2px var(--primary);
  border-color: var(--primary);
}

.swatch-check {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.note-color-swatch.selected .swatch-check {
  color: var(--text);
}

.note-body-row {
  margin-bottom: 0.75rem;
}

.note-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--outline-variant);
  background: var(--surface-container-lowest);
  font-family: var(--font-family);
  font-size: 0.95rem;
  color: var(--text);
  resize: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.note-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-wash);
}

.note-textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.note-submit-row,
.note-compose-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
}

.note-compose-footer {
  flex-wrap: wrap;
}

/* ── Sections ──────────────────────────────────────────────── */

.notes-section {
  margin-top: 2rem;
}

.notes-section-title {
  font-family: var(--headline-font);
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Note Cards ─────────────────────────────────────────────── */

.notes-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.note-card {
  background: var(--surface-container-lowest);
  border-radius: var(--radius-md);
  padding: 1rem 1rem 1rem 1.25rem;
  border: 1px solid var(--outline-variant);
  border-left-width: 4px;
  border-left-color: var(--surface);
  transition: box-shadow 0.2s ease;
}

.note-card--none { border-left-color: var(--surface); }
.note-card--rose { border-left-color: var(--color-rose); }
.note-card--amber { border-left-color: var(--color-amber); }
.note-card--emerald { border-left-color: var(--color-emerald); }
.note-card--sky { border-left-color: var(--color-sky); }
.note-card--violet { border-left-color: var(--color-violet); }

.note-card:hover {
  box-shadow: var(--shadow-sm);
}

.note-body {
  font-size: 0.95rem;
  color: var(--on-surface);
  line-height: 1.55;
  margin: 0 0 0.75rem;
  word-break: break-word;
}

.note-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.note-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.note-delete-btn,
.note-edit-btn {
  opacity: 0;
  transition: opacity 0.15s ease;
  color: var(--text-muted);
  min-height: 28px;
  padding: 0.25rem 0.5rem;
}

.note-card:hover .note-delete-btn,
.note-card:hover .note-edit-btn {
  opacity: 1;
}

.note-delete-btn:hover {
  color: var(--danger);
}

.note-edit-btn:hover {
  color: var(--primary);
}

.note-actions {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

/* ── Inline Edit ────────────────────────────────────────────── */

.note-card-edit {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.note-card-edit .note-color-row {
  margin-bottom: 0;
}

.note-card-edit .note-textarea {
  margin-bottom: 0;
}

.note-edit-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.note-edit-buttons {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

.note-card-edit.hidden,
.note-card-display.hidden {
  display: none;
}

/* ── Empty State ───────────────────────────────────────────── */

.notes-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}
