/* CodeMirror container */
.cm-editor {
  height: 100%;
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  font-size: 14px;
}

.cm-editor .cm-scroller {
  overflow: auto;
}

.cm-editor .cm-content {
  padding: 16px;
}

.cm-editor .cm-gutters {
  background: #181825;
  border-right: 1px solid #313244;
  color: #6c7086;
}

.cm-editor .cm-activeLineGutter {
  background: #1e1e2e;
}

.cm-editor .cm-activeLine {
  background: rgba(49, 50, 68, 0.4);
}

.cm-editor .cm-cursor {
  border-left-color: #cdd6f4;
}

.cm-editor .cm-selectionBackground,
.cm-editor ::selection {
  background: rgba(137, 180, 250, 0.2) !important;
}

/* Wikilink styling */
.cm-wikilink {
  color: #a6e3a1;
  text-decoration: underline;
  text-decoration-style: dotted;
  cursor: pointer;
}

.cm-wikilink:hover {
  text-decoration-style: solid;
  color: #b4f0a8;
}

/* Tag styling in editor */
.cm-tag-mark {
  color: #a6e3a1;
  font-weight: 500;
}

/* PDF viewer */
.pdf-viewer {
  width: 100%;
  height: 100%;
  border: none;
}

/* Tree items */
.tree-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  color: #a6adc8;
  user-select: none;
}

.tree-item:hover {
  background: rgba(49, 50, 68, 0.5);
  color: #cdd6f4;
}

.tree-item.active {
  background: rgba(137, 180, 250, 0.15);
  color: #89b4fa;
}

.tree-item.folder {
  color: #cdd6f4;
  font-weight: 500;
}

.tree-folder-children {
  padding-left: 12px;
}

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

/* Tag items */
.tag-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  color: #a6e3a1;
}

.tag-item:hover {
  background: rgba(49, 50, 68, 0.5);
}

.tag-item.active {
  background: rgba(166, 227, 161, 0.15);
}

.tag-count {
  color: #6c7086;
  font-size: 11px;
}

/* Disambiguation popup */
.disambiguation-popup {
  position: fixed;
  background: #1e1e2e;
  border: 1px solid #313244;
  border-radius: 6px;
  padding: 4px;
  z-index: 100;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.disambiguation-item {
  padding: 6px 12px;
  cursor: pointer;
  font-size: 13px;
  color: #a6adc8;
  border-radius: 4px;
}

.disambiguation-item:hover {
  background: rgba(137, 180, 250, 0.15);
  color: #89b4fa;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #313244;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #45475a;
}
