/* ==========================================================================
   IDE Features (File Explorer Tree, Code Editor, Syntax Highlighting, Tabs)
   ========================================================================== */

/* File Explorer Tree */
.tree-node {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  transition: var(--transition-fast);
}

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

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

.tree-node-indent {
  width: 14px;
}

.tree-icon {
  font-size: 16px;
  color: var(--text-muted);
}

/* Editor Tab Strip */
.editor-tabs-bar {
  height: 38px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  padding: 0 4px;
  gap: 2px;
  overflow-x: auto;
  user-select: none;
}

.editor-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition-fast);
  border-radius: 4px 4px 0 0;
}

.editor-tab:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
}

.editor-tab.active {
  background: var(--bg-primary);
  color: var(--text-primary);
  border-bottom: 2px solid var(--accent-primary);
  font-weight: 600;
}

.dirty-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-primary);
}

/* Breadcrumbs */
.breadcrumbs-bar {
  height: 26px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Editor Content Container */
.editor-viewport {
  flex: 1;
  display: flex;
  background: var(--bg-primary);
  overflow: hidden;
  position: relative;
}

.editor-gutter {
  width: 50px;
  background: var(--bg-primary);
  border-right: 1px solid var(--border-subtle);
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  user-select: none;
}

.gutter-line-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  line-height: 22px;
  padding-right: 12px;
}

.editor-code-surface {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 22px;
  color: #e6edf3;
  tab-size: 4;
}

/* Syntax Highlighting */
.syn-kw { color: #ff7b72; font-weight: 600; }
.syn-func { color: #d2a8ff; font-weight: 500; }
.syn-str { color: #a5d6ff; }
.syn-type { color: #ffa657; font-weight: 600; }
.syn-comment { color: #8b949e; font-style: italic; }
.syn-num { color: #79c0ff; }
.syn-op { color: #ff7b72; }

/* Editor Textarea Overlay for Live Typing */
.editor-textarea {
  width: 100%;
  height: 100%;
  background: transparent;
  color: transparent;
  caret-color: var(--accent-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 22px;
  border: none;
  outline: none;
  resize: none;
  position: absolute;
  top: 16px;
  left: 66px;
  padding: 0;
  white-space: pre;
  tab-size: 4;
  overflow: hidden;
}
