/* ==========================================
   TreeRowHeader.css
   Shared collapsible tree row header component
   Used by StandardLibraryPanel, VariablesPanel, etc.
   ========================================== */

.tree-row-header {
  display: flex;
  align-items: center;
  gap: 3px;
  height: var(--row-height-tree-item, 22px);
  min-height: var(--row-height-tree-item, 22px);
  padding: 2px 4px;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.1s ease;
  font-family: var(--font-sans);
  font-size: var(--font-size-sm);
  text-transform: none;
}

.tree-row-header:hover {
  background: var(--vscode-list-hoverBackground, rgba(255, 255, 255, 0.04));
}

.tree-row-header.expanded {
  background: var(--bg-tertiary);
}

/* Chevron expand/collapse button */
.tree-row-chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--vscode-foreground, var(--text-primary));
}

.tree-row-chevron-spacer {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Type icon */
.tree-row-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Primary label */
.tree-row-label {
  font-weight: 500;
  color: var(--vscode-foreground, var(--text-primary));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Secondary label (type name, shown after colon) */
.tree-row-secondary {
  color: var(--vscode-descriptionForeground, var(--text-muted));
  margin-left: 2px;
  opacity: 0.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tree-row-secondary::before {
  content: ": ";
}

/* Count badge */
.tree-row-count {
  margin-left: auto;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  background: var(--bg-tertiary);
  padding: 0 6px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

/* Variant for group headers (like "Interfaces", "Modules") */
.tree-row-header.group-header .tree-row-count {
  font-weight: inherit;
  background: none;
  padding: 0;
}

.tree-row-header.group-header .tree-row-count::before {
  content: "(";
}

.tree-row-header.group-header .tree-row-count::after {
  content: ")";
}
