.contentHeader {
  margin-bottom: 0;
  gap: var(--space-sm);
}

section {
  height: 100%;
}
.mainContent {
  margin-left: 0;
  height: 100%;
}

.notesContainer {
  padding: 0;
  gap: 0;
  height: 100%;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--card-bg);
}

.notesContainer.isLoading {
  opacity: 0.7;
  pointer-events: none;
}

#notesListContainer {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  background: var(--bg-primary);
}

.sectionHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-md);
  border-bottom: 1px solid var(--border-primary);
  flex-shrink: 0;
  margin-bottom: 0;
}

.sectionHeaderLeft {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.sectionHeader h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.newNoteActionContainer {
  position: relative;
}
.newNoteActionContainer .actionBtn {
  padding: var(--space-sm);
}
.notesCount {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--card-bg);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-primary);
}

.noteItemPublic .noteMeta::after {
  content: " · Public";
}

/* Folder groups */
.noteFolder {
  margin-bottom: 2px;
}

.noteFolderHeader {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: var(--space-sm) var(--space-md);
  cursor: pointer;
  user-select: none;
  background: var(--surface-primary);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
}

.noteFolderHeader:hover {
  background: var(--hover-bg);
}

.folderChevron {
  flex-shrink: 0;
  transition: transform 0.2s ease;
  color: var(--text-secondary);
}

.noteFolder.collapsed .folderChevron {
  transform: rotate(-90deg);
}

.noteFolderName {
  font-size: 0.85rem;
  font-weight: 600;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.noteFolderCount {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.deleteFolderBtn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: opacity 0.5s ease;
}

.noteFolderHeader:hover .deleteFolderBtn {
  opacity: 1;
}

.deleteFolderBtn:hover {
  color: var(--danger);
}

.noteFolderNotes {
  padding-left: 20px;
  max-height: 3000px;
  transition: max-height 0.25s ease;
  overflow: visible;
}

.noteFolder.collapsed .noteFolderNotes {
  max-height: 0;
  overflow-y: auto;
}

.folderEmpty {
  padding: 8px var(--space-md);
  font-size: 0.78rem;
}

/* Per-note actions button */
.noteActionsBtn {
  opacity: 0;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  color: var(--text-secondary);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
}

@media (hover: none) and (pointer: coarse) {
  .noteActionsBtn, .deleteFolderBtn {
    opacity: 1;
  }
}

.noteItem:hover .noteActionsBtn {
  opacity: 1;
}

.noteActionsBtn:hover {
  color: var(--text-primary);
}

.newFolderModal {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 200px;
  max-height: fit-content;
  z-index: 3;
  backdrop-filter: var(--filter) brightness(30%);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  padding: var(--space-xs) var(--space-md);
  border-bottom: 1px solid var(--border-primary);
}

.newFolderModal .inputField {
  max-width: 400px;
}
.newFolderModal .btn {
  max-width: fit-content;
  margin: var(--space-sm);
}

.dropdown-sectionLabel {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
  padding: 6px 10px 2px;
}

#notesList {
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  flex: 1;
}

#notesList::-webkit-scrollbar {
  width: 6px;
}
#notesList::-webkit-scrollbar-track {
  background: transparent;
}
#notesList::-webkit-scrollbar-thumb {
  background: var(--border-primary);
  border-radius: 999px;
}
#notesList::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* Note items */
.noteItem {
  border-bottom: 1px solid var(--border-primary);
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  margin-bottom: 4px;
  cursor: pointer;
  color: #fff;
  border-left: 2px solid transparent;
  transition: background 0.4s ease, border-color 0.4s ease, border-radius 0.4s ease;
  position: relative;
}

.noteItem:hover {
  border-radius: var(--radius-sm);
  background: var(--hover-bg);
}

.noteItem.active {
  background: var(--hover-bg);
  border-left-color: var(--primary-light);
  color: #fff;
}

.noteItemContent {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.noteTitle {
  margin-bottom: 0;
  font-size: 0.9rem;
  font-weight: 560;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notePreview {
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.noteMeta {
  font-size: 0.7rem;
  color: var(--text-secondary);
  opacity: 0.85;
  margin-top: 2px;
}

.noteItem.removing {
  opacity: 0;
  transform: translateX(-12px);
  transition: all 0.4s ease;
}

.noteActions {
  display: flex;
  gap: var(--space-sm);
}

.actionBtn.tooltip:hover::after {
  color: var(--text-primary);
  z-index: 1;
}

@media (max-width: 800px) {
  .notesContainer {
    height: 100%;
    max-height: none;
    border: none;
    overflow: visible;
  }

  #notesListContainer {
    height: 100%;
  }
}