/* File tabs - consistent with /code/ page styling */
.file-tabs {
  display: flex;
  align-items: center;
  background: var(--workspace-bg-secondary);
  border-bottom: 1px solid var(--workspace-border-default);
  overflow-x: auto;
  overflow-y: hidden;
  min-height: 36px;
  padding: 0 8px;
  gap: 4px;
}

.file-tabs::-webkit-scrollbar {
  height: 4px;
}

.file-tabs::-webkit-scrollbar-track {
  background: transparent;
}

.file-tabs::-webkit-scrollbar-thumb {
  background: var(--workspace-border-default);
  border-radius: 2px;
}

.file-tabs-plus-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.file-tabs-plus-btn:hover {
  background: var(--workspace-bg-tertiary);
  color: var(--workspace-icon-primary);
}

.file-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: transparent;
  border: none;
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  white-space: nowrap;
  max-width: 200px;
}

.file-tab:hover {
  background: var(--workspace-bg-tertiary);
  color: var(--text-primary);
}

.file-tab.active {
  background: transparent;
  color: var(--text-primary);
  font-weight: 600;
  border-bottom: 2px solid var(--workspace-icon-primary);
}

.file-tab-icon {
  font-size: 12px;
  flex-shrink: 0;
}

.file-tab-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-tab-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  font-size: 16px;
  line-height: 1;
  opacity: 0;
  cursor: pointer;
  pointer-events: auto;
  transition: all 0.2s ease;
}

.file-tab:hover .file-tab-close {
  opacity: 0.7;
}

.file-tab-close:hover {
  opacity: 1;
  background: var(--workspace-bg-tertiary);
  color: var(--workspace-icon-primary);
}

/* Modified indicator (unsaved changes) */
.file-tab.modified .file-tab-name::after {
  content: " *";
  color: var(--color-warning, #f59e0b);
}

/* Drag and drop for file tabs */
.file-tab.dragging {
  opacity: 0.5;
  cursor: grabbing;
}

.file-tab.drag-over {
  border-left: 2px solid var(--workspace-icon-primary);
  padding-left: 10px;
}

.file-tab[draggable="true"] {
  cursor: grab;
}

.file-tab[draggable="true"]:active {
  cursor: grabbing;
}

/* New file input inline */
.file-tab-input {
  background: transparent;
  border: 1px solid var(--workspace-border-default);
  border-radius: 4px;
  color: var(--text-primary);
  font-size: 13px;
  padding: 2px 6px;
  width: 150px;
  outline: none;
}

.file-tab-input:focus {
  border-color: var(--workspace-icon-primary);
}
