.chat-view-widget {
  display: flex;
  flex-direction: column;
}

.chat-tree-view-widget {
  flex: 1;
}

.chat-input-widget > .ps__rail-x,
.chat-input-widget > .ps__rail-y {
  display: none !important;
}

.theia-ChatNode {
  cursor: default;
  display: flex;
  flex-direction: column;
  padding: 16px 20px 6px 20px;
  user-select: text;
  -webkit-user-select: text;
  border-bottom: 1px solid var(--theia-sideBarSectionHeader-border);
  overflow-wrap: break-word;
}

div:last-child > .theia-ChatNode {
  border: none;
}

.theia-ChatNodeHeader {
  align-items: center;
  display: flex;
  justify-content: space-between;
  height: 24px;
  gap: 8px;
  width: 100%;
}

.theia-ChatNodeHeader .theia-AgentAvatar {
  pointer-events: none;
  user-select: none;
  font-size: 20px;
}

.theia-ChatNodeHeader .theia-AgentLabel {
  font-size: 13px;
  font-weight: 600;
  margin: 0;
}

.theia-ChatNodeHeader .theia-ChatContentInProgress {
  color: var(--theia-disabledForeground);
}

.theia-ChatNodeHeader .theia-ChatContentInProgress-Cancel {
  position: absolute;
  z-index: 999;
  right: 20px;
}

@keyframes dots {
  0%,
  20% {
    content: "";
  }

  40% {
    content: ".";
  }

  60% {
    content: "..";
  }

  80%,
  100% {
    content: "...";
  }
}

.theia-ChatNodeHeader .theia-ChatContentInProgress::after {
  content: "";
  animation: dots 1s steps(1, end) infinite;
}

.theia-ChatNode .codicon {
  text-align: left;
}

.theia-AgentLabel {
  font-weight: 600;
}

.theia-PromptVariantBadge {
  padding: 0 calc(var(--theia-ui-padding) * 2 / 3);
  font-size: var(--theia-ui-font-size0);
  color: var(--theia-badge-foreground);
  background-color: var(--theia-badge-background);
  border-radius: calc(var(--theia-ui-padding) * 2 / 3);
  white-space: nowrap;
  user-select: none;
}

.theia-PromptVariantBadge.edited {
  color: var(--theia-editorWarning-foreground);
  background-color: var(--theia-inputValidation-warningBackground);
  border: 1px solid var(--theia-editorWarning-foreground);
}

.theia-ChatNode .theia-ChatNodeToolbar {
  margin-left: auto;
  line-height: 18px;
}

.theia-ChatNodeToolbar .theia-ChatNodeToolbarAction {
  display: none;
  align-items: center;
  padding: 4px;
  border-radius: 5px;
}

.theia-ChatNode:hover .theia-ChatNodeToolbar .theia-ChatNodeToolbarAction {
  display: inline-block;
}

.theia-ChatNodeToolbar .theia-ChatNodeToolbarAction:hover {
  cursor: pointer;
  background-color: var(--theia-toolbar-hoverBackground);
}

.theia-ChatNode {
  line-height: 1.3rem;
}

.theia-ChatNode ul,
.theia-ChatNode ol {
  padding-inline-start: 1rem;
}

.theia-ChatNode li > p {
  margin-top: 0;
  margin-bottom: 0;
}

.theia-ChatNode .theia-CodeWrapper {
  padding: 0.5em;
  padding-bottom: 0;
  background-color: var(--theia-editor-background);
  border-radius: 6px;
  border: var(--theia-border-width) solid var(--theia-checkbox-border);
  font-size: var(--theia-code-font-size);
}

.theia-RequestNode > p div {
  display: inline;
}

.theia-RequestNode .theia-RequestNode-AgentLabel,
.theia-RequestNode .theia-RequestNode-VariableLabel,
.theia-RequestNode .theia-RequestNode-FunctionLabel {
  padding: calc(var(--theia-ui-padding) * 2 / 3);
  padding-top: 0px;
  padding-bottom: 0px;
  border-radius: calc(var(--theia-ui-padding) * 2 / 3);
  background: var(--theia-badge-background);
  color: var(--theia-badge-foreground);
}

.theia-RequestNode-Images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.theia-RequestNode-ImagePreview {
  position: relative;
  border: var(--theia-border-width) solid var(--theia-dropdown-border);
  border-radius: 4px;
  overflow: hidden;
  height: 100px;
  width: 120px;
}

