/* Startup Error Banner */
.startup-error-banner {
  margin: 8px 12px;
  border: 1px solid var(--vscode-inputValidation-errorBorder, #f14c4c);
  border-radius: 4px;
  background: var(--vscode-inputValidation-errorBackground, rgba(241, 76, 76, 0.1));
  font-size: var(--kilo-font-size-12);
}

.startup-error-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  cursor: pointer;
  user-select: none;
  min-width: 0;
}

.startup-error-title {
  flex: 1;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.startup-error-firstline {
  font-weight: 400;
}

.startup-error-chevron {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: transform 150ms;
}

.startup-error-chevron-expanded {
  transform: rotate(90deg);
}

.startup-error-retry {
  background: none;
  border: none;
  color: var(--vscode-textLink-foreground);
  cursor: pointer;
  font-size: var(--kilo-font-size-11);
  padding: 0;
  flex-shrink: 0;
}

.startup-error-retry:hover {
  text-decoration: underline;
}

.startup-error-details {
  margin: 0;
  padding: 8px 10px;
  border-top: 1px solid var(--vscode-inputValidation-errorBorder, #f14c4c);
  background: var(--vscode-editor-background);
  font-family: var(--vscode-editor-font-family, monospace);
  font-size: var(--kilo-font-size-11);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 200px;
  overflow-y: auto;
}

/* ============================================
   Revert Banner
   ============================================ */

.revert-banner {
  margin: 8px 12px;
  padding: 8px 12px;
  border-radius: 4px;
  background: var(--surface-secondary, var(--vscode-editorWidget-background, #252526));
  border: 1px solid var(--border-base, var(--vscode-editorWidget-border, #454545));
  font-size: var(--kilo-font-size-12);
}

.revert-banner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.revert-banner-info {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted, var(--vscode-descriptionForeground));
}

.revert-banner-count {
  font-weight: 500;
}

.revert-banner-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.revert-banner-files {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.revert-banner-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 1px 0;
  color: var(--text-base, var(--vscode-foreground));
}

.revert-banner-filename {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  direction: rtl;
  text-align: left;
}

.revert-banner-hint {
  margin-top: 6px;
  color: var(--text-muted, var(--vscode-descriptionForeground));
  font-style: italic;
  font-size: var(--kilo-font-size-11);
}

/* ============================================
   Diff Viewer Picker Header (source dropdown)
   ============================================ */

[data-component="diff-picker-header"] {
  margin: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Compact base branch picker mounted next to the source select. Reuses the
   am-selector styles from agent-manager.css for consistency. */
.diff-base-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.diff-base-current {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  font-size: var(--kilo-font-size-12);
  color: var(--vscode-descriptionForeground, var(--vscode-foreground));
}

.diff-base-current-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 160px;
}

.diff-base-arrow {
  font-size: var(--kilo-font-size-12);
  color: var(--vscode-descriptionForeground, var(--vscode-foreground));
  line-height: 1;
}

.diff-base-trigger {
  height: 24px;
  font-size: var(--kilo-font-size-12);
  padding: 0 8px;
}

/* ============================================
   Diff Viewer Notice (e.g. snapshots disabled)
   ============================================ */

.diff-viewer-notice {
  margin: 8px 12px;
  padding: 8px 12px;
  border-radius: 4px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid var(--vscode-inputValidation-warningBorder, #b89500);
  background: var(--vscode-inputValidation-warningBackground, rgba(184, 149, 0, 0.1));
  color: var(--vscode-inputValidation-warningForeground, var(--vscode-foreground));
  font-size: var(--kilo-font-size-12);
  line-height: 1.4;
}

.diff-viewer-notice-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.diff-viewer-notice-text {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

/* ============================================
   Auth Prompt (sign in / sign up error displays)
   ============================================ */

[data-component="auth-prompt"] {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

[data-component="auth-prompt"] [data-slot="auth-prompt-header"] {
  display: flex;
  align-items: center;
  gap: 8px;
}

[data-component="auth-prompt"] [data-slot="auth-prompt-icon"] {
  font-size: var(--kilo-font-size-16);
  line-height: 1;
}

[data-component="auth-prompt"] [data-slot="auth-prompt-title"] {
  font-weight: 600;
  color: var(--text-strong, var(--vscode-foreground));
  font-size: var(--kilo-font-size-13);
}

[data-component="auth-prompt"] [data-slot="auth-prompt-description"] {
  color: var(--text-weak, var(--vscode-descriptionForeground));
  font-size: var(--kilo-font-size-12);
  margin: 0;
  line-height: 1.4;
}
