.git-sidebar {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.git-sidebar-header {
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--vscode-sideBar-foreground);
}

.git-sidebar-empty {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 16px 12px;
  color: var(--vscode-descriptionForeground);
  font-size: 12px;
}

.git-sidebar-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 8px 0 0;
}

.git-sidebar-actions {
  display: flex;
  gap: 6px;
  padding: 0 12px 8px;
}

.git-sidebar-icon-button {
  width: 20px;
  height: 20px;
  padding: 0;
}

.git-sidebar-icon-button svg {
  width: 16px;
  height: 16px;
}

.git-action-branch-line,
.git-action-stem,
.git-action-arrow,
.git-action-prune-mark {
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.git-action-branch-line {
  stroke-width: 1.3;
  opacity: 0.9;
}

.git-action-branch-dot {
  fill: currentColor;
}

.git-action-stem {
  stroke-width: 1.4;
}

.git-action-stem--dotted {
  stroke-dasharray: 1.4 1.8;
}

.git-action-stem--solid {
  stroke-dasharray: none;
}

.git-action-arrow {
  stroke-width: 1.4;
}

.git-action-prune-mark {
  stroke-width: 1.3;
}

.git-sidebar-icon-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.git-sidebar-section {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.git-sidebar-section--changes {
  flex: 1 1 50%;
}

.git-sidebar-history {
  flex: 0 0 50%;
  max-height: 50%;
  min-height: 0;
  overflow: hidden;
  margin-top: 12px;
  border-top: 1px solid var(--vscode-editorWidget-border);
  padding-top: 8px;
  --git-history-synced-color: var(--vscode-gitDecoration-addedResourceForeground, var(--vscode-charts-green, #89d185));
  --git-history-local-color: var(--vscode-gitDecoration-untrackedResourceForeground, var(--vscode-charts-blue, #75beff));
  --git-history-remote-color: var(--vscode-gitDecoration-deletedResourceForeground, var(--vscode-charts-yellow, #cca700));
}

.git-sidebar-empty-state {
  padding: 0 12px 8px;
  color: var(--vscode-descriptionForeground);
  font-size: 12px;
}

.git-sidebar-file-list {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.git-sidebar-commit-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px 8px;
}

.git-sidebar-commit-row .git-sidebar-input {
  margin: 0;
}

.git-sidebar-file-item {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--vscode-sideBar-foreground);
  text-align: left;
  padding: 6px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.git-sidebar-file-item:hover {
  background: var(--vscode-list-hoverBackground);
}

.git-sidebar-file-path {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.git-sidebar-file-status {
  text-transform: uppercase;
  font-size: 10px;
  color: var(--vscode-descriptionForeground);
}

.git-sidebar-history-list {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  gap: 6px;
  padding: 0 12px 8px;
  overflow: auto;
}

.git-sidebar-history-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 12px 8px;
  font-size: 10px;
  color: var(--vscode-descriptionForeground);
}

.git-sidebar-history-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.git-sidebar-history-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
}

.git-sidebar-history-legend-dot--both {
  background: var(--git-history-synced-color);
}

.git-sidebar-history-legend-dot--local-only {
  background: var(--git-history-local-color);
}

.git-sidebar-history-legend-dot--remote-only {
  background: var(--git-history-remote-color);
}

.git-sidebar-history-item {
  width: 100%;
  border: none;
  padding: 6px 8px;
  border-radius: 4px;
  background: var(--vscode-input-background);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.git-sidebar-history-item:hover {
  background: var(--vscode-list-hoverBackground);
}

.git-sidebar-history-item--both {
  border-left: 3px solid var(--git-history-synced-color);
}

.git-sidebar-history-item--local-only {
  border-left: 3px solid var(--git-history-local-color);
}

.git-sidebar-history-item--remote-only {
  border-left: 3px solid var(--git-history-remote-color);
}

.git-sidebar-history-subject {
  font-size: 12px;
  color: var(--vscode-sideBar-foreground);
  margin-bottom: 2px;
  word-break: break-word;
}

.git-sidebar-history-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 10px;
  color: var(--vscode-descriptionForeground);
}

.git-sidebar-history-status {
  font-size: 10px;
  font-weight: 600;
}

.git-sidebar-history-status--both {
  color: var(--git-history-synced-color);
}

.git-sidebar-history-status--local-only {
  color: var(--git-history-local-color);
}

.git-sidebar-history-status--remote-only {
  color: var(--git-history-remote-color);
}

.git-sidebar-main {
  min-height: 0;
}

.git-sidebar-empty p {
  margin: 0 0 10px;
}

.git-sidebar-error {
  color: var(--vscode-errorForeground);
}

.git-sidebar-progress {
  color: var(--vscode-descriptionForeground);
}

.git-sidebar-guidance-list {
  margin: 8px 0 0;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.git-sidebar-guidance-list li {
  color: var(--vscode-descriptionForeground);
}

.git-sidebar-transcript {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--vscode-editorWidget-border);
}

.git-sidebar-transcript-toggle {
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  color: var(--vscode-sideBar-foreground);
}

.git-sidebar-transcript-toggle:hover {
  text-decoration: underline;
}

.git-sidebar-transcript-list {
  margin: 6px 0 0;
  padding-left: 16px;
  font-size: 11px;
  color: var(--vscode-descriptionForeground);
  max-height: 180px;
  overflow: auto;
}

.git-sidebar-transcript-list li {
  margin: 0 0 4px;
}

.git-sidebar-input {
  width: 100%;
  margin: 0 0 10px;
  padding: 6px 8px;
  border: 1px solid var(--vscode-input-border);
  background: var(--vscode-input-background);
  color: var(--vscode-input-foreground);
  border-radius: 4px;
  font-size: 12px;
}

.git-sidebar-button {
  padding: 6px 10px;
  border: none;
  border-radius: 4px;
  background: var(--vscode-button-background);
  color: var(--vscode-button-foreground);
  cursor: pointer;
}

.git-sidebar-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
