.tabs {
  min-width: 0;
}

.tabList,
:global(.panel-tabs),
:global(.worktree-tabs) {
  display: flex;
  align-items: center;
  min-width: 0;
}

.tabList[data-orientation="horizontal"] {
  gap: var(--gap-control);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tabList[data-orientation="horizontal"]::-webkit-scrollbar {
  display: none;
}

.tabList[data-orientation="vertical"] {
  flex-direction: column;
}

:global(.panel-tabs) {
  gap: var(--gap-control);
}

:global(.worktree-tabs) {
  border-bottom: 1px solid var(--border-default);
}

.tab,
:global(.panel-tab),
:global(.worktree-tab) {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--gap-control);
  font-family: inherit;
  line-height: 1;
  margin: 0;
  min-height: var(--touch-target-min);
  padding: 0;
  text-decoration: none;
  transition:
    background var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}

.tab:focus-visible,
:global(.panel-tab):focus-visible,
:global(.worktree-tab):focus-visible {
  outline: none;
  box-shadow: var(--control-focus-ring);
}

.tabActive,
:global(.panel-tab.active),
:global(.worktree-tab.active) {
  color: var(--text-primary);
}

:global(.panel-tab) {
  font-size: var(--type-body-6-size);
  font-weight: var(--type-body-6-weight);
  line-height: var(--type-body-6-line-height);
  padding: var(--inset-control-block) var(--inset-control-inline);
  border-radius: var(--radius-control);
  color: var(--text-tertiary);
}

:global(.panel-tab:hover) {
  color: var(--text-secondary);
}

:global(.panel-tab.active) {
  background: var(--control-primary-bg);
  color: var(--control-primary-fg);
  font-weight: var(--type-body-6-weight);
}

:global(.worktree-tab) {
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--type-body-6-size);
  font-weight: var(--type-body-6-weight);
  line-height: var(--type-body-6-line-height);
  color: var(--text-secondary);
}

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

:global(.worktree-tab.active) {
  border-bottom: 2px solid var(--state-selected-border);
}

.panel {
  min-width: 0;
}