.theia-RequestNode-ImagePreview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.theia-RequestNode-Footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}

.theia-RequestNode-Footer .item {
  opacity: var(--theia-mod-disabled-opacity);
  cursor: default;
  display: flex;
  flex-direction: row;
  column-gap: 0px;
  align-items: center;
}

.theia-RequestNode-Footer .item.enabled {
  cursor: pointer;
  opacity: 1;
}

.theia-RequestNode-Footer :not(.item.enabled) .action-label {
  background: transparent;
  cursor: default;
}

.theia-RequestNode .theia-ChatInput-Editor-Box {
  margin-left: 0px;
  margin-right: 0px;
}

.chat-input-widget {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
}

.theia-ChatInput {
  margin-top: 16px;
  position: relative;
  width: 100%;
  box-sizing: border-box;
  gap: 4px;
}

.theia-ChatInput[data-ai-disabled="true"] {
  opacity: var(--theia-mod-disabled-opacity);
  pointer-events: none;
}

.theia-ChatInput[data-ai-disabled="true"] .theia-ChatInput-Editor-Placeholder {
  color: var(--theia-input-disabledForeground);
  font-family: var(--theia-ui-font-family);
}

.theia-ChatInput-ChatContext ul {
  list-style-type: none;
  padding: 0px 4px 8px 8px;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.theia-ChatInput-ChatContext-Element {
  display: flex;
  flex-direction: column;
  border-radius: calc(var(--theia-ui-padding) * 2 / 3);
  border: var(--theia-border-width) solid var(--theia-dropdown-border);
  padding: 2px 4px 2px 6px;
  line-height: 16px;
  min-width: 0;
  user-select: none;
  cursor: pointer;
}

.theia-ChatInput-ChatContext-Element.invalid-file {
  border-color: var(--theia-inputValidation-errorBorder, var(--theia-errorForeground));
  background-color: var(--theia-inputValidation-errorBackground, rgba(255, 0, 0, 0.1));
}

.theia-ChatInput-ChatContext-Element.invalid-file .theia-ChatInput-ChatContext-title {
  text-decoration: line-through;
  color: var(--theia-errorForeground);
}

.invalid-file-icon {
  color: var(--theia-errorForeground);
  margin-right: 4px;
  flex-shrink: 0;
}

.theia-ChatInput-ChatContext-Element.warning-file {
  border-color: var(--theia-inputValidation-warningBorder, var(--theia-editorWarning-foreground));
  background-color: var(--theia-inputValidation-warningBackground, rgba(255, 165, 0, 0.1));
}

.theia-ChatInput-ChatContext-Element.warning-file .theia-ChatInput-ChatContext-title {
  color: var(--theia-editorWarning-foreground);
}

.warning-file-icon {
  color: var(--theia-editorWarning-foreground);
  margin-right: 4px;
  flex-shrink: 0;
}

.theia-ChatInput-ChatContext-Row {
  display: flex;
  align-items: center;
  width: 100%;
  color: var(--theia-foreground);
  font-family: var(--theia-ui-font-family);
}

.theia-ChatInput-ChatContext-labelParts {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.theia-ChatInput-ChatContext-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theia-ChatInput-ChatContext-additionalInfo {
  color: var(--theia-disabledForeground);
  font-size: calc(var(--theia-content-font-size) * 0.8);
  margin-left: 4px;
  line-height: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theia-ChatInput-ChatContext-Element .action {
  cursor: pointer;
  margin-left: 4px;
  border-radius: 4px;
  flex-shrink: 0;
}

.theia-ChatInput-ChatContext-Element .action:hover {
  background-color: var(--theia-toolbar-hoverBackground);
}

.theia-ChatInput-ChatContext-Icon {
  display: inline;
  line-height: 18px;
  flex-shrink: 0;
}

.theia-ChatInput-ChatContext-Icon.codicon {
  margin-right: 6px;
}

.theia-ChatInput-ChangeSet-Box {
  margin: 0 16px -5px 16px;
  padding: 2px;
  padding-bottom: 12px;
  height: auto;
  border: var(--theia-border-width) solid var(--theia-dropdown-border);
  border-radius: 4px 4px 0 0;
  background-color: var(--theia-activityBar-background);
  display: flex;
  flex-direction: column;
}

.theia-ChatInput-ChangeSet-Header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 4px;
}

.theia-ChatInput-ChangeSet-Header-Title {
  display: flex;
  align-items: center;
  gap: 4px;
}

.theia-ChatInput-ChangeSet-Toggle {
  cursor: pointer;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theia-ChatInput-ChangeSet-Toggle:hover {
  background-color: var(--theia-toolbar-hoverBackground);
}

.theia-ChatInput-ChangeSet-Toggle:focus {
  outline: 1px solid var(--theia-focusBorder);
  outline-offset: -1px;
}

.theia-ChatInput-ChangeSet-Box h3 {
  font-size: 12px;
  color: var(--theia-disabledForeground);
  padding-top: 0;
  margin: 0;
}

.theia-ChatInput-ChangeSet-Header-Actions .theia-button {
  height: 100%;
  box-sizing: border-box;
  font-size: 12px;
  padding: 2px 4px;
  min-width: 40px;
  margin: 0;
}

.theia-ChatInput-ChangeSet-List {
  overflow: hidden;
  transition: max-height 0.1s ease-in-out, opacity 0.1s ease-in-out;
}

.theia-ChatInput-ChangeSet-List.expanded {
  max-height: 150px;
  opacity: 1;
  overflow-y: auto;
}

.theia-ChatInput-ChangeSet-List.collapsed {
  max-height: 0;
  opacity: 0;
}

.theia-ChatInput-ChangeSet-List ul {
  list-style-type: none;
  padding: 0;
  margin: 4px;
}

.theia-ChatInput-ChangeSet-List ul li {
  display: flex;
  flex-direction: row;
  line-height: 18px;
  padding: 0;
  padding-top: 2px;
  margin: 0 2px 2px 0px;
  border-radius: 4px;
  position: relative;
}

.theia-ChatInput-ChangeSet-List ul li:hover {
  background-color: var(--theia-toolbar-hoverBackground);
}

.theia-ChatInput-ChangeSet-Actions {
  display: none;
}

.theia-ChatInput-ChangeSet-List ul li {
  cursor: pointer;
}

.theia-ChatInput-ChangeSet-List ul li:hover .theia-ChatInput-ChangeSet-Actions {
  display: flex;
  justify-content: flex-end;
  flex: auto;
  gap: 4px;
}

.theia-ChatInput-ChangeSet-List .theia-ChatInput-ChangeSet-Icon {
  position: relative;
  padding-left: 2px;
  padding-right: 4px;
  min-width: var(--theia-icon-size);
  display: flex;
  justify-content: center;
  align-items: center;
}

.theia-ChatInput-ChangeSet-List .theia-ChatInput-ChangeSet-Icon::before {
  text-align: center;
}

.theia-ChatInput-ChangeSet-List
  .theia-ChatInput-ChangeSet-Icon.codicon::before {
  font-size: var(--theia-ui-font-size1);
}

.theia-ChatInput-ChangeSet-Actions .action {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.theia-ChatInput-ChangeSet-additionalInfo {
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  color: var(--theia-disabledForeground);
}

.theia-ChatInput-ChangeSet-List
  .theia-ChatInput-ChangeSet-AdditionalInfo-SuffixIcon {
  font-size: var(--theia-ui-font-size0) px;
  margin-left: 4px;
}

.theia-ChatInput-ChangeSet-labelParts {
  display: flex;
  overflow: hidden;
  text-overflow: ellipsis;
}

.theia-ChatInput-ChangeSet-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.theia-ChatInput-ChangeSet-Header-Actions {
  display: flex;
  flex: none;
  flex-flow: row nowrap;
  gap: var(--theia-ui-padding);
}

.theia-changeSet-Action {
  flex: none;
}

.theia-ChatInput-ChangeSet-Header-Actions,
.theia-ChatInput-ChangeSet-Box h3,
.theia-ChatInput-ChangeSet-additionalInfo {
  display: flex;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.theia-ChatInput-ChangeSet-Header-Actions .codicon.action {
  font-size: 18px;
  height: 20px;
  vertical-align: middle;
  margin-left: 4px;
  border-radius: 4px;
  cursor: pointer;
}

.theia-ChatInput-ChangeSet-Header-Actions .codicon.action:hover {
  background-color: var(--theia-toolbar-hoverBackground);
}

.theia-ChatInput-ChangeSet-title.rejected {
  text-decoration: line-through;
}

.theia-ChatInput-ChangeSet-title.add.pending {
  color: var(--theia-charts-green);
}

.theia-ChatInput-ChangeSet-title.modify.pending {
  color: var(--theia-charts-orange);
}

.theia-ChatInput-ChangeSet-title.delete.pending {
  color: var(--theia-charts-red);
}

.theia-ChatInput-Editor-Box {
  margin: 0 16px 16px 16px;
  padding: 2px;
  height: auto;
  border: var(--theia-border-width) solid var(--theia-dropdown-border);
  border-radius: 4px;
  background-color: var(--theia-editor-background);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}

.theia-ChatInput-Editor-Box:has(.monaco-editor.focused) {
  border-color: var(--theia-focusBorder);
}

.theia-ChatInput-Editor-Box .monaco-editor {
  outline-color: var(--theia-editor-background);
}

.theia-ChatInput-Editor {
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: column-reverse;
  overflow: hidden;
  transition: height 0.05s ease-in-out;
  position: relative;
}

.theia-ChatInput-Editor-Placeholder {
  position: absolute;
  top: var(--theia-ui-padding);
  left: 8px;
  right: 0;
  display: flex;
  align-items: center;
  color: var(--theia-descriptionForeground);
  pointer-events: none;
  z-index: 10;
  text-align: left;
  font-family: var(--theia-ui-font-family);
  line-height: var(--theia-content-line-height);
}

.theia-ChatInput-Editor-Placeholder.hidden {
  display: none;
}

.theia-ChatInput-Editor .monaco-editor {
  display: flex;
  width: 100%;
  height: 100%;
  position: relative;
}

.theia-ChatInput-Editor .monaco-editor .margin,
.theia-ChatInput-Editor .monaco-editor .monaco-editor-background,
.theia-ChatInput-Editor .monaco-editor .inputarea.ime-input {
  padding-left: 8px !important;
}

.theia-ChatInput-ImagePreview-Item {
  position: relative;
  border: var(--theia-border-width) solid var(--theia-dropdown-border);
  border-radius: 4px;
  overflow: hidden;
  height: 100px;
  width: 120px;
}

.theia-ChatInput-ChatContext-ImageRow {
  margin-top: 4px;
  width: 100%;
  display: flex;
  justify-content: center;
}

.theia-ChatInput-ImageContext-Element {
  min-width: 150px;
}

.theia-ChatInput-ImagePreview-Item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.theia-ChatInputOptions {
  width: 100%;
  height: 25px;
  padding-left: 3px;
  padding-right: 6px;
  display: flex;
  justify-content: space-between;
  color: var(--theia-foreground);
}

.theia-ChatInputOptions .theia-ChatInputOptions-left,
.theia-ChatInputOptions .theia-ChatInputOptions-right {
  display: flex;
}

.theia-ChatInputOptions .theia-ChatInputOptions-left {
  order: -1;
}

.theia-ChatInputOptions .theia-ChatInputOptions-right {
  margin-right: 8px;
}

.theia-ChatInputOptions .option {
  min-width: 21px;
  height: 21px;
  padding: 2px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2px;
  box-sizing: border-box;
  user-select: none;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 5px;
  border: var(--theia-border-width) solid transparent;
  cursor: pointer;
}

.theia-ChatInputOptions .option.disabled {
  cursor: default;
  opacity: var(--theia-mod-disabled-opacity);
  pointer-events: none;
}

.theia-ChatInputOptions .option:hover {
  opacity: 1;
  background-color: var(--theia-toolbar-hoverBackground);
}

.theia-ChatInputOptions .reverse {
  flex-direction: row-reverse;
}

.theia-ChatInput-ModeSelector {
  margin-left: 4px;
  min-width: 21px;
  height: 21px;
  padding: 2px;
  border: none;
  background: var(--theia-editor-background);
  color: var(--theia-foreground);
  font-size: 13px;
  border-radius: 5px;
  outline: none;
  cursor: pointer;
  max-width: 150px;
}

.theia-ChatInput-ModeSelector:hover:not(:disabled) {
  background-color: var(--theia-toolbar-hoverBackground);
}

.theia-ChatInput-ModeSelector:disabled {
  opacity: var(--theia-mod-disabled-opacity);
  cursor: default;
}

.theia-ChatInput-ModeSelector:focus {
  outline: 1px solid var(--theia-focusBorder);
  outline-offset: -1px;
}

.theia-ChatInput-ModeSelector option {
  background: var(--theia-dropdown-background);
  color: var(--theia-dropdown-foreground);
}

.theia-CodePartRenderer-root {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-radius: 4px;
}

.theia-CodePartRenderer-root .monaco-editor {
  outline-color: var(--theia-editor-background);
}

.theia-CodePartRenderer-left {
  flex-grow: 1;
}

.theia-CodePartRenderer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-left: 2px;
  padding-right: 2px;
}

.theia-CodePartRenderer-right .button {
  margin-left: 2px;
  width: 18px;
  height: 18px;
  padding: 2px;
  border-radius: 5px;
  cursor: pointer;
}

.theia-CodePartRenderer-right .button:hover {
  background-color: var(--theia-toolbar-hoverBackground);
}

.theia-QuestionPartRenderer-root {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: var(--theia-border-width) solid
    var(--theia-sideBarSectionHeader-border);
  padding: 8px 12px 12px;
  border-radius: 5px;
  margin: 0 0 8px 0;
}

.theia-QuestionPartRenderer-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.theia-QuestionPartRenderer-option {
  min-width: 100px;
  flex: 1 1 auto;
  margin: 0;
}

.theia-QuestionPartRenderer-option.selected:disabled:hover {
  background-color: var(--theia-button-disabledBackground);
}

.theia-QuestionPartRenderer-option:disabled:not(.selected) {
  background-color: var(--theia-button-secondaryBackground);
}

.theia-toolCall,
.theia-thinking {
  font-weight: normal;
  color: var(--theia-descriptionForeground);
  line-height: 20px;
  margin-top: 13px;
  margin-bottom: 13px;
  cursor: pointer;
}

/* Tool confirmation styles */
.theia-tool-confirmation {
  margin: 10px 0;
  padding: 12px;
  border: 1px solid var(--theia-dropdown-border);
  border-radius: 4px;
  background-color: var(--theia-editorWidget-background);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.14);
}

.theia-tool-confirmation-header {
  font-weight: bold;
  margin-bottom: 8px;
  color: var(--theia-foreground);
  display: flex;
  align-items: center;
  gap: 6px;
}

.theia-tool-confirmation-info {
  margin-bottom: 12px;
}

.theia-tool-confirmation-name,
.theia-tool-confirmation-args {
  margin-bottom: 4px;
}

.theia-tool-confirmation-name .label,
.theia-tool-confirmation-args .label {
  font-weight: bold;
  margin-right: 6px;
}

.theia-tool-confirmation-args pre.value {
  margin: 6px 0;
  padding: 8px;
  background-color: var(--theia-editor-background);
  border-radius: 3px;
  max-height: 150px;
  overflow: auto;
}

.theia-tool-confirmation-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0;
}

.theia-tool-confirmation-split-button {
  display: inline-flex;
  position: relative;
}

.theia-tool-confirmation-main-btn {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  margin-right: 0 !important;
}

.theia-tool-confirmation-chevron-btn {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  width: 24px !important;
  min-width: 24px !important;
  max-width: 24px !important;
  padding: 0 !important;
  margin-left: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Split buttons have no margin between them, so the default outline-offset: 1px
   causes focus outlines to overlap with the adjacent button. Use inset outline instead. */
.theia-tool-confirmation-main-btn:focus,
.theia-tool-confirmation-chevron-btn:focus {
  outline-offset: -2px;
}

.theia-tool-confirmation-deny-reason {
  display: flex;
  flex-direction: column;
  gap: var(--theia-ui-padding);
}

.theia-tool-confirmation-deny-reason-input {
  width: 100%;
  box-sizing: border-box;
}

.theia-tool-confirmation-deny-reason-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--theia-ui-padding);
}

.theia-tool-confirmation-status {
  margin: 10px 0;
  padding: 12px;
  border: 1px solid var(--theia-dropdown-border);
  border-radius: 4px;
  background-color: var(--theia-editorWidget-background);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.14);
}

