/* =============================================================================
 * AI Panel: console tabs bar
 * Ported from scitex-cloud global-ai-chat/06b-console-tabs.css
 * ============================================================================= */

.stx-shell-ai-console-tabs-bar {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-bottom: 1px solid var(--border-default, #30363d);
  background: var(--bg-tertiary, var(--workspace-bg-tertiary, #0d1117));
  flex-shrink: 0;
  overflow: hidden;
  min-height: 32px;
}

/* New terminal button */
.stx-shell-ai-console-new-tab {
  flex-shrink: 0;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border-default, #30363d);
  border-radius: 3px;
  background: transparent;
  color: var(--text-muted, #8b949e);
  cursor: pointer;
  font-size: 0.6875rem;
  transition:
    background 0.15s,
    color 0.15s;
  white-space: nowrap;
}

.stx-shell-ai-console-new-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

/* Tabs list — horizontal scroll */
.stx-shell-ai-console-tabs-list {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  overflow-y: hidden;
  flex: 1;
  min-width: 0;
  scrollbar-width: none;
}

.stx-shell-ai-console-tabs-list::-webkit-scrollbar {
  display: none;
}

/* Individual tab chip */
.stx-shell-ai-console-tab-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: var(--text-muted, #8b949e);
  font-size: 0.6875rem;
  cursor: pointer;
  white-space: nowrap;
  max-width: 140px;
  transition:
    background 0.15s,
    color 0.15s;
  flex-shrink: 0;
}

.stx-shell-ai-console-tab-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

/* Active tab — green accent (terminal-themed) */
.stx-shell-ai-console-tab-item.active {
  background: rgba(5, 150, 105, 0.15);
  border-color: rgba(5, 150, 105, 0.6);
  color: var(--text-primary);
}

.stx-shell-ai-console-tab-title {
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

/* Close button on tab chip (visible on hover) */
.stx-shell-ai-console-tab-close {
  display: none;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-muted, #8b949e);
  cursor: pointer;
  font-size: 0.5625rem;
  line-height: 1;
}

.stx-shell-ai-console-tab-item:hover .stx-shell-ai-console-tab-close {
  display: inline-flex;
}

.stx-shell-ai-console-tab-close:hover {
  color: #cf222e;
}
