/* File Tree View */
#file-tree-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 0;
  user-select: none;
}

.tree-node {
  display: flex;
  align-items: center;
  height: 28px;
  min-height: 28px;
  max-height: 28px;
  flex-shrink: 0;
  overflow: hidden;
  padding: 0 8px;
  cursor: pointer;
  color: var(--text-normal);
  font-size: 13px;
  gap: 6px;
  transition: background var(--transition-fast);
  border-radius: var(--radius-sm);
  margin: 1px 4px;
}

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

.tree-node.active {
  background: var(--bg-active);
  color: var(--text-accent);
  font-weight: 500;
}

.tree-chevron {
  width: 14px;
  height: 14px;
  color: var(--text-faint);
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.tree-folder.collapsed .tree-chevron {
  transform: rotate(-90deg);
}

.tree-folder.collapsed+.tree-children {
  display: none;
}

.tree-children {
  padding-left: 14px;
}

.tree-node-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

/* Distinct Font Color for Notes Found via Tag Filter */
.tree-file.matched-by-tag > .tree-node-title {
  color: #f472b6 !important;
  font-weight: 500;
}

.file-icon-slot,
.folder-icon-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.file-status-icon.status-unchanged {
  color: var(--text-muted);
}

.file-status-icon.status-updated {
  color: #facc15;
  filter: drop-shadow(0 0 3px rgba(250, 204, 21, 0.38));
}

.file-status-icon.status-new {
  color: #38bdf8;
  filter: drop-shadow(0 0 3px rgba(56, 189, 248, 0.32));
}

/* Folder Status Propagation Styles */
.folder-status-icon.status-unchanged {
  color: #eab308;
}

.folder-status-icon.status-updated {
  color: var(--color-green);
  filter: drop-shadow(0 0 3px rgba(16, 185, 129, 0.25));
}

.folder-status-icon.status-new {
  color: #38bdf8;
  filter: drop-shadow(0 0 3px rgba(56, 189, 248, 0.3));
}

.tree-folder.folder-status-new > .tree-node-title {
  color: #7dd3fc;
  font-weight: 500;
}

.tree-folder.folder-status-updated > .tree-node-title {
  color: #6ee7b7;
  font-weight: 500;
}

.folder-status-dot {
  display: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-left: 4px;
}

.folder-status-dot.status-new {
  display: inline-block;
  background: #38bdf8;
  box-shadow: 0 0 5px rgba(56, 189, 248, 0.65);
}

.folder-status-dot.status-updated {
  display: inline-block;
  background: var(--color-green);
  box-shadow: 0 0 5px rgba(16, 185, 129, 0.6);
}

/* Multi-Vault Tree Root & Trash Can Styling */
.vault-root-group {
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 4px;
}

.vault-root-node {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-normal);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  margin: 2px 4px;
  padding: 0 6px 0 8px;
}

.vault-root-node:hover {
  background: var(--bg-hover);
  border-color: rgba(255, 255, 255, 0.08);
}

.vault-root-icon {
  color: var(--accent);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.vault-root-title {
  font-weight: 600;
  color: var(--text-normal);
  letter-spacing: 0.2px;
}

.vault-trash-btn {
  background: transparent;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  opacity: 0.5;
  transition: all var(--transition-fast);
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.vault-root-node:hover .vault-trash-btn {
  opacity: 0.85;
}

.vault-trash-btn:hover {
  opacity: 1 !important;
  color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.15) !important;
  transform: scale(1.1);
}

.file-edit-btn,
.file-print-btn {
  background: transparent;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition-fast);
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.file-edit-btn {
  margin-left: auto;
}

.tree-file:hover .file-edit-btn,
.tree-file:hover .file-print-btn {
  opacity: 0.85;
  pointer-events: auto;
}

.file-edit-btn:hover,
.file-print-btn:hover {
  opacity: 1 !important;
  color: var(--text-accent) !important;
  background: rgba(124, 58, 237, 0.18) !important;
  transform: scale(1.1);
}

.vault-reconnect-badge {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
  border: 1px solid rgba(234, 179, 8, 0.4);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  margin-left: auto;
  margin-right: 4px;
}

.vault-reconnect-badge:hover {
  background: rgba(234, 179, 8, 0.3);
}

.tab-vault-badge {
  font-size: 10px;
  color: var(--text-faint);
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 4px;
  border-radius: 3px;
  margin-right: 4px;
  max-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