.theia-tool-confirmation-header {
  font-weight: bold;
  margin-bottom: 8px;
  color: var(--theia-foreground);
  display: flex;
  align-items: center;
  gap: 6px;
}

.theia-tool-confirmation-info {
  margin-bottom: 12px;
}

.theia-tool-confirmation-name,
.theia-tool-confirmation-args {
  margin-bottom: 4px;
}

.theia-tool-confirmation-name .label,
.theia-tool-confirmation-args .label {
  font-weight: bold;
  margin-right: 6px;
}

.theia-tool-confirmation-args pre.value {
  margin: 6px 0;
  padding: 8px;
  background-color: var(--theia-editor-background);
  border-radius: 3px;
  max-height: 150px;
  overflow: auto;
}

.theia-tool-confirmation-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.theia-tool-confirmation-status {
  padding: 8px;
  margin: 10px 0;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.theia-tool-confirmation-status.approved {
  background-color: var(--theia-successBackground);
  color: var(--theia-successForeground);
}

.theia-tool-confirmation-status.denied {
  background-color: var(--theia-errorBackground);
  color: var(--theia-errorForeground);
}

.theia-toolCall-denied,
.theia-toolCall-rejected,
.theia-toolCall-unavailable,
.theia-toolCall-finished summary,
.theia-toolCall-allowed,
.theia-toolCall-waiting {
  font-weight: bold;
}

.theia-toolCall-allowed .codicon-loading {
  font-size: 1em;
}

.theia-toolCall-pending {
  color: var(--theia-descriptionForeground);
}

.theia-toolCall-denied,
.theia-toolCall-rejected {
  color: var(--theia-errorForeground);
  cursor: default;
}

.theia-toolCall-unavailable {
  color: var(--theia-editorWarning-foreground);
  cursor: default;
}

.theia-toolCall-response-result {
  font-weight: normal;
}

.theia-toolCall .fa,
.theia-toolCall details summary::marker,
.theia-thinking .fa,
.theia-thinking details summary::marker {
  color: var(--theia-button-background);
}

.theia-toolCall details pre,
.theia-thinking details pre {
  cursor: text;
  line-height: 1rem;
  margin-top: 0;
  margin-bottom: 0;
  padding: 6px;
  background-color: var(--theia-editor-background);
  overflow: auto;
  text-wrap: auto;
}

.collapsible-arguments {
  display: inline-block;
}

.collapsible-arguments .collapsible-arguments-summary {
  display: inline-block;
  white-space: nowrap;
  text-decoration: underline;
}

details[open].collapsible-arguments,
details[open].collapsible-arguments .collapsible-arguments-summary {
  display: unset;
}

.theia-ResponseNode-ProgressMessage {
  font-weight: normal;
  color: var(--theia-descriptionForeground);
  line-height: 20px;
  margin-bottom: 6px;
}

.theia-ResponseNode-ProgressMessage .inProgress {
  color: var(--theia-progressBar-background);
}

.theia-ResponseNode-ProgressMessage .completed {
  color: var(--theia-successBackground);
}

.theia-ResponseNode-ProgressMessage .failed {
  color: var(--theia-errorForeground);
}

.spinner {
  display: inline-block;
  animation: spin 2s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.theia-ChatPart-Error {
  display: flex;
  flex-direction: row;
  gap: 0.5em;
  color: var(--theia-errorForeground);
}

.section-header {
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 10px;
}

.section-title {
  font-weight: bold;
  font-size: 14px;
  margin: 20px 0px;
}

.section-content p {
  margin: 10px 0;
}

.section-content a {
  cursor: pointer;
}

.section-content strong {
  font-weight: bold;
}

.session-settings-container {
  margin-bottom: 10px;
  height: calc(100% - 50px);
}

.monaco-session-settings-dialog {
  flex: 1;
  min-height: 350px;
  min-width: 500px;
  height: 25vh;
  width: 30vh;
  border: 1px solid var(--theia-editorWidget-border);
  margin-bottom: 10px;
}

.session-settings-error {
  color: var(--theia-errorForeground);
  min-height: 1em;
  display: block;
}

.session-settings-container .monaco-editor {
  outline-color: var(--theia-editor-background);
}

.chat-agent-suggestions {
  padding-inline: 16px;
  padding-block-end: 8px;
  user-select: none;
}

/* Delegation response styles */
.theia-delegation-container {
  border: var(--theia-border-width) solid
    var(--theia-sideBarSectionHeader-border);
  border-radius: var(--theia-ui-padding);
  margin: var(--theia-ui-padding) 0;
  background-color: var(--theia-sideBar-background);
}

.delegation-response-details {
  width: 100%;
}

.delegation-summary {
  cursor: pointer;
  padding: var(--theia-ui-padding);
  background-color: var(--theia-editorGroupHeader-tabsBackground);
  border-radius: var(--theia-ui-padding) var(--theia-ui-padding) 0 0;
  border-bottom: var(--theia-border-width) solid
    var(--theia-sideBarSectionHeader-border);
  list-style: none;
  position: relative;
}

.delegation-summary:focus {
  outline-offset: 0;
}

.delegation-summary:hover {
  background-color: var(--theia-toolbar-hoverBackground);
}

.delegation-summary::before {
  content: "\25BC";
  /* Down arrow */
  position: absolute;
  right: var(--theia-ui-padding);
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.2s ease;
  color: var(--theia-descriptionForeground);
  font-size: var(--theia-ui-font-size1);
}

.delegation-response-details:not([open]) .delegation-summary::before {
  transform: translateY(-50%) rotate(-90deg);
  /* Right arrow when closed */
}

.delegation-response-details:not([open]) .delegation-summary {
  border-bottom: none;
  border-radius: var(--theia-ui-padding);
}

.delegation-summary::-webkit-details-marker {
  display: none;
}

.delegation-summary::marker {
  content: "";
}

.delegation-header {
  display: flex;
  align-items: center;
  width: 100%;
  gap: var(--theia-ui-padding);
}

.delegation-agent {
  flex: 1;
  /* Takes up available space */
  font-size: var(--theia-ui-font-size1);
  color: var(--theia-foreground);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--theia-ui-padding);
}

.delegation-status {
  display: flex;
  align-items: center;
  gap: var(--theia-ui-padding);
  font-size: var(--theia-ui-font-size1);
  /* Leave space for the arrow */
  margin-right: calc(var(--theia-ui-padding) * 3);
}

.delegation-status-icon {
  font-size: var(--theia-icon-size);
}

.delegation-status-icon.codicon-loading {
  animation: spin 2s linear infinite;
  color: var(--theia-progressBar-background);
}

.delegation-status-icon.codicon-check {
  color: var(--theia-charts-green);
}

.delegation-status-icon.codicon-error {
  color: var(--theia-errorForeground);
}

.delegation-status-icon.codicon-close {
  color: var(--theia-descriptionForeground);
}

.delegation-status-text {
  color: var(--theia-descriptionForeground);
  font-weight: normal;
}

.delegation-content {
  padding: var(--theia-ui-padding);
}

.delegation-prompt-section {
  margin-bottom: var(--theia-ui-padding);
  padding-bottom: var(--theia-ui-padding);
  border-bottom: var(--theia-border-width) solid
    var(--theia-sideBarSectionHeader-border);
}

.delegation-prompt {
  margin-top: var(--theia-ui-padding);
  padding: var(--theia-ui-padding);
  background-color: var(--theia-editor-background);
  border-radius: var(--theia-ui-padding);
  border: var(--theia-border-width) solid var(--theia-dropdown-border);
  font-style: italic;
  color: var(--theia-descriptionForeground);
}

.delegation-response-section {
  margin-top: var(--theia-ui-padding);
}

.delegation-response-section > strong {
  display: block;
  margin-bottom: var(--theia-ui-padding);
  color: var(--theia-foreground);
}

.delegation-response-placeholder {
  margin-top: var(--theia-ui-padding);
  min-height: calc(var(--theia-ui-padding) * 6);
}

/* ChatTree scroll-to-bottom floating button */
.theia-ChatTree-ScrollToBottom {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 10;
  width: 32px;
  height: 32px;
  border-radius: 16px;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  background: var(--theia-layoutColor3, #ececec);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  opacity: 0.7;
  color: var(--theia-button-background, #007acc);
  transition: opacity 0.18s, background 0.2s, color 0.2s;
}

.theia-ChatTree-ScrollToBottom:hover {
  opacity: 1;
  background: var(--theia-button-background, #007acc);
  color: var(--theia-button-foreground, #fff);
}

/* Unknown content styles */
.theia-chat-unknown-content {
  margin: 4px 0;
}

.theia-chat-unknown-content-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: var(--theia-ui-padding);
  background-color: var(--theia-warningBackground);
  border: 1px solid var(--theia-warningBorder);
  border-radius: 3px;
  color: var(--theia-warningForeground);
  font-size: 0.9em;
  margin-bottom: 8px;
}

.theia-chat-unknown-content-warning i {
  flex-shrink: 0;
}

.theia-chat-unknown-content-fallback {
  color: var(--theia-foreground);
  font-family: var(--theia-code-font-family);
  white-space: pre-wrap;
}
