.folder-list {
  list-style: none;
  padding: 0;
}

.folder-item p,
.note-item p {
  margin: 0;
}

.folder-item {
  padding: 10px;
  cursor: pointer;
  border-radius: 5px;
  margin-bottom: 5px;
  color: var(--text-color);
  display: flex;
  transition: background-color 0.3s;
}

.folder-item .delete-note-btn {
  margin-left: 0;
}

.folder-item:hover {
  background-color: #e0e0e0;
}

.focused {
  background-color: #e0e0e0;
}

.add-folder {
  margin-top: 10px;
  display: block;
  width: 100%;
  padding: 10px;
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 5px;
  margin-bottom: 20px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.add-folder:hover {
  background-color: #0056b3;
}

.notes {
  list-style: none;
  padding: 0;
}

.note-actions {
  text-align: end;
}

.note-item {
  margin-bottom: 5px;
  padding: 10px;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background-color 0.3s;
  height: fit-content;
}

.note-item:hover {
  background-color: #e0e0e0;
}

.search-bar input {
  display: block;
  width: 100%;
  padding: 10px;
  border: 1px dashed #ccc;
  border-radius: 5px;
}

.add-note-btn {
  flex-shrink: 0;
  width: 37.5px;
  margin-left: 10px;
  background-color: #007bff;
  color: #fff;
  border: none;
  font-size: 30px;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s;
}

.add-note-btn:hover {
  background-color: #0056b3;
}

.note-title {
  font-size: 24px;
  margin-top: 10px;
  border-radius: 5px;
  border: 0px solid #ccc;
  outline: none;
  color: #333;
  font-weight: bold;
}

.note-content {
  color: #333;
  line-height: 26px;
  height: 100%;
  font-size: 16px;
  border-radius: 5px;
  resize: none;
  border: none;
  outline: none;
  font-weight: 400;
}

.edit-note-btn {
  height: fit-content;
  border: none;
  margin-left: auto;
  background-color: transparent;
  color: #fff;
  opacity: 0.1;
}

.edit-note-btn:hover {
  cursor: pointer;
  opacity: 1;
}

.delete-note-btn,
.perm-delete-note-btn,
.restore-note-btn {
  height: fit-content;
  border: none;
  background-color: transparent;
  color: #fff;
  opacity: 0.1;
  margin-left: auto;
}

.restore-note-btn {
  margin-left: 0;
}

.delete-note-btn:hover,
.perm-delete-note-btn:hover,
.restore-note-btn:hover {
  cursor: pointer;
  opacity: 1;
}

.note-info-bar {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.note-count {
  font-weight: bold;
  color: #333;
}

.sort-dropdown-container {
  position: relative;
  display: inline-block;
}

.sort-btn {
  background-color: #007bff;
  color: #fff;
  padding: 6px 12px;
  border-radius: 5px;
  cursor: pointer;
  border: none;
}

.sort-btn:hover {
  background-color: #0056b3;
}

.sort-dropdown {
  position: absolute;
  top: 36px; /* 让下拉框在按钮正下方 */
  right: 0;
  background-color: var(--secondary-color);
  border: 1px solid #ddd;
  width: 180px;
  border-radius: 5px;
  z-index: 999;
}

.sort-dropdown ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sort-dropdown ul li {
  padding: 8px 12px;
  cursor: pointer;
}

.sort-dropdown ul li:hover {
  background-color: var(--third-color);
}
/* ============ 加密按钮 ============ */
.encrypt-toggle-btn {
  padding: 6px 12px;
  background-color: #007bff;
  color: #fff;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s;
}

.encrypt-toggle-btn:hover {
  background-color: #0056b3;
}

.decrypt-toggle-btn {
  padding: 6px 12px;
  background-color: #dc3545;
  color: #fff;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s;
}

.decrypt-toggle-btn:hover {
  background-color: #bd2130;
}

/* ============ 编辑模式开关 ============ */
.edit-mode-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #333;
}

.mode-label-left,
.mode-label-right {
  min-width: 60px;
  text-align: center;
}

/* switch外包一层，以便控制布局 */
.switch-wrapper {
  position: relative;
  display: inline-block;
  width: 34px; /* switch总宽度 */
  height: 20px; /* switch总高度 */
}

/* 隐藏原生checkbox */
.edit-mode-checkbox {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

/* switch背景条 */
.switch {
  position: absolute;
  top: 0;
  left: 0;
  width: 34px;
  height: 20px;
  background-color: #ccc;
  border-radius: 10px;
  transition: background-color 0.3s;
}

/* switch上的圆 */
.switch::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 16px;
  height: 16px;
  background-color: #fff;
  border-radius: 8px;
  transition: transform 0.3s;
}

/* 勾选时：开关背景变蓝，圆点右移 */
.edit-mode-checkbox:checked + .switch {
  background-color: var(--primary-color);
}

.edit-mode-checkbox:checked + .switch::after {
  transform: translateX(14px);
}

/* ============ 导出下拉框 ============ */
.export-dropdown-container {
  position: relative;
}

/* 导出按钮 */
.export-btn {
  background-color: #007bff;
  color: #fff;
  padding: 6px 12px;
  border-radius: 5px;
  cursor: pointer;
  border: none;
  transition: background-color 0.3s;
}

.export-btn:hover {
  background-color: #0056b3;
}

/* 下拉框 */
.export-dropdown {
  position: absolute;
  top: 36px; /* 让下拉框显示在按钮正下方 */
  right: 0;
  background-color: #fff;
  border: 1px solid #ddd;
  width: 150px;
  border-radius: 5px;
  z-index: 999;
  padding: 8px 0;
}

/* 下拉列表样式：左对齐 */
.export-dropdown ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.export-dropdown ul li {
  padding: 6px 12px;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  text-align: left; /* 强制左对齐 */
}

.export-dropdown ul li:hover {
  background-color: #f0f0f0;
}

/* 容器：让下拉框、按钮水平排列 */
.theme-ctrl {
  display: flex;
  align-items: center;
  gap: 8px; /* 间距 */
  margin-bottom: 10px;
}

/* 下拉框 */
.theme-ctrl select {
  padding: 4px 6px;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-size: 14px;
}

/* 切换按钮 */
.mode-toggle-btn {
  background-color: #007bff;
  color: #fff;
  padding: 6px 12px;
  border-radius: 5px;
  cursor: pointer;
  border: none;
  font-size: 18px;
  transition: background-color 0.3s;
}

.mode-toggle-btn:hover {
  background-color: #0056b3;
}

#editorContainer {
  flex-shrink: 0;
  overflow: hidden;
}
