/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

.interactive-session {
	display: flex;
	flex-direction: column;
	max-width: 950px;
	height: 100%;
	margin: auto;
	position: relative; /* Enable absolute positioning for child elements */

	/* 11px when base font is 13px */
	--vscode-chat-font-size-body-xs: 0.846em;
	/* 12px when base font is 13px */
	--vscode-chat-font-size-body-s: 0.923em;
	/* 13px when base font is 13px */
	--vscode-chat-font-size-body-m: 1em;
	/* 14px when base font is 13px */
	--vscode-chat-font-size-body-l: 1.077em;
	/* 16px when base font is 13px */
	--vscode-chat-font-size-body-xl: 1.231em;
	/* 20px when base font is 13px */
	--vscode-chat-font-size-body-xxl: 1.538em;
}

.interactive-list > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row > .monaco-tl-row > .monaco-tl-twistie {
	/* Hide twisties from chat tree rows, but not from nested trees within a chat response */
	display: none !important;
}

.interactive-list > .chat-scroll-down {
	padding: 4px;
}

.interactive-item-container {
	padding: 12px 16px;
	display: flex;
	flex-direction: column;
	color: var(--vscode-interactive-session-foreground);

	cursor: default;
	user-select: text;
	-webkit-user-select: text;
}

.interactive-item-container:not(:has(.chat-extensions-content-part)) .header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	position: relative;
	margin-bottom: 8px;
}

.interactive-item-container .header.hidden,
.interactive-item-container .header .avatar-container.hidden,
.interactive-item-container .header .username.hidden {
	display: none;
}

.interactive-item-container .header .user {
	display: flex;
	align-items: center;
	gap: 8px;

	/*
	Rendering the avatar icon as round makes it a little larger than the .user container.
	Add padding so that the focus outline doesn't run into it, and counteract it with a negative margin so it doesn't actually take up any extra space */
	padding: 2px;
	margin: -2px;
}

.interactive-item-container .header .username {
	margin: 0;
	font-size: 13px;
	font-weight: 600;
}

.interactive-item-container .detail-container {
	font-family: var(--vscode-chat-font-family, inherit);
	font-size: var(--vscode-chat-font-size-body-s);
	color: var(--vscode-descriptionForeground);
	overflow: hidden;
}

.interactive-item-container .detail-container .detail .agentOrSlashCommandDetected A {
	cursor: pointer;
	color: var(--vscode-textLink-foreground);
}

.interactive-item-container .chat-animated-ellipsis {
	display: inline-block;
	width: 2em;
}

.interactive-item-container:not(.show-detail-progress) .chat-animated-ellipsis {
	display: none;
}

@keyframes ellipsis {
	0% {
		content: "";
	}

	25% {
		content: ".";
	}

	50% {
		content: "..";
	}

	75% {
		content: "...";
	}

	100% {
		content: "";
	}
}

@keyframes chat-thinking-shimmer {
	0% {
		background-position: 120% 0;
	}

	100% {
		background-position: -120% 0;
	}
}

.interactive-item-container .chat-animated-ellipsis::after {
	content: '';
	white-space: nowrap;
	overflow: hidden;
	width: 3em;
	animation: ellipsis steps(4, end) 1s infinite;
}

.interactive-item-container .header .avatar-container {
	display: flex;
	pointer-events: none;
	user-select: none;
}

.interactive-item-container .header .avatar {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	outline: 1px solid var(--vscode-chat-requestBorder);
}

.interactive-item-container .header .avatar.codicon-avatar {
	background: var(--vscode-chat-avatarBackground);
}

.interactive-item-container .header .avatar + .avatar {
	margin-left: -8px;
}

.interactive-item-container .header .avatar .icon {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background-color: var(--vscode-chat-list-background);
}

.interactive-item-container .header .avatar .codicon {
	color: var(--vscode-chat-avatarForeground) !important;
	font-size: 14px;
}

.monaco-list-row:not(.focused) .interactive-item-container:not(:hover) .header .monaco-toolbar,
.monaco-list:not(:focus-within) .monaco-list-row .interactive-item-container:not(:hover) .header .monaco-toolbar,
.monaco-list-row:not(.focused) .interactive-item-container:not(:hover) .header .monaco-toolbar .action-label,
.monaco-list:not(:focus-within) .monaco-list-row .interactive-item-container:not(:hover) .header .monaco-toolbar .action-label {
	/* Also apply this rule to the .action-label directly to work around a strange issue- when the
	toolbar is hidden without that second rule, tabbing from the list container into a list item doesn't work
	and the tab key doesn't do anything. */
	display: none;
}

.interactive-item-container .header .monaco-toolbar .monaco-action-bar .actions-container {
	gap: 4px;
}

.interactive-item-container .header .monaco-toolbar .action-label {
	border: 1px solid transparent;
	padding: 2px;
}

.interactive-item-container.interactive-response .header .monaco-toolbar {
	position: absolute;
	left: 0px;
	background-color: var(--vscode-chat-list-background);
}

.interactive-item-container.interactive-request .header .monaco-toolbar {
	/* Take the partially-transparent background color override for request rows */
	background-color: inherit;
}

.interactive-item-container .chat-footer-toolbar {
	display: none;
}

.interactive-item-container .chat-footer-toolbar.hidden {
	display: none !important;
}

.interactive-item-container .chat-footer-toolbar .monaco-action-bar .actions-container {
	gap: 4px;
}

.interactive-item-container .chat-footer-toolbar .checked.action-label,
.interactive-item-container .chat-footer-toolbar .checked.action-label:hover {
	color: var(--vscode-inputOption-activeForeground) !important;
	border-color: var(--vscode-inputOption-activeBorder);
	background-color: var(--vscode-inputOption-activeBackground);
}

.interactive-item-container.interactive-response.chat-most-recent-response {
	min-height: var(--chat-current-response-min-height);
}

.interactive-item-container.interactive-response:not(.chat-response-loading) .chat-footer-toolbar,
.interactive-item-container.interactive-response:not(.chat-response-loading) .chat-footer-toolbar .chat-footer-details {
	/* Complete response only */
	display: block;
	opacity: 0;
	visibility: hidden;
	padding-top: 6px;
	height: 22px;
	transition: opacity 0.1s ease-in-out, visibility 0s linear 0.1s;
}

/* Show toolbar on hover and last response. Also show when the item has keyboard focus (focus-within) or when the surrounding list row is marked focused (monaco list keyboard navigation). */
.interactive-item-container.interactive-response:not(.chat-response-loading):hover .chat-footer-toolbar,
.interactive-item-container.interactive-response.chat-most-recent-response:not(.chat-response-loading) .chat-footer-toolbar,
.interactive-item-container.interactive-response:not(.chat-response-loading):hover .chat-footer-toolbar .chat-footer-details,
.interactive-item-container.interactive-response:not(.chat-response-loading):focus-within .chat-footer-toolbar,
.interactive-item-container.interactive-response:not(.chat-response-loading):focus-within .chat-footer-toolbar .chat-footer-details,
.monaco-list-row.focused .interactive-item-container.interactive-response:not(.chat-response-loading) .chat-footer-toolbar,
.monaco-list-row.focused .interactive-item-container.interactive-response:not(.chat-response-loading) .chat-footer-toolbar .chat-footer-details,
.interactive-item-container.interactive-response:not(.chat-response-loading).group-hovered .chat-footer-toolbar,
.interactive-item-container.interactive-response:not(.chat-response-loading).group-hovered .chat-footer-toolbar .chat-footer-details {
	opacity: 1;
	visibility: visible;
	transition: opacity 0.1s ease-in-out, visibility 0s linear 0s;
}

/* Style the internal toolbar element to use flexbox */
.interactive-item-container .chat-footer-toolbar .monaco-toolbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.interactive-item-container .chat-footer-details {
	display: none;
	padding: 0;
	font-size: var(--vscode-chat-font-size-body-xs);
	opacity: 0.7;
	color: var(--vscode-descriptionForeground);
	line-height: 16px;
	margin-left: auto;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.interactive-item-container .chat-footer-details.hidden {
	display: none !important;
}

.interactive-item-container .value {
	width: 100%;
}

.interactive-item-container > .value .chat-used-context {
	margin-bottom: 16px;
}

.interactive-item-container > .value .chat-used-context .chat-used-context-list {
	margin-bottom: 0;
}

.interactive-item-container .value .rendered-markdown:not(:has(.chat-extensions-content-part)) {
	.codicon {
		font-size: inherit;
	}

	.interactive-result-code-block .codicon {
		font-size: initial;
	}
}

.interactive-item-container .value .rendered-markdown blockquote {
	margin: 0px;
	padding: 0px 16px 0 10px;
	border-left-width: 5px;
	border-left-style: solid;
	border-radius: 2px;
	background: var(--vscode-textBlockQuote-background);
	border-color: var(--vscode-textBlockQuote-border);
}

.interactive-item-container .value .rendered-markdown strong {
	font-weight: 600;
}

.interactive-item-container .value .rendered-markdown .rendered-markdown-table-scroll-wrapper {
	width: 100%;
	margin-bottom: 16px;
}

.interactive-item-container .value .rendered-markdown table {
	text-align: left;
	border-radius: var(--vscode-cornerRadius-medium);
	overflow: hidden;
	border-collapse: separate;
	border-spacing: 0;
	border: 1px solid var(--vscode-chat-requestBorder);
}

.interactive-item-container .value .rendered-markdown table td,
.interactive-item-container .value .rendered-markdown table th {
	border: 1px solid var(--vscode-chat-requestBorder);
	border-top: none;
	border-left: none;
	padding: 4px 6px;
}

.interactive-item-container .value .rendered-markdown table th {
	white-space: normal;
	overflow-wrap: break-word;
}

.interactive-item-container .value .rendered-markdown table td:last-child,
.interactive-item-container .value .rendered-markdown table th:last-child {
	border-right: none;
}

.interactive-item-container .value .rendered-markdown table tbody tr:last-child td {
	border-bottom: none;
}

.interactive-item-container .value .rendered-markdown a,
.interactive-item-container .value .interactive-session-followups,
.interactive-item-container .value .rendered-markdown a code {
	color: var(--vscode-textLink-foreground);
}

.interactive-item-container .value .rendered-markdown .chat-extensions-content-part a {
	color: inherit;
}

.interactive-item-container .value .rendered-markdown a {
	user-select: text;
}

.interactive-item-container .value .rendered-markdown a:hover,
.interactive-item-container .value .rendered-markdown a:active {
	color: var(--vscode-textLink-activeForeground);
}

.hc-black .interactive-item-container .value .rendered-markdown a code,
.hc-light .interactive-item-container .value .rendered-markdown a code {
	color: var(--vscode-textPreformat-foreground);
}

.interactive-list {
	overflow: hidden;
	position: relative;
	/* For the scroll down button */
}

.hc-black .interactive-request,
.hc-light .interactive-request {
	border-left: 3px solid var(--vscode-chat-requestBorder);
	border-right: 3px solid var(--vscode-chat-requestBorder);
}

.interactive-item-container .value {
	white-space: normal;
	overflow-wrap: anywhere;
}

.interactive-item-container .value > :last-child,
.interactive-item-container .value > :last-child.rendered-markdown > :last-child,
.interactive-item-container.interactive-request .value .rendered-markdown > :last-child {
	margin-bottom: 0px;
}

.interactive-item-container .value .rendered-markdown hr {
	border-color: rgba(0, 0, 0, 0.18);
}

.vs-dark .interactive-item-container .value .rendered-markdown hr {
	border-color: rgba(255, 255, 255, 0.18);
}

.interactive-item-container .value .rendered-markdown h1 {
	font-size: var(--vscode-chat-font-size-body-xxl);
	font-weight: 600;
	margin: 1.5em 0 0.875em 0;
	font-family: var(--vscode-chat-font-family, inherit);

}

.interactive-item-container .value .rendered-markdown h2 {
	font-size: var(--vscode-chat-font-size-body-xl);
	font-weight: 600;
	margin: 1.5em 0 0.875em 0;
	font-family: var(--vscode-chat-font-family, inherit);
}

.interactive-item-container .value .rendered-markdown h3 {
	font-size: var(--vscode-chat-font-size-body-l);
	font-weight: 600;
	margin: 1.5em 0 0.875em 0;
	font-family: var(--vscode-chat-font-family, inherit);
}

.interactive-item-container.editing-session .value .rendered-markdown p:has(+ [data-code] > .chat-codeblock-pill-widget) {
	margin-bottom: 8px;
}

.interactive-item-container.editing-session .value .rendered-markdown h3 {
	font-size: var(--vscode-chat-font-size-body-m);
	margin: 1.5em 0 0.875em 0;
}

/* Codicons next to text need to be aligned with the text */
.interactive-item-container .value .rendered-markdown:not(:has(.chat-extensions-content-part)) .codicon {
	position: relative;
	top: 2px;
}

.interactive-item-container .value .rendered-markdown {
	.chat-codeblock-pill-widget .codicon {
		top: -1px;
	}

	/* But codicons in toolbars assume the natural position of the codicon */
	.monaco-toolbar .codicon {
		position: initial;
		top: initial;
	}

	/* Code blocks at the beginning of an answer should not have a margin as it means it won't align with the agent icon*/
	> div[data-code]:first-child {
		margin-top: 0;

	}

	/* Override the top to avoid the toolbar getting clipped by overflow:hidden */
	> div[data-code]:first-child .interactive-result-code-block .interactive-result-code-block-toolbar > .monaco-action-bar,
	> div[data-code]:first-child .interactive-result-code-block .interactive-result-code-block-toolbar > .monaco-toolbar {
		top: 6px;
	}
}

.interactive-item-container .value.inline-progress {

	.rendered-markdown {
		display: inline-flex;
	}

	/* not ideal but I cannot query the last div with this class... */
	.rendered-markdown:last-of-type > P > SPAN:empty {
		display: inline-block;
		width: 11px;
	}

	.rendered-markdown:last-of-type > P > SPAN:empty::after {
		content: '';
		white-space: nowrap;
		overflow: hidden;
		width: 3em;
		animation: ellipsis steps(4, end) 1s infinite;
	}
}

.interactive-item-container .value .rendered-markdown {
	line-height: 1.5em;
	font-size: var(--vscode-chat-font-size-body-m);
	font-family: var(--vscode-chat-font-family, inherit);
}

.interactive-item-container .value > .rendered-markdown p {
	/* Targetting normal text paras. `p` can also appear in other elements/widgets */
	margin: 0 0 16px 0;
}

.interactive-item-container .value > .chat-tool-invocation-part {
	.rendered-markdown p {
		margin: 0 0 6px 0;
	}

	.disclaimer {
		margin-top: 6px;
		margin-bottom: -6px;

		.rendered-markdown p:last-child {
			margin-bottom: 0;
		}
	}

	.message .see-more {
		display: none;
		position: absolute;
		right: 0;
		top: 20px;

		a {
			color: var(--vscode-textLink-foreground);
			text-decoration: underline;
			cursor: pointer;
		}
	}

	.message.can-see-more {
		position: relative;

		.message-wrapper {
			/* This mask fades out the end of the second line of text so the "see more" message can be displayed over it. */
			mask-image:
				linear-gradient(to right, rgba(0, 0, 0, 1) calc(100% - 95px), rgba(0, 0, 0, 0) calc(100% - 72px)), linear-gradient(to top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 20px, rgba(0, 0, 0, 1) 2px, rgba(0, 0, 0, 1) 100%);
			mask-repeat: no-repeat, no-repeat;
			pointer-events: none;
			max-height: 40px;
		}

		.see-more {
			display: block;
		}
	}

	.progress-container .rendered-markdown [data-code] {
		margin: 0;
	}

	.tool-input-output-part {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
	}

	.tool-input-output-part .rendered-markdown p {
		margin: inherit;
	}

	.tool-input-output-part .expando {
		display: flex;
		align-items: center;
		cursor: pointer;
	}

	.tool-input-output-part .input-output {
		display: none;
		padding: 6px 0;
		flex-basis: 100%;
		width: 100%;
	}

	.tool-input-output-part.expanded .input-output {
		display: inherit;
	}

	.tool-output-part {
		border: 1px solid var(--vscode-widget-border);
		border-radius: var(--vscode-cornerRadius-medium);
		background: var(--vscode-editor-background);
		margin: 4px 0;
		overflow: hidden;

		.output-title {
			padding: 8px 12px;
			background: var(--vscode-editorWidget-background);
			border-bottom: 1px solid var(--vscode-widget-border);
			font-size: var(--vscode-chat-font-size-body-m);
		}

		.webview-output {
			position: relative;
		}

		.progress-container {
			position: absolute;
			top: 0;
			right: 0;
			bottom: 0;
			left: 0;
			margin: auto;
			width: fit-content;
			height: fit-content;
		}

		.output-error {
			margin: 6px 4px;
			color: var(--vscode-errorForeground);

			.output-error-header {
				display: flex;
				align-items: center;
				gap: 7px;
				margin-bottom: 4px;

				.codicon-error {
					color: var(--vscode-errorForeground) !important;
				}
			}

			.output-error-details {
				font-family: var(--monaco-monospace-font);
				font-size: var(--vscode-chat-font-size-body-xs);
			}
		}
	}

	&:not(:last-child) {
		margin-bottom: 16px;
	}
}

.interactive-item-container .value > .rendered-markdown li > p {
	margin: 0;
}

/* #region list indent rules */
.interactive-item-container .value .rendered-markdown ul {
	/* Keep this in sync with the values for dedented codeblocks below */
	padding-inline-start: 24px;
}

.interactive-item-container .value .rendered-markdown ol {
	/* Keep this in sync with the values for dedented codeblocks below */
	padding-inline-start: 28px;
}

.interactive-item-container .value .rendered-markdown li {
	margin: 4px 0;
}

/* NOTE- We want to dedent codeblocks in lists specifically to give them the full width. No more elegant way to do this, these values
have to be updated for changes to the rules above, or to support more deeply nested lists. */
.interactive-item-container .value .rendered-markdown ul .interactive-result-code-block {
	margin-left: -24px;
}

.interactive-item-container .value .rendered-markdown ul ul .interactive-result-code-block {
	margin-left: -48px;
}

.interactive-item-container .value .rendered-markdown ol .interactive-result-code-block {
	margin-left: -28px;
}

.interactive-item-container .value .rendered-markdown ol ol .interactive-result-code-block {
	margin-left: -56px;
}

.interactive-item-container .value .rendered-markdown ol ul .interactive-result-code-block,
.interactive-item-container .value .rendered-markdown ul ol .interactive-result-code-block {
	margin-left: -52px;
}

/* #endregion list indent rules */

.interactive-item-container .value .rendered-markdown img {
	max-width: 100%;
}

.chat-tool-hover,
.interactive-item-container {

	.monaco-tokenized-source,
	code {
		font-family: var(--monaco-monospace-font);
		font-size: var(--vscode-chat-font-size-body-xs);
		color: var(--vscode-textPreformat-foreground);
		background-color: var(--vscode-textPreformat-background);
		padding: 1px 3px;
		border-radius: 4px;
		border: 1px solid var(--vscode-textPreformat-border);
		white-space: pre-wrap;
	}
}

.interactive-item-container.interactive-item-compact {
	padding: 8px 20px;
}

.interactive-item-container.interactive-item-compact .header {
	height: 16px;
}

.interactive-item-container.interactive-item-compact .header .avatar {
	width: 18px;
	height: 18px;
}

.interactive-item-container.interactive-item-compact .header .avatar .icon {
	width: 16px;
	height: 16px;
}

.interactive-item-container.interactive-item-compact .header .codicon-avatar .codicon {
	font-size: 12px;
}

.interactive-item-container.interactive-item-compact .header .avatar + .avatar {
	margin-left: -4px;
}

.interactive-item-container.interactive-item-compact .value {
	min-height: 0;
}

.interactive-item-container.interactive-item-compact .value > .rendered-markdown p {
	margin: 0 0 8px 0;
}

.interactive-item-container.interactive-item-compact .value > .rendered-markdown li > p {
	margin: 0;
}

.interactive-item-container.interactive-item-compact .value .rendered-markdown h1 {
	margin: 8px 0;

}

.interactive-item-container.interactive-item-compact .value .rendered-markdown h2 {
	margin: 8px 0;
}

.interactive-item-container.interactive-item-compact .value .rendered-markdown h3 {
	margin: 8px 0;
}

.interactive-item-container.minimal {
	flex-direction: row;
}

.interactive-item-container.minimal .column.left {
	padding-top: 2px;
	display: inline-block;
	flex-grow: 0;
}

.interactive-item-container.minimal .column.right {
	display: inline-block;
	flex-grow: 1;
}

.interactive-item-container.interactive-request.minimal .rendered-markdown .chat-animated-ellipsis {
	display: inline-flex;
}

.interactive-item-container.minimal .user > .username {
	display: none;
}

.interactive-item-container.minimal .detail-container {
	font-size: unset;
}

.interactive-item-container.minimal > .header {
	position: absolute;
	right: 0;
}

.chat-dnd-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	box-sizing: border-box;

	display: none;
}

.chat-dnd-overlay.visible {
	display: flex;
	align-items: center;
	justify-content: center;
}

.chat-dnd-overlay .attach-context-overlay-text {
	padding: 0.6em;
	margin: 0.2em;
	line-height: 12px;
	height: 12px;
	display: flex;
	align-items: center;
	text-align: center;
}

.chat-dnd-overlay .attach-context-overlay-text .codicon {
	height: 12px;
	font-size: 12px;
	margin-right: 3px;
}

.monaco-workbench .interactive-session .chat-input-container {
	box-sizing: border-box;
	cursor: text;
	background-color: var(--vscode-input-background);
	border: 1px solid var(--vscode-input-border, transparent);
	border-radius: var(--vscode-cornerRadius-large);
	padding: 0 6px 6px 6px;
	/* top padding is inside the editor widget */
	width: 100%;
	position: relative;
	/* Prevent contents from covering border corner */
	overflow: hidden;
}

/* Context usage widget container - positioned in the secondary toolbar below input */
.interactive-session .chat-input-toolbars .chat-context-usage-container,
.interactive-session .chat-secondary-toolbar .chat-context-usage-container {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	margin-left: auto;
	order: 1;
}

/* When context usage is inside the toolbars (compact mode), keep the ordering */
.interactive-session .chat-input-toolbars .chat-context-usage-container {
	order: 1;
}

.interactive-session .chat-input-toolbars > .chat-execute-toolbar {
	order: 2;
}

.interactive-input-part:has(.chat-editing-session > .chat-editing-session-container) .chat-input-container,
.interactive-input-part:has(.chat-todo-list-widget-container > .chat-todo-list-widget.has-todos) .chat-input-container,
.interactive-input-part:has(.chat-input-widgets-container > .chat-status-widget:not([style*="display: none"])) .chat-input-container,
.interactive-input-part:has(.chat-getting-started-tip-container > .chat-tip-widget) .chat-input-container {
	/* Remove top border radius when editing session, todo list, or status widget is present */
	border-top-left-radius: 0;
	border-top-right-radius: 0;
}

.interactive-session .chat-editing-session {
	margin-bottom: -4px;
	/* Counter the flex gap */
	/* reset the 4px gap of the container for editing sessions */
	width: 100%;
	position: relative;
}

.monaco-workbench .interactive-session .chat-editing-session .chat-editing-session-container {
	padding: 4px 3px 4px 3px;
	box-sizing: border-box;
	background-color: var(--vscode-editor-background);
	border: 1px solid var(--vscode-input-border, transparent);
	border-bottom: none;
	border-radius: var(--vscode-cornerRadius-large) var(--vscode-cornerRadius-large) 0 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
	overflow: hidden;
}

.interactive-session .interactive-input-part > .chat-todo-list-widget-container:has(.chat-todo-list-widget.has-todos) + .chat-editing-session .chat-editing-session-container {
	border-top-left-radius: 0;
	border-top-right-radius: 0;
}

.interactive-session .chat-editing-session .monaco-list-row .chat-collapsible-list-action-bar {
	padding-left: 5px;
	display: none;
}

.interactive-session .chat-editing-session .monaco-list-row:hover .chat-collapsible-list-action-bar:not(.has-no-actions),
.interactive-session .chat-editing-session .monaco-list-row.focused .chat-collapsible-list-action-bar:not(.has-no-actions),
.interactive-session .chat-editing-session .monaco-list-row.selected .chat-collapsible-list-action-bar:not(.has-no-actions) {
	display: inherit;
}

.interactive-session .chat-editing-session .chat-editing-session-container.show-file-icons .monaco-scrollable-element .monaco-list-rows .monaco-list-row {
	border-radius: 2px;
}

.interactive-session .chat-editing-session .chat-editing-session-container.show-file-icons .chat-editing-session-list .monaco-scrollable-element:has(.visible.scrollbar.vertical) .monaco-list-row .monaco-icon-label {
	padding-right: 12px;
}

.interactive-session .chat-editing-session .chat-editing-session-container .chat-editing-session-overview {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	gap: 6px;
	padding-right: 3px;
	height: 22px;
	line-height: 22px;
	cursor: pointer;
}

.interactive-session .chat-editing-session .chat-editing-session-container .chat-editing-session-overview > .working-set-title {
	color: var(--vscode-descriptionForeground);
	font-size: 12px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	align-content: center;
}

.interactive-session .chat-editing-session .chat-editing-session-container .chat-editing-session-overview > .working-set-title .working-set-count.file-limit-reached {
	color: var(--vscode-notificationsWarningIcon-foreground);
}

/* Inline added/removed line count styling */
.interactive-session .chat-editing-session .chat-editing-session-container .chat-editing-session-overview .working-set-line-counts {
	display: inline-flex;
	gap: 4px;
	margin-left: 6px;
	font-size: 11px;
	font-weight: 500;
}

.interactive-session .chat-editing-session .chat-editing-session-container .chat-editing-session-overview .working-set-line-counts .working-set-lines-added {
	color: var(--vscode-chat-linesAddedForeground);
}

.interactive-session .chat-editing-session .chat-editing-session-container .chat-editing-session-overview .working-set-line-counts .working-set-lines-removed {
	color: var(--vscode-chat-linesRemovedForeground);
}

.interactive-session .chat-editing-session .chat-editing-session-list .working-set-line-counts {
	margin: 0 6px;
	display: inline-flex;
	gap: 4px;
	font-size: 11px;
}

.interactive-session .chat-editing-session .chat-editing-session-list .working-set-line-counts .working-set-lines-added {
	color: var(--vscode-chat-linesAddedForeground);
}

.interactive-session .chat-editing-session .chat-editing-session-list .working-set-line-counts .working-set-lines-removed {
	color: var(--vscode-chat-linesRemovedForeground);
}

.interactive-session .chat-editing-session .working-set-title {

	.monaco-button {
		padding: 4px 6px 4px 0px;
		border-radius: 2px;
		border: none;
		background-color: unset;
		color: var(--vscode-descriptionForeground);
	}

	.monaco-button:focus-visible {
		outline-offset: -1px !important;
	}
}


.interactive-session .chat-editing-session .chat-editing-session-container .monaco-progress-container {
	position: relative;
}

.interactive-session .chat-editing-session .chat-editing-session-toolbar-actions,
.interactive-session .chat-editing-session .chat-editing-session-actions {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	gap: 6px;
	align-items: center;
}

.interactive-session .chat-editing-session .chat-editing-session-toolbar-actions {
	margin: 3px 0px;
	overflow: hidden;
}

.interactive-session .chat-editing-session .monaco-button {
	width: fit-content;
}

.interactive-session .chat-editing-session .chat-editing-session-toolbar-actions .monaco-button:hover {
	background-color: var(--vscode-button-hoverBackground);
}

.interactive-session .chat-editing-session .chat-editing-session-actions-group {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	gap: 6px;
}

.interactive-session .chat-editing-session .chat-editing-session-toolbar-actions .monaco-button.codicon.codicon-close {
	width: 17px;
	height: 17px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	color: var(--vscode-descriptionForeground);
	background-color: transparent;
	border: none;
	padding: 0;
	border-radius: 5px;
	cursor: pointer;
}

.interactive-session .chat-editing-session .chat-editing-session-toolbar-actions .monaco-button.secondary {
	color: var(--vscode-foreground);
	background-color: transparent;
	border: none;
	height: 22px;
	padding-left: 0px;
	cursor: pointer;
	display: flex;
	justify-content: start;
}

.chat-attachments-container {
	display: flex;
	flex-direction: row;
	gap: 4px;
	margin-top: 6px;
	flex-wrap: wrap;
	cursor: default;
}

.interactive-session .chat-editing-session .chat-editing-session-actions .monaco-button.secondary.monaco-text-button.codicon {
	cursor: pointer;
	padding: 2px;
	border-radius: 4px;
	display: inline-flex;
}

.interactive-session .chat-editing-session .chat-editing-session-actions .monaco-button.secondary.monaco-text-button {
	background-color: var(--vscode-button-secondaryBackground);
	color: var(--vscode-button-secondaryForeground);
}

.interactive-session .chat-editing-session .chat-editing-session-actions .monaco-button.secondary:hover {
	background-color: var(--vscode-button-secondaryHoverBackground);
	color: var(--vscode-button-secondaryForeground);
}

/* The Add Files button is currently implemented as a secondary button but should not have the secondary button background */
.interactive-session .chat-editing-session .chat-editing-session-toolbar-actions .monaco-button.secondary:hover {
	background-color: var(--vscode-toolbar-hoverBackground);
}

.interactive-session .chat-editing-session .chat-editing-session-toolbar-actions .monaco-button:hover {
	background-color: var(--vscode-toolbar-hoverBackground);
}

.interactive-session .chat-editing-session .chat-editing-session-toolbar-actions .monaco-button,
.interactive-session .chat-editing-session .chat-editing-session-actions .monaco-button {
	overflow: hidden;
	text-wrap: nowrap;
}

.interactive-session .chat-editing-session .chat-editing-session-toolbar-actions .monaco-button-dropdown.sidebyside-button {
	align-items: center;
	border-radius: 2px;
}

.interactive-session .chat-editing-session .chat-editing-session-toolbar-actions .monaco-button-dropdown.sidebyside-button .monaco-button,
.interactive-session .chat-editing-session .chat-editing-session-toolbar-actions .monaco-button-dropdown.sidebyside-button .monaco-button:hover {
	border-right: 1px solid transparent;
	background-color: unset;
	padding: 0;
}

.interactive-session .chat-editing-session .chat-editing-session-toolbar-actions .monaco-button-dropdown.sidebyside-button > .separator {
	border-right: 1px solid transparent;
	padding: 0 1px;
	height: 22px;
}

.interactive-session .chat-editing-session .chat-editing-session-toolbar-actions .monaco-button-dropdown.sidebyside-button:hover > .separator {
	border-color: var(--vscode-input-border, transparent);
}

.interactive-session .chat-editing-session .chat-editing-session-toolbar-actions .monaco-button-dropdown.sidebyside-button:hover {
	background-color: var(--vscode-toolbar-hoverBackground);
}

.interactive-session .interactive-input-part > .chat-input-widgets-container {
	margin-bottom: -4px;
	width: 100%;
	position: relative;
}

/* Chat Todo List Widget Container - mirrors chat-editing-session styling */
.interactive-session .interactive-input-part > .chat-todo-list-widget-container {
	margin-bottom: -4px;
	/* reset the 4px gap of the container for editing sessions */
	width: 100%;
	position: relative;
}

.interactive-session .interactive-input-part > .chat-todo-list-widget-container .chat-todo-list-widget {
	padding: 4px 3px 4px 3px;
	box-sizing: border-box;
	border: 1px solid var(--vscode-input-border, transparent);
	background-color: var(--vscode-editor-background);
	border-bottom: none;
	border-radius: var(--vscode-cornerRadius-large) var(--vscode-cornerRadius-large) 0 0;
	flex-direction: column;
	gap: 2px;
	overflow: hidden;
}

.interactive-session .interactive-input-part > .chat-todo-list-widget-container .chat-todo-list-widget .todo-list-expand {
	width: 100%;
}

.interactive-session .interactive-input-part > .chat-todo-list-widget-container .chat-todo-list-widget .todo-list-expand .monaco-button {
	display: flex;
	align-items: center;
	gap: 4px;
	cursor: pointer;
	justify-content: space-between;
	width: 100%;
	background-color: transparent;
	border-color: transparent;
	color: var(--vscode-foreground);
	padding: 0;
	min-width: unset;
}

.interactive-session .interactive-input-part > .chat-todo-list-widget-container .chat-todo-list-widget .todo-list-expand .monaco-button:focus:not(:focus-visible) {
	outline: none;
}

.interactive-session .interactive-input-part > .chat-todo-list-widget-container .chat-todo-list-widget .todo-list-expand .todo-list-title-section {
	padding-left: 3px;
	display: flex;
	align-items: center;
	flex: 1;
	font-size: 12px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 22px;
}

.interactive-session .interactive-input-part > .chat-todo-list-widget-container .chat-todo-list-widget .todo-list-expand .todo-list-title-section .codicon {
	font-size: 16px;
	line-height: 22px;
	flex-shrink: 0;
}

.interactive-session .interactive-input-part > .chat-todo-list-widget-container .chat-todo-list-widget .todo-clear-button-container {
	padding-right: 2px;
	display: flex;
	align-items: center;
	height: 18px;
	opacity: 1;
}

.interactive-session .interactive-input-part > .chat-todo-list-widget-container .chat-todo-list-widget .todo-clear-button-container .monaco-button {
	background-color: transparent;
	border-color: transparent;
	color: var(--vscode-foreground);
	cursor: pointer;
	height: 16px;
	padding: 3px;
	border-radius: 2px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: unset;
}

.interactive-session .interactive-input-part > .chat-todo-list-widget-container .chat-todo-list-widget .todo-clear-button-container .monaco-button:hover {
	background-color: var(--vscode-toolbar-hoverBackground);
}

.interactive-session .interactive-input-part > .chat-todo-list-widget-container .chat-todo-list-widget .todo-clear-button-container .monaco-button:focus {
	outline: 1px solid var(--vscode-focusBorder);
	outline-offset: 1px;
}

.interactive-session .interactive-input-part > .chat-todo-list-widget-container .chat-todo-list-widget .todo-clear-button-container .monaco-button .codicon {
	font-size: 10px;
	color: var(--vscode-foreground);
}


.interactive-session .interactive-input-part > .chat-todo-list-widget-container .chat-todo-list-widget .expand-icon {
	flex-shrink: 0;
	margin-right: 3px;
}

.interactive-session .interactive-input-part > .chat-todo-list-widget-container .chat-todo-list-widget .todo-list-title {
	font-weight: normal;
	font-size: 12px;
	display: flex;
	align-items: center;
	overflow: hidden;
	text-overflow: ellipsis;
}

.interactive-session .interactive-input-part > .chat-todo-list-widget-container .chat-todo-list-widget .todo-list-container {
	margin-top: 2px;
	max-height: calc(6.5 * 21px);
	/* 6.5 items to show half-line affordance */
	overflow-y: auto;
	overscroll-behavior: contain;
	scroll-behavior: smooth;
	scroll-padding-top: 24px;
	/* Half item height to show partial next item */
	scroll-padding-bottom: 24px;
	/* Half item height to show partial previous item */
}


.interactive-session .interactive-input-part > .chat-todo-list-widget-container .chat-todo-list-widget .todo-list {
	display: flex;
	flex-direction: column;
	gap: 4px;
	scroll-snap-type: y proximity;
}

.interactive-session .interactive-input-part > .chat-todo-list-widget-container .chat-todo-list-widget .todo-item {
	display: flex;
	align-items: center;
	gap: 6px;
	scroll-snap-align: start;
	min-height: 22px;
	font-size: var(--vscode-chat-font-size-body-m);
	padding: 0px 3px;
	border-radius: 2px;
	cursor: pointer;
}


.interactive-session .interactive-input-part > .chat-todo-list-widget-container .chat-todo-list-widget .todo-item:focus {
	outline: 1px solid var(--vscode-focusBorder);
	outline-offset: -1px;
}

.interactive-session .interactive-input-part > .chat-todo-list-widget-container .chat-todo-list-widget .todo-item.focused {
	background-color: var(--vscode-list-focusBackground);
}

.interactive-session .interactive-input-part > .chat-todo-list-widget-container .chat-todo-list-widget .todo-item > .todo-status-icon.codicon {
	flex-shrink: 0;
	font-size: 16px;
}

.interactive-session .interactive-input-part > .chat-todo-list-widget-container .chat-todo-list-widget .todo-content {
	flex-grow: 1;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	min-width: 0;
}

.interactive-session .interactive-input-part > .chat-todo-list-widget-container .chat-todo-list-widget .monaco-scrollable-element .monaco-list-rows .monaco-list-row {
	border-radius: var(--vscode-cornerRadius-small);
}

.interactive-session .interactive-input-part.compact .chat-input-container {
	display: flex;
	justify-content: space-between;
	padding-bottom: 0;
	/* no scrollbar */
	padding-right: 6px;
	border-radius: var(--vscode-cornerRadius-small);
}

.interactive-session .interactive-input-and-side-toolbar {
	display: flex;
	gap: 4px;
	align-items: center;
	position: relative;
}

.interactive-session .chat-input-container.focused {
	border-color: var(--vscode-focusBorder);
}

.chat-editor-container {
	padding: 0 0 0 4px;
}

.interactive-session .interactive-input-part.compact .chat-editor-container {
	/* No scrollbar */
	padding-right: 4px;
}

.chat-editor-container .monaco-editor .mtk1 {
	color: var(--vscode-input-foreground);
}

.interactive-session .chat-editor-container .monaco-editor .chat-prompt-spinner {
	transform-origin: 6px 6px;
	font-size: 12px;
}

.interactive-session .interactive-input-part .chat-editor-container .interactive-input-editor .monaco-editor,
.interactive-session .interactive-input-part .chat-editor-container .interactive-input-editor .monaco-editor .monaco-editor-background {
	background-color: var(--vscode-input-background);
}

.interactive-session .interactive-input-part.editing .chat-input-container .chat-editor-container .monaco-editor,
.interactive-session .interactive-input-part.editing .chat-input-container .chat-editor-container .monaco-editor .monaco-editor-background,
.interactive-session .interactive-request.editing .interactive-input-part .chat-input-container .chat-editor-container .monaco-editor,
.interactive-session .interactive-request.editing .interactive-input-part .chat-input-container .chat-editor-container .monaco-editor .monaco-editor-background {
	background-color: transparent;
}

.interactive-session .interactive-input-part.editing .chat-input-container,
.interactive-session .interactive-request.editing .interactive-input-part .chat-input-container {
	background-color: var(--vscode-chat-requestBubbleBackground);
}


.interactive-session .chat-editor-container .monaco-editor .cursors-layer {
	padding-left: 4px;
}

.interactive-session .chat-input-toolbars {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 4px;
}

/* Secondary toolbar below the input box */
.interactive-session .chat-secondary-toolbar {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 0 4px 0 5px;
}

.interactive-session .chat-secondary-toolbar:empty {
	display: none;
}

.interactive-session .chat-secondary-toolbar > .chat-secondary-input-toolbar {
	overflow: hidden;
	min-width: 0px;
	color: var(--vscode-icon-foreground);

	.monaco-action-bar .action-item .codicon {
		color: var(--vscode-icon-foreground);
	}

	.chat-input-picker-item {
		min-width: 0px;
		overflow: hidden;

		.action-label {
			min-width: 0px;
			overflow: hidden;
			position: relative;

			.chat-input-picker-label {
				overflow: hidden;
				text-overflow: ellipsis;
			}

			span + .chat-input-picker-label {
				margin-left: 2px;
			}

			.codicon {
				font-size: 12px;
			}
		}

		.codicon {
			flex-shrink: 0;
		}
	}
}

.interactive-session .chat-secondary-toolbar .chat-input-picker-item .action-label {
	height: 16px;
	padding: 3px 0px 3px 6px;
	display: flex;
	align-items: center;
	color: var(--vscode-icon-foreground);
}

.interactive-session .chat-secondary-toolbar .chat-input-picker-item .action-label.warning {
	color: var(--vscode-problemsWarningIcon-foreground);
}

.interactive-session .chat-secondary-toolbar .chat-input-picker-item .action-label.warning .codicon {
	color: var(--vscode-problemsWarningIcon-foreground) !important;
}

.interactive-session .chat-secondary-toolbar .chat-input-picker-item .action-label.info {
	color: var(--vscode-problemsInfoIcon-foreground);
}

.interactive-session .chat-secondary-toolbar .chat-input-picker-item .action-label.info .codicon {
	color: var(--vscode-problemsInfoIcon-foreground) !important;
}

.monaco-workbench .interactive-session .chat-secondary-toolbar .chat-input-picker-item .action-label .codicon-chevron-down {
	font-size: 10px;
	margin-left: 4px;
	opacity: 0.75;
}

.interactive-session .chat-input-toolbars :not(.responsive.chat-input-toolbar) .actions-container:first-child {
	margin-right: auto;
}

.interactive-session .chat-input-toolbars > .chat-input-toolbar .actions-container:first-child {
	margin-right: 0;
}

.interactive-session .chat-input-toolbars .tool-warning-indicator {
	position: absolute;
	bottom: 0;
	right: 0;
	font-size: 12px !important;
	color: var(--vscode-problemsWarningIcon-foreground);
	background: var(--vscode-input-background);
	width: fit-content;
	height: fit-content;
	border-radius: 100%;
}

.interactive-session .chat-input-toolbars > .chat-input-toolbar {
	order: 0;
	overflow: hidden;
	min-width: 0px;
	width: 100%;
	color: var(--vscode-icon-foreground);

	.monaco-action-bar .action-item .codicon {
		color: var(--vscode-icon-foreground);
	}

	.chat-input-picker-item {
		min-width: 0px;
		overflow: hidden;

		.action-label {
			min-width: 0px;
			overflow: hidden;
			position: relative;

			.chat-input-picker-label {
				overflow: hidden;
				text-overflow: ellipsis;
			}

			.model-picker-badge {
				display: inline-flex;
				align-items: center;
				margin-left: 4px;
				flex-shrink: 0;
				font-size: 12px;

				.codicon.codicon-info {
					color: var(--vscode-problemsInfoIcon-foreground) !important;
				}

				.codicon.codicon-warning {
					color: var(--vscode-problemsWarningIcon-foreground) !important;
				}
			}

			span + .chat-input-picker-label {
				margin-left: 2px;
			}

			.codicon {
				font-size: 12px;
			}
		}

		.action-label.disabled {
			.codicon {
				color: var(--vscode-disabledForeground);
			}
		}

		.codicon {
			flex-shrink: 0;
		}
	}
}

.interactive-session .chat-input-toolbar .chat-input-picker-item .action-label,
.interactive-session .chat-input-toolbar .chat-sessionPicker-item .action-label {
	height: 16px;
	padding: 3px 1px 3px 7px;
	display: flex;
	align-items: center;
	color: var(--vscode-icon-foreground);
}

/* Keep hover background while picker dropdown is open */
.interactive-session .chat-input-toolbar .action-label[aria-expanded="true"],
.interactive-session .chat-secondary-toolbar .action-label[aria-expanded="true"] {
	background-color: var(--vscode-toolbar-hoverBackground);
}

/* When chevrons are hidden and only showing an icon (no label), size to 22x22 with centered icon */
.interactive-session .chat-input-toolbar .chat-input-picker-item .action-label.hide-chevrons:not(:has(.chat-input-picker-label)),
.interactive-session .chat-input-toolbar .chat-input-picker-item.hide-chevrons .action-label:not(:has(.chat-input-picker-label)),
.interactive-session .chat-input-toolbar .chat-sessionPicker-item .action-label.hide-chevrons:not(:has(.chat-input-picker-label)) {
	width: 22px;
	min-width: 22px;
	height: 22px;
	padding: 0;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;

	.codicon {
		justify-content: center;
	}
}


/* Hide the tools button when the toolbar is in collapsed state */
.interactive-session .chat-input-toolbar:has(.hide-chevrons) .action-item:has(.codicon-settings) {
	display: none;
}

/* Add context button icon sizing */
.interactive-session .chat-input-toolbar .action-item:has(.codicon-add) .action-label {
	display: flex;
	align-items: center;
	justify-content: center;
}

.interactive-session .chat-input-toolbar .action-item:has(.codicon-add) .codicon-add {
	font-size: 14px;
}

.monaco-workbench .interactive-session .chat-input-toolbar .chat-input-picker-item .action-label .codicon-chevron-down,
.monaco-workbench .interactive-session .chat-input-toolbar .chat-sessionPicker-item .action-label .codicon-chevron-down {
	font-size: 10px;
	margin-left: 4px;
	opacity: 0.75;
}

.interactive-session .chat-input-toolbars .monaco-action-bar .actions-container,
.interactive-session .chat-secondary-toolbar .monaco-action-bar .actions-container {
	display: flex;
	gap: 4px;
}

.interactive-session .chat-input-toolbars .chat-sessionPicker-container {
	display: flex;
	max-width: 100%;
}

.monaco-workbench .interactive-session .chat-input-toolbars .monaco-action-bar .action-item .codicon,
.monaco-workbench .interactive-session .chat-input-toolbars .action-label .codicon {
	color: var(--vscode-icon-foreground) !important;
}

.monaco-workbench .interactive-session .chat-input-toolbars .monaco-action-bar .action-item.disabled .codicon,
.monaco-workbench .interactive-session .chat-input-toolbars .action-label.disabled .codicon {
	color: var(--vscode-disabledForeground) !important;
}

.action-widget .monaco-list-row.chat-model-picker-unavailable .description a,
.action-widget .monaco-list-row.chat-model-picker-unavailable .description a:visited {
	color: var(--vscode-textLink-foreground);
}

.action-widget .monaco-list-row.chat-model-picker-unavailable .description a:hover,
.action-widget .monaco-list-row.chat-model-picker-unavailable .description a:active {
	color: var(--vscode-textLink-activeForeground);
}

.action-widget .action-list-filter-input.chat-model-picker-filter-input,
.action-widget .action-list-filter-input.chat-model-picker-filter-input:focus {
	outline: none;
	box-shadow: none;
	border-color: transparent;
	background-color: transparent;
}

.action-widget .action-list-filter:has(.chat-model-picker-filter-input) {
	margin-bottom: 4px;
}

.interactive-session .chat-input-toolbars .codicon-debug-stop {
	color: var(--vscode-icon-foreground) !important;
}

.interactive-response .interactive-result-code-block .interactive-result-editor .monaco-editor,
.interactive-response .interactive-result-code-block .interactive-result-editor .monaco-editor .margin,
.interactive-response .interactive-result-code-block .interactive-result-editor .monaco-editor .monaco-editor-background {
	background-color: var(--vscode-interactive-result-editor-background-color) !important;
}

.interactive-item-compact .interactive-result-code-block {
	margin: 0 0 8px 0;
}

.interactive-item-container .interactive-result-code-block .monaco-toolbar .monaco-action-bar .actions-container {
	padding-inline-start: unset;
}


@keyframes kf-chat-editing-atomic-edit {
	0% {
		opacity: 0.8;
	}

	100% {
		opacity: 0;
	}
}

.monaco-editor .chat-editing-atomic-edit {
	z-index: 1;
	opacity: 0.8;
	background-color: var(--vscode-editor-background);
	animation: 350ms kf-chat-editing-atomic-edit ease-out;
}

.monaco-editor .chat-editing-pending-edit {
	z-index: 1;
	opacity: 0.6;
	background-color: var(--vscode-editor-background);
}

.monaco-editor .chat-editing-last-edit {
	background-color: var(--vscode-editor-rangeHighlightBackground);
	box-sizing: border-box;
	border: 1px solid var(--vscode-editor-rangeHighlightBorder);
}

@property --chat-editing-last-edit-shift {
	syntax: '<percentage>';
	initial-value: 100%;
	inherits: false;
}

@keyframes kf-chat-editing-last-edit-shift {
	0% {
		--chat-editing-last-edit-shift: 100%;
	}

	50% {
		--chat-editing-last-edit-shift: 7%;
	}

	100% {
		--chat-editing-last-edit-shift: 100%;
	}
}

.monaco-editor .chat-editing-last-edit-line {
	--chat-editing-last-edit-shift: 100%;
	background: linear-gradient(45deg, var(--vscode-editor-rangeHighlightBackground), var(--chat-editing-last-edit-shift), transparent);
	animation: 2.3s kf-chat-editing-last-edit-shift ease-in-out infinite;
	animation-delay: 330ms;
}


.chat-notification-widget .chat-info-codicon,
.chat-notification-widget .chat-error-codicon,
.chat-notification-widget .chat-warning-codicon {
	display: flex;
	align-items: start;
	gap: 8px;
}

.interactive-item-container .value .chat-notification-widget .rendered-markdown p {
	margin: 0;
}

.interactive-response .interactive-response-error-details {
	display: flex;
	align-items: start;
	gap: 6px;
}

.interactive-response .interactive-response-error-details .rendered-markdown :last-child {
	margin-bottom: 0px;
}

.interactive-response .interactive-response-error-details .codicon {
	margin-top: 1px;
}

.chat-used-context-list .codicon-warning {
	color: var(--vscode-notificationsWarningIcon-foreground);
	/* Have to override default styles which apply to all lists */
}

.chat-used-context-list .monaco-icon-label-container {
	color: var(--vscode-interactive-session-foreground);
}

.chat-attached-context .chat-attached-context-attachment .monaco-icon-name-container.warning,
.chat-attached-context .chat-attached-context-attachment .monaco-icon-suffix-container.warning,
.chat-used-context-list .monaco-icon-name-container.warning,
.chat-used-context-list .monaco-icon-suffix-container.warning {
	color: var(--vscode-notificationsWarningIcon-foreground);
}

.chat-attached-context .chat-attached-context-attachment.show-file-icons.warning,
.chat-attached-context .chat-attached-context-attachment.show-file-icons.partial-warning {
	border-color: var(--vscode-notificationsWarningIcon-foreground);
}

/**
 * Styles for the `reusable prompts` attachment widget.
 */
.chat-attached-context-attachment .prompt-type {
	opacity: 0.7;
	font-size: .9em;
	margin-left: 0.5em;
}

.chat-attached-context-attachment.warning {
	color: var(--vscode-notificationsWarningIcon-foreground);
}

.chat-attached-context-attachment.error {
	color: var(--vscode-notificationsErrorIcon-foreground);
}

.chat-attached-context-attachment .monaco-icon-label > .monaco-icon-label-container > .monaco-icon-suffix-container > .label-suffix {
	color: var(--vscode-peekViewTitleDescription-foreground);
	opacity: 1;
}

.chat-notification-widget .chat-warning-codicon .codicon-warning,
.chat-quota-error-widget .codicon-warning {
	color: var(--vscode-notificationsWarningIcon-foreground) !important;
	/* Have to override default styles which apply to all lists */
}

.chat-rate-limited-widget .codicon-info {
	color: var(--vscode-notificationsInfoIcon-foreground) !important;
	/* Have to override default styles which apply to all lists */
}

.chat-notification-widget .chat-error-codicon .codicon-error,
.interactive-response .interactive-response-error-details .codicon-error {
	color: var(--vscode-errorForeground) !important;
	/* Have to override default styles which apply to all lists */
}

.chat-notification-widget .chat-info-codicon .codicon-info,
.interactive-response .interactive-response-error-details .codicon-info {
	color: var(--vscode-notificationsInfoIcon-foreground) !important;
	/* Have to override default styles which apply to all lists */
}

.interactive-session .interactive-input-part {
	margin: 0px 12px;
	padding: 4px 0 4px 0px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	position: relative;
}

.interactive-session .interactive-input-part.compact {
	margin: 0;
	padding: 8px 0 0 0
}

.interactive-session .chat-attached-context .chat-attached-context-attachment {
	display: flex;
	overflow: hidden;
	font-size: 11px;
	padding: 0 4px 0 0;
	border: 1px solid var(--vscode-chat-requestBorder, var(--vscode-input-background, transparent));
	border-radius: 4px;
	height: 18px;
	max-width: 100%;
	width: fit-content;
}

.interactive-session .interactive-list .chat-attached-context .chat-attached-context-attachment {
	font-family: var(--vscode-chat-font-family, inherit);
	font-size: var(--vscode-chat-font-size-body-xs);
}

.action-item.chat-mcp {
	min-width: 22px !important;

	.chat-mcp-state-indicator {
		position: absolute;
		bottom: 0;
		left: 12px;
		font-size: 12px !important;
		background: var(--vscode-input-background);
		width: fit-content;
		height: fit-content;
		border-radius: 100%;
		pointer-events: none;

		&.chat-mcp-state-new {
			color: var(--vscode-button-foreground);
		}

		&.chat-mcp-state-error {
			color: var(--vscode-problemsErrorIcon-foreground);
		}

		&.chat-mcp-state-refreshing {
			color: var(--vscode-button-foreground);
		}
	}
}

.action-item.chat-attached-context-attachment.chat-add-files .action-label.codicon::before {
	font: normal normal normal 16px/1 codicon;
}

.interactive-session .chat-attached-context .chat-attached-context-attachment .monaco-button {
	display: flex;
	align-items: center;
	margin-top: -2px;
	padding-right: 2px;
	padding-left: 3px;
	height: calc(100% + 4px);
	outline-offset: -4px;
	font-size: 12px;
}

.interactive-session .chat-attached-context .chat-attached-context-attachment .monaco-button.codicon.codicon-plus {
	padding-left: 4px;
	font-size: 11px;
}

.action-item.chat-attached-context-attachment.chat-add-files:hover,
.interactive-session .chat-attached-context .chat-attached-context-attachment .monaco-button:hover {
	cursor: pointer;
	background: var(--vscode-toolbar-hoverBackground);
}

.interactive-session .chat-attached-context .chat-attached-context-attachment.implicit.disabled .monaco-button:hover {
	cursor: pointer;
	background: transparent;
}

.interactive-session .chat-attached-context .chat-attached-context-attachment .monaco-icon-label-container {
	display: flex;

	.monaco-icon-suffix-container {
		overflow: hidden;
		text-overflow: ellipsis;
	}
}

.interactive-session .chat-attached-context .chat-attached-context-attachment .monaco-icon-label-container .monaco-highlighted-label {
	display: inline-flex;
	align-items: center;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.interactive-session .chat-attached-context .chat-attached-context-attachment .monaco-icon-label .monaco-button.codicon.codicon-close,
.interactive-session .chat-attached-context .chat-attached-context-attachment .monaco-button.codicon.codicon-close,
.interactive-session .chat-attached-context .chat-attached-context-attachment .monaco-icon-label .monaco-button.codicon.codicon-plus,
.interactive-session .chat-attached-context .chat-attached-context-attachment .monaco-button.codicon.codicon-plus {
	color: var(--vscode-descriptionForeground);
	cursor: pointer;
}

.interactive-session .chat-attached-context .chat-attached-context-attachment .monaco-icon-label .codicon {
	font-size: 14px;
}

.interactive-session .chat-attached-context .chat-attached-context-attachment .monaco-icon-label .monaco-icon-label-iconpath.codicon {
	padding-top: 2px;
}

.interactive-session .chat-input-container .chat-attached-context {
	display: contents;
}

.interactive-session .chat-attached-context {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.interactive-session .interactive-input-part.compact .chat-attached-context {
	padding-bottom: 0px;
	display: flex;
	gap: 4px;
	flex-wrap: wrap;
}

.interactive-session .chat-attached-context .chat-attached-context-attachment.implicit .chat-implicit-hint {
	opacity: 0.7;
	font-size: .9em;
}

.interactive-session .chat-attached-context .chat-attached-context-attachment.implicit.disabled .chat-implicit-hint {
	font-style: italic;
}

.interactive-session .chat-attached-context .chat-attached-context-attachment.implicit.disabled {
	border-style: dashed;
}

.interactive-session .chat-attached-context .chat-attached-context-attachment.implicit.disabled:focus {
	outline: none;
	border-color: var(--vscode-focusBorder);
}

.interactive-session .chat-attached-context .chat-attached-context-attachment.implicit.disabled .monaco-icon-label .label-name {
	text-decoration: line-through;
	font-style: italic;
	opacity: 0.8;
}

.interactive-session .chat-attached-context .chat-attached-context-attachment .monaco-icon-label {
	gap: 4px;
}

.interactive-session .chat-attached-context .chat-attached-context-attachment .monaco-icon-label::before {
	height: auto;
	padding: 0;
	line-height: 100% !important;
	align-self: center;

	background-size: contain;
	background-position: center;
	background-repeat: no-repeat;
}

.interactive-session .chat-attached-context .chat-attached-context-attachment .monaco-icon-label.predefined-file-icon::before {
	padding: 0 0 0 2px;
	align-content: center;
}

.interactive-session .interactive-item-container.interactive-request .chat-attached-context .chat-attached-context-attachment {
	padding: 0 6px 0 4px;
}

.interactive-session-followups {
	display: flex;
	flex-direction: column;
	gap: 6px;
	align-items: start;
}

.interactive-session-followups .monaco-button {
	text-align: left;
	width: initial;
}

.interactive-session-followups .monaco-button .codicon {
	margin-left: 0;
	margin-top: 1px;
}

.interactive-item-container .interactive-response-followups .monaco-button {
	padding: 4px 8px;
}

/* .interactive-session .interactive-input-part .interactive-input-followups .interactive-session-followups {
	margin-bottom: 4px;
} */

.interactive-session .interactive-input-part .interactive-input-followups .interactive-session-followups .monaco-button {
	display: block;
	color: var(--vscode-textLink-foreground);
	font-size: 12px;

	/* clamp to max 3 lines */
	display: -webkit-box;
	line-clamp: 3;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.interactive-session .interactive-input-part .interactive-input-followups .interactive-session-followups code {
	font-family: var(--monaco-monospace-font);
	font-size: 11px;
}

.interactive-session .interactive-input-part .interactive-input-followups .interactive-session-followups .monaco-button .codicon-sparkle {
	float: left;
}

.interactive-session-followups .monaco-button.interactive-followup-reply {
	padding: 0px;
	border: none;
}

.interactive-item-container .monaco-toolbar .codicon {
	/* Very aggressive list styles try to apply focus colors to every codicon in a list row. */
	color: var(--vscode-icon-foreground) !important;
}

/* #region Quick Chat */

.quick-input-widget .interactive-session {
	width: 100%;
}

.quick-input-widget .interactive-session .interactive-input-part {
	padding: 8px 6px 8px 6px;
	margin: 0 3px;
}

.quick-input-widget .interactive-session .interactive-input-part .chat-input-toolbars .monaco-toolbar,
.quick-input-widget .interactive-session .interactive-input-part .chat-input-toolbars .actions-container {
	height: initial;
}

.quick-input-widget .interactive-session .interactive-input-part .chat-input-toolbars {
	margin-bottom: 1px;
	align-items: flex-end;
}

.quick-input-widget .interactive-session .chat-input-container {
	margin: 0;
	border-radius: 2px;
	padding: 0 4px 0 6px;
}

.quick-input-widget .interactive-list {
	border-bottom-right-radius: 6px;
	border-bottom-left-radius: 6px;
}

.quick-input-widget .interactive-response {
	min-height: 86px;
}

.quick-input-widget .interactive-session .disclaimer {
	margin: 8px 12px;
	color: var(--vscode-descriptionForeground);
	font-size: 12px;

	a {
		color: var(--vscode-textLink-foreground);
	}

	p {
		margin: 0;
	}
}

/* #endregion */

.interactive-response-progress-tree .monaco-list-row:not(.selected) .monaco-tl-row:hover {
	background-color: var(--vscode-list-hoverBackground);
}

.interactive-response-progress-tree {
	margin: 16px 0px;
}

.interactive-response-progress-tree.focused {
	border-color: var(--vscode-focusBorder, transparent);
}

.interactive-item-container .value .interactive-response-placeholder-codicon .codicon {
	color: var(--vscode-editorGhostText-foreground);
}

.interactive-item-container .value .interactive-response-placeholder-content {
	color: var(--vscode-editorGhostText-foreground);
	font-size: 12px;
	margin-bottom: 16px;
}

.interactive-item-container .value .interactive-response-placeholder-content p {
	margin: 0;
}

.interactive-response .interactive-response-codicon-details {
	display: flex;
	align-items: start;
	gap: 6px;
}

.chat-used-context-list .monaco-list {
	border: none;
	border-radius: 4px;
	width: auto;
}

.interactive-item-container .chat-resource-widget {
	background-color: var(--vscode-chat-slashCommandBackground);
	color: var(--vscode-chat-slashCommandForeground);
}


.interactive-item-container .chat-resource-widget,
.interactive-item-container .chat-agent-widget .monaco-button {
	border-radius: 4px;
	padding: 1px 3px;
}

.interactive-item-container .chat-agent-command {
	background-color: var(--vscode-chat-slashCommandBackground);
	color: var(--vscode-chat-slashCommandForeground);
	display: inline-flex;
	align-items: center;
	margin-right: 0.5ch;
	border-radius: 4px;
	padding: 0 0 0 3px;
}

.interactive-item-container .chat-agent-command > .monaco-button {
	display: flex;
	align-self: stretch;
	align-items: center;
	cursor: pointer;
	padding: 0 2px;
	margin-left: 2px;
	border-top-right-radius: 4px;
	border-bottom-right-radius: 4px;
}

.interactive-item-container .chat-agent-command > .monaco-button:hover {
	background: var(--vscode-toolbar-hoverBackground);
}

.interactive-item-container .chat-agent-widget .monaco-text-button {
	display: inline;
	border: none;
}

.interactive-session .checkpoint-file-changes-summary {
	display: flex;
	flex-direction: column;
	flex-wrap: wrap;
	align-items: center;
	border-radius: 4px;
	border: 1px solid var(--vscode-chat-requestBorder);

	.chat-view-changes-icon {
		padding: 3px;
		float: right;
		cursor: pointer;
	}

	.chat-view-changes-icon:hover {
		border-radius: 5px;
		background-color: var(--vscode-toolbar-hoverBackground);
	}

	.insertions-and-deletions {
		display: flex;
		margin-right: 5px;
		font-size: 12px;
	}

	.checkpoint-file-changes-summary-header {
		padding: 3px 3px 3px 3px;
		width: 100%;
		display: flex;
		box-sizing: border-box;
		justify-content: space-between;
	}

	.checkpoint-file-changes-summary-header .monaco-button-mdlabel {
		display: flex;
		width: 100%;
		text-align: left;
		align-items: center;
	}

	.checkpoint-file-changes-summary-header .chat-file-changes-label {
		width: 100%;
		float: left;
	}

	.checkpoint-file-changes-summary-header .chat-file-changes-label .monaco-button {
		width: 100%;
	}

	.checkpoint-file-changes-summary-header .chat-file-changes-label .monaco-button .codicon {
		font-size: 16px;
	}

	.chat-summary-list {
		width: 100%;
		max-width: 100%;
		padding: 0px;
		margin-bottom: 0px;
		border-bottom: 0px;
		border-left: 0px;
		border-right: 0px;
		box-sizing: border-box;
		border-radius: 0px;
	}

	.chat-summary-list .monaco-icon-label {
		display: flex;
	}

	.chat-summary-list .monaco-scrollable-element {
		border-radius: 4px;
	}

	.insertions {
		color: var(--vscode-chat-linesAddedForeground);
		font-weight: bold;
		padding-left: 5px;
		padding-right: 5px;
	}

	.deletions {
		color: var(--vscode-chat-linesRemovedForeground);
		font-weight: bold;
	}
}

.interactive-session .checkpoint-file-changes-summary.chat-file-changes-collapsed .chat-summary-list,
.interactive-session .chat-used-context.chat-used-context-collapsed .chat-used-context-list {
	display: none;
}

.interactive-session .chat-used-context {
	display: flex;
	flex-direction: column;
	gap: 2px;
	line-height: 1.5em;
}

.interactive-response-progress-tree,
.chat-notification-widget,
.chat-summary-list,
.chat-used-context-list,
.chat-quota-error-widget,
.chat-rate-limited-widget {
	border: 1px solid var(--vscode-chat-requestBorder);
	border-radius: 4px;
	margin-bottom: 8px;
}

.interactive-response-progress-tree,
.interactive-session .chat-summary-list,
.interactive-session .chat-used-context-list {
	padding: 4px 3px;

	.monaco-icon-label {
		padding: 0px 3px;
		gap: 2px;

		&::before {
			width: var(--vscode-chat-font-size-body-s);
			padding-right: 0;
		}
	}
}

.interactive-session .chat-editing-session-list {

	.monaco-icon-label {
		padding: 0px 3px;
	}

	.monaco-icon-label.excluded {
		color: var(--vscode-notificationsWarningIcon-foreground)
	}
}

.interactive-session .chat-editing-session-list.collapsed {
	display: none;
}

.interactive-session .chat-summary-list .monaco-list .monaco-list-row {
	border-radius: 4px;
}

.interactive-session .chat-summary-list .monaco-list .monaco-list-row:hover {
	background-color: var(--vscode-list-hoverBackground) !important;
}

.interactive-session .chat-used-context-list .monaco-list .monaco-list-row {
	border-radius: 2px;
}

.interactive-session .chat-file-changes-label {
	color: var(--vscode-interactive-session-foreground);
	user-select: none;
}

.interactive-session .chat-used-context-label {
	font-size: 13px;
	font-family: var(--vscode-chat-font-family, inherit);
	color: var(--vscode-descriptionForeground);
	user-select: none;

	a {
		color: var(--vscode-descriptionForeground);
	}

	code {
		font-size: var(--vscode-chat-font-size-body-xs);
	}
}

.interactive-session .chat-file-changes-label:hover,
.interactive-session .chat-used-context-label:hover {
	opacity: unset;
}

.interactive-session .chat-file-changes-label .monaco-button,
.interactive-session .chat-used-context-label .monaco-button {
	width: fit-content;
	border: none;
	border-radius: 4px;
	gap: 0;
	text-align: initial;
	justify-content: initial;
}

.interactive-session .chat-used-context-label .monaco-button {
	/* unset Button styles */
	display: inline-flex;
}

.interactive-session .chat-file-changes-label .monaco-button {
	padding: 2px 2px 2px 2px;
}

.interactive-session .chat-used-context-label .monaco-button {
	padding: 2px 6px 2px 2px;
	margin-left: -2px;
	font-size: var(--vscode-chat-font-size-body-s);
	line-height: unset;
}

.interactive-session .chat-used-context.show-checkmarks .chat-used-context-label .monaco-button {
	gap: 4px;
	margin-left: 0;
}

.interactive-session .chat-file-changes-label .monaco-button:hover {
	background-color: var(--vscode-toolbar-hoverBackground);
}

.interactive-session .chat-used-context:not(.chat-used-context-collapsed) .chat-used-context-label .monaco-button,
.interactive-session .chat-used-context-label .monaco-button:hover {
	color: var(--vscode-foreground);
}

.interactive-session .chat-file-changes-label .monaco-text-button:focus,
.interactive-session .chat-used-context-label .monaco-text-button:focus {
	outline: none;
}

.interactive-session .chat-file-changes-label .monaco-text-button:focus-visible,
.interactive-session .chat-used-context-label .monaco-text-button:focus-visible {
	outline: 1px solid var(--vscode-focusBorder);
}

.interactive-session .chat-file-changes-label .monaco-button .codicon,
.interactive-session .chat-used-context-label .monaco-button .codicon {
	font-size: 12px;
	color: var(--vscode-icon-foreground) !important;
}

/* Hide the leading icon on collapsible parts by default; show-checkmarks restores it */
.interactive-session .chat-used-context-label .monaco-icon-button > .codicon:first-child:not(.chat-collapsible-hover-chevron):not(.codicon-error):not(.codicon-warning) {
	display: none;
}

.interactive-session .chat-used-context.show-checkmarks .chat-used-context-label .monaco-icon-button > .codicon:first-child:not(.chat-collapsible-hover-chevron) {
	display: inline-block;
}

/* Hover chevron indicator for collapsible parts */
.chat-collapsible-hover-chevron {
	font-size: 12px;
	opacity: 0;
	transition: opacity 0.1s ease-in-out;
	color: var(--vscode-descriptionForeground);
}

.chat-collapsible-hover-chevron.codicon-chevron-down {
	opacity: 1;
}

.interactive-session .chat-used-context-label .monaco-button:hover .chat-collapsible-hover-chevron {
	opacity: 1;
}

.interactive-item-container .progress-container {
	display: flex;
	align-items: center;
	gap: 4px;
	margin: 0 0 6px 0;
	font-size: 13px;

	/* Tool calls transition from a progress to a collapsible list part, which needs to have this top padding.
	The working progress also can be replaced by a tool progress part. So align this padding so the text doesn't appear to shift. */
	padding-top: 2px;

	> .codicon[class*='codicon-'] {
		font-size: 12px;

		&::before {
			font-size: 12px;
		}
	}

	> .codicon.codicon-check {
		display: none;
	}

	.codicon {
		/* Very aggressive list styles try to apply focus colors to every codicon in a list row. */
		color: var(--vscode-icon-foreground) !important;
		/* Matching the margin on all .monaco-text-button .codicon */
		margin: 0 .2em;

		&.codicon-error {
			color: var(--vscode-editorError-foreground) !important;
		}
	}

	.rendered-markdown.progress-step {
		white-space: normal;

		& > p {
			color: var(--vscode-descriptionForeground);
			font-size: var(--vscode-chat-font-size-body-s);
			margin: 0;

			code {
				font-size: var(--vscode-chat-font-size-body-xs);
			}
		}

		.chat-inline-anchor-widget {
			display: inline;
		}
	}

	/* hide spinner icon for shimmer progress, shimmer handles animation */
	&.shimmer-progress > .codicon {
		display: none;
	}

	/* shimmer animation for shimmer progress */
	&.shimmer-progress .rendered-markdown.progress-step > p {
		background: linear-gradient(
			90deg,
			var(--vscode-descriptionForeground) 0%,
			var(--vscode-descriptionForeground) 30%,
			var(--vscode-chat-thinkingShimmer) 50%,
			var(--vscode-descriptionForeground) 70%,
			var(--vscode-descriptionForeground) 100%
		);
		background-size: 400% 100%;
		background-clip: text;
		-webkit-background-clip: text;
		-webkit-text-fill-color: transparent;
		animation: chat-thinking-shimmer 2s linear infinite;
	}
}

.show-checkmarks .progress-container > .codicon.codicon-check,
.progress-container.show-checkmarks > .codicon.codicon-check {
	display: inline-flex;
	margin-left: 4px;
}

.interactive-item-container .chat-command-button {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
}

.interactive-item-container .chat-notification-widget {
	display: flex;
	align-items: center;
	flex-direction: row;
	padding: 8px 12px;
	gap: 6px;
}

.interactive-item-container .chat-confirmation-widget .interactive-result-code-block,
.interactive-item-container .chat-confirmation-widget .chat-attached-context {
	margin-bottom: 8px;
}

.interactive-item-container .chat-command-button .monaco-button .codicon {
	margin-left: 0;
	margin-top: 1px;
}

.chat-code-citation-label {
	opacity: 0.7;
	white-space: pre-wrap;
}

.chat-code-citation-button-container {
	display: inline;
}

.chat-code-citation-button-container .monaco-button {
	display: inline;
	border: none;
	padding: 0;
	color: var(--vscode-textLink-foreground);
}

.chat-attached-context-hover {
	padding: 0 6px;
}

.chat-attached-context-hover .chat-attached-context-image-container {
	padding: 6px 0 4px;
	height: auto;
	width: 100%;
	display: block;
}

.chat-attached-context-hover .chat-attached-context-image-container .chat-attached-context-image {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
	max-height: 350px;
	max-width: 100%;
	min-width: 200px;
	min-height: 200px;

}

.chat-attached-context-hover .chat-attached-context-url {
	color: var(--vscode-textLink-foreground);
	cursor: pointer;
	margin-top: 4px;
	padding: 2px 0;
	width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 100%;
	display: block;
}

.chat-attached-context-hover .chat-attached-context-url-separator {
	border-top: 1px solid var(--vscode-chat-requestBorder);
	left: 0;
	right: 0;
	position: absolute;
	margin-top: 2px;
}

/* Element hover (DevTools-style) */
.chat-element-hover {
	max-width: 400px;
	min-width: 250px;
}

.monaco-hover.workbench-hover.chat-element-data-hover .hover-contents.html-hover-contents {
	padding: 0;
}

.monaco-hover.workbench-hover.chat-element-data-hover .chat-element-hover-scrollable {
	width: 100%;
}

.chat-element-hover.chat-attached-context-hover {
	padding: 6px 0 6px 6px;
}

.chat-element-hover-content {
	max-height: 500px;
	box-sizing: border-box;
	padding-right: 10px;
	padding-bottom: 15px;
}

.chat-element-hover .chat-element-hover-section {
	padding: 4px 6px;
}

.chat-element-hover .chat-element-hover-section + .chat-element-hover-section {
	border-top: 1px solid var(--vscode-editorWidget-border, rgba(127, 127, 127, 0.2));
}

.chat-element-hover .chat-element-hover-header {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	color: var(--vscode-descriptionForeground);
	letter-spacing: 0.5px;
	margin-bottom: 4px;
}

.chat-element-hover .chat-element-hover-code {
	margin: 0;
	padding: 4px 6px;
	background: var(--vscode-textCodeBlock-background);
	border-radius: 3px;
	font-family: var(--monaco-monospace-font);
	font-size: 12px;
	line-height: 1.5;
	white-space: pre;
	overflow: hidden;
	color: var(--vscode-editor-foreground);
}

.chat-element-hover .chat-element-hover-code code {
	font-family: inherit;
	font-size: inherit;
	background: transparent;
	padding: 0;
	border-radius: 0;
	display: block;
}

.chat-element-hover .chat-element-hover-table {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 2px 8px;
}

.chat-element-hover .chat-element-hover-row {
	display: contents;
}

.chat-element-hover .chat-element-hover-label {
	font-family: var(--monaco-monospace-font);
	font-size: 12px;
	color: var(--vscode-debugTokenExpression-name);
	white-space: nowrap;
}

.chat-element-hover .chat-element-hover-value {
	font-family: var(--monaco-monospace-font);
	font-size: 12px;
	color: var(--vscode-editor-foreground);
	word-break: break-all;
	display: flex;
	align-items: center;
	gap: 4px;
}

.chat-element-hover .chat-element-hover-color-swatch {
	display: inline-block;
	width: 12px;
	height: 12px;
	border: 1px solid var(--vscode-editorWidget-border, rgba(127, 127, 127, 0.4));
	border-radius: 2px;
	flex-shrink: 0;
}

.chat-element-hover .chat-element-hover-text {
	font-family: var(--monaco-monospace-font);
	font-size: 12px;
	color: var(--vscode-editor-foreground);
	white-space: pre-wrap;
	word-break: break-word;
}

.chat-element-hover .chat-element-hover-show-more {
	background: none;
	border: none;
	padding: 0;
	margin-top: 6px;
	color: var(--vscode-textLink-foreground);
	cursor: pointer;
	font-size: 12px;
	text-decoration: none;
}

.chat-element-hover .chat-element-hover-show-more:hover,
.chat-element-hover .chat-element-hover-show-more:focus-visible {
	color: var(--vscode-textLink-activeForeground);
}


.chat-attached-context-attachment .chat-attached-context-pill {
	font-size: 12px;
	display: inline-flex;
	align-items: center;
	padding: 2px 0 2px 0px;
	border-radius: 2px;
	margin-right: 1px;
	user-select: none;
	outline: none;
	border: none;

	.codicon.codicon-file-media, .codicon.codicon-warning {
		font-size: 12px;
		margin-right: 2px;
	}
}

.chat-attached-context-attachment .attachment-additional-info {
	opacity: 0.7;
	font-size: .9em;
	padding-left: 4px;
}

.chat-attached-context-attachment .chat-attached-context-pill-image {
	width: 13px;
	height: 13px;
	border-radius: 2px;
	object-fit: cover;
	margin-right: 3px;
}

.chat-attached-context-attachment .chat-attached-context-custom-text {
	vertical-align: middle;
	user-select: none;
	outline: none;
	border: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
	display: inline-block;
}

.chat-attached-context-attachment.show-file-icons.warning .chat-attached-context-custom-text {
	color: var(--vscode-notificationsWarningIcon-foreground);
	text-decoration: line-through;
}

.chat-attached-context-attachment.show-file-icons.partial-warning .chat-attached-context-custom-text {
	color: var(--vscode-notificationsWarningIcon-foreground);
}

.interactive-session .chat-scroll-down {
	display: none;
	position: absolute;
	bottom: 7px;
	right: 12px;
	border-radius: 100%;
	width: 27px;
	height: 27px;

	.codicon {
		margin: 0px;
	}
}

.interactive-session.show-scroll-down .chat-scroll-down {
	display: initial;
}

.chat-quota-error-widget,
.chat-rate-limited-widget {
	padding: 8px 12px;
	display: flex;
	gap: 6px;

	.monaco-button {
		width: fit-content;
	}

	.chat-quota-error-button,
	.chat-rate-limited-button {
		margin-top: 6px;
		margin-bottom: 2px;
	}

	.chat-quota-error-secondary-button {
		margin-top: 6px;
		padding: 0px;
		border: none;
	}

	.chat-quota-error-secondary-button,
	.chat-quota-wait-warning {
		font-size: 12px;
	}

	.chat-quota-wait-warning {
		margin-top: 2px;
	}

	.chat-quota-error-message,
	.chat-rate-limited-message {
		.rendered-markdown p {
			margin: 0px;
		}
	}
}

.hideSuggestTextIcons .suggest-widget .monaco-list .monaco-list-row .suggest-icon.codicon-symbol-text::before {
	display: none;
}

.interactive-session:not(.chat-widget > .interactive-session) {

	.interactive-item-container {
		padding: 5px 16px;
	}

	.interactive-item-container.interactive-request {
		align-items: flex-end;

	}

	.interactive-item-container.interactive-request:not(.editing):hover .request-hover {
		opacity: 1 !important;
	}

	.interactive-item-container.interactive-request.confirmation-message {
		align-items: flex-start;

		.checkpoint-container {
			display: none;
		}
	}

	.interactive-item-container.interactive-request .value .rendered-markdown {
		background-color: var(--vscode-chat-requestBubbleBackground);
		border-radius: var(--vscode-cornerRadius-xLarge);
		padding: 8px 12px;
		max-width: 90%;
		margin-left: auto;
		width: fit-content;
		margin-bottom: 5px;
		position: relative;
	}

	.interactive-item-container.interactive-request .value .rendered-markdown {
		margin-left: auto;
	}

	.interactive-item-container.interactive-request .value .rendered-markdown.clickable:hover {
		cursor: pointer;
		background-color: var(--vscode-chat-requestBubbleHoverBackground);
	}

	.hc-black .interactive-item-container.interactive-request .value .rendered-markdown,
	.hc-light .interactive-item-container.interactive-request .value .rendered-markdown {
		border: 1px dotted var(--vscode-focusBorder);
	}

	.interactive-item-container.interactive-request .value .rendered-markdown > :first-child {
		margin-top: 0px;
	}

	.interactive-item-container.interactive-request .value .rendered-markdown > :last-child {
		margin-bottom: 0px;
	}

	.interactive-item-container.interactive-request .value > .rendered-markdown p {
		width: fit-content;
	}

	.interactive-item-container.interactive-request .chat-attached-context {
		max-width: 100%;
		width: fit-content;
		justify-content: flex-end;
		margin-left: auto;
		padding-bottom: 5px;
	}

	.interactive-request .header.header-disabled,
	.request-hover.has-no-actions,
	.request-hover.hidden,
	.request-hover.checkpoints-enabled.has-no-actions,
	.checkpoint-container.hidden,
	.checkpoint-restore-container.hidden {
		display: none;
	}

	.interactive-request .header.partially-disabled .avatar-container,
	.interactive-request .header.partially-disabled .username {
		display: none;
	}

	.interactive-request .header.partially-disabled .detail-container {
		margin-left: 0px;
	}

	.interactive-item-container .header .detail .codicon-check {
		margin-right: 7px;
		vertical-align: middle;
		font-size: 11px;
		display: none;
	}

	.interactive-item-container .header.partially-disabled .detail.show-checkmarks {
		margin-left: 4px;

		.codicon-check {
			display: inline;
		}
	}


	.request-hover {
		position: absolute;
		overflow: hidden;
		z-index: 100;
		background-color: var(--vscode-interactive-result-editor-background-color, var(--vscode-editor-background));
		border: 1px solid var(--vscode-chat-requestBorder);
		top: -13px;
		right: 20px;
		border-radius: 3px;
		height: 26px;
	}

	.request-hover.expanded:not(.checkpoints-enabled) {
		width: 50px;
	}

	.request-hover.checkpoints-enabled {
		top: 15px;
	}

	.request-hover.editing {
		opacity: 1 !important;
	}

	.request-hover:not(.expanded) .actions-container {
		height: 22px;
	}

	.request-hover.expanded .actions-container {
		padding: 0 3px;
	}

	.request-hover:not(.expanded) .actions-container {
		.action-label {
			margin: 4px 2px 0;
			padding: 3px 3px;
		}
	}

	.request-hover:focus-within {
		opacity: 1 !important;
	}


	.checkpoint-container,
	.checkpoint-restore-container {
		display: flex;
		width: 100%;
		position: relative;
		align-items: center;
		gap: 4px;
		margin-top: 0;
		margin-bottom: 8px;

		.checkpoint-line-left,
		.checkpoint-line-right {
			flex: 1;
			height: 1px;
			background-color: var(--vscode-chat-requestBorder, var(--vscode-input-background));
		}

		.checkpoint-line-left {
			mask-image: linear-gradient(to right, transparent, black);
			-webkit-mask-image: linear-gradient(to right, transparent, black);
		}

		.checkpoint-line-right {
			mask-image: linear-gradient(to left, transparent, black);
			-webkit-mask-image: linear-gradient(to left, transparent, black);
		}

		.monaco-toolbar {
			height: fit-content;
			width: fit-content;
			user-select: none;
			flex-shrink: 0;
			gap: 4px;
		}

		.monaco-toolbar .action-label {
			font-size: 12px;
			line-height: 18px;
			color: var(--vscode-descriptionForeground);
			border: 1px solid transparent;
			background-color: transparent;
			padding: 1px 5px;
			margin-right: 5px;
		}

		.monaco-toolbar .action-label.codicon.codicon-repo-forked {
			width: fit-content;
			padding: 2px 5px;
		}

		.monaco-toolbar .actions-container > .action-item:not(:first-child):has(.action-label.codicon.codicon-repo-forked) {
			display: flex;
			align-items: center;
			gap: 4px;
		}

		.monaco-toolbar .actions-container > .action-item:not(:first-child):has(.action-label.codicon.codicon-repo-forked)::before {
			content: '\00B7';
			font-size: 12px;
			line-height: 18px;
			color: var(--vscode-descriptionForeground);
		}

		.monaco-toolbar .action-label:hover {
			color: var(--vscode-foreground);
			border-color: var(--vscode-chat-requestBorder, var(--vscode-input-background));
			background-color: var(--vscode-sideBar-background);
		}
	}

	.checkpoint-container {
		opacity: 0;
		transition: opacity 0.1s ease-in-out;
	}

	.checkpoint-restore-container {
		margin-top: 10px;

		.checkpoint-label-text {
			font-size: 12px;
			line-height: 18px;
			color: var(--vscode-descriptionForeground);
			display: flex;
			align-items: center;
			flex-shrink: 0;
			padding: 1px 5px;
			border: 1px solid transparent;
		}

		.checkpoint-dot-separator {
			font-size: 12px;
			line-height: 18px;
			color: var(--vscode-descriptionForeground);
			flex-shrink: 0;
		}
	}

	.checkpoint-container:focus-within,
	.checkpoint-container.group-hovered,
	.interactive-item-container.interactive-request:not(.editing):hover .checkpoint-container {
		opacity: 1;
	}

	.interactive-item-container.interactive-request.editing .checkpoint-container {
		display: none;
	}

	.interactive-list > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row {
		overflow: visible !important;
	}

	.interactive-list > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused.request {
		outline: none !important;
	}

	div[data-index="0"] .monaco-tl-contents {
		.interactive-item-container.interactive-request:not(.editing) {
			padding-top: 19px;
		}

		.request-hover {
			top: 0px;
		}

		.checkpoint-container {
			display: none;
		}
	}

	.interactive-list > .monaco-list:focus > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused.request {
		outline: none !important;

		.interactive-item-container .value .rendered-markdown {
			outline: 1px solid var(--vscode-focusBorder);
		}

		.request-hover:not(.has-no-actions) {
			display: block;
		}

		.checkpoint-container {
			opacity: 1;
		}
	}

	.interactive-request.editing .rendered-markdown,
	.interactive-request.editing .value {
		display: none;
	}

	.interactive-request.editing-input .rendered-markdown {
		outline: 1px solid var(--vscode-focusBorder);
	}

	.interactive-request.editing {
		padding: 0px;

		.interactive-input-part .chat-input-container .interactive-input-editor .monaco-editor .native-edit-context {
			opacity: 0;
		}
	}
}

.editor-instance .interactive-session .interactive-item-container.interactive-response .checkpoint-restore-container {

	.checkpoint-label-text,
	.monaco-toolbar {
		background-color: var(--vscode-editor-background);
	}
}

.chat-buttons-container {
	display: flex;
	gap: 8px;
	margin-top: 0px;
	flex-wrap: wrap;
	flex-basis: 100%;
	padding: 0 8px;
	margin: 8px 0;

	& .monaco-button.monaco-dropdown-button {
		padding: 0 3px;
	}
}

.interactive-item-container .chat-command-button .monaco-button,
.chat-buttons-container .monaco-button:not(.monaco-dropdown-button) {
	text-align: left;
	width: initial;
}

.interactive-item-container .chat-edit-input-container {
	width: 100%;
}

.chat-row-disabled-overlay,
.interactive-item-container .chat-edit-input-container .chat-editing-session,
.chat-input-overlay {
	display: none;
}

.chat-row-disabled-overlay.disabled,
.chat-input-overlay.disabled {
	position: absolute;
	inset: 0;
	background-color: var(--vscode-sideBar-background);
	opacity: 0.6;
	display: flex;
	z-index: 101;
	user-select: none;
	cursor: default;
}

.interactive-session .focused-input-dom {
	position: absolute;
	top: -50000px;
	width: 1px;
	height: 1px;
}


.interactive-session .chat-attached-context .chat-attached-context-attachment.implicit.disabled:hover {
	cursor: pointer;
	border-style: solid;
	background-color: var(--vscode-toolbar-hoverBackground);
}

/* Chat Suggest Next Widget */
/* Suggested Actions widget - reuses chat-welcome-view-suggested-prompts styling */

.interactive-session > .chat-suggest-next-widget {
	/* Override positioning from welcome view styles (relative instead of absolute) */
	position: relative;
	bottom: auto;
	left: auto;
	right: auto;
	margin: 0 0 0 0;
	/* Keep standard padding with space for title */
	padding: 32px 16px 8px 16px;
	/* Left align buttons to match standard welcome view */
	justify-content: flex-start;
	/* Ensure flex layout is properly applied */
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.chat-welcome-view-suggested-prompt.chat-suggest-next-has-dropdown {
	padding-right: 12px;
}

/* Dropdown container for chevron in suggested prompt buttons - provides larger hit area */
.chat-welcome-view-suggested-prompt > .chat-suggest-next-dropdown {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	margin: -1px -8px -1px 0; /* Extend to button edge, accounting for button padding */
	padding: 0 4px 0 2px;
	gap: 4px;
	cursor: pointer;
	border-top-right-radius: 4px;
	border-bottom-right-radius: 4px;
	box-sizing: border-box;
}

.chat-welcome-view-suggested-prompt > .chat-suggest-next-dropdown:hover {
	background-color: var(--vscode-toolbar-hoverBackground);
}

.chat-welcome-view-suggested-prompt > .chat-suggest-next-dropdown:focus {
	outline: 1px solid var(--vscode-focusBorder);
	outline-offset: -1px;
}

/* Chevron icon in dropdown container */
.chat-welcome-view-suggested-prompt .codicon-chevron-down.dropdown-chevron {
	font-size: 12px;
	opacity: 0.7;
	flex-shrink: 0;
}

.chat-welcome-view-suggested-prompt > .chat-suggest-next-dropdown:hover .dropdown-chevron,
.chat-welcome-view-suggested-prompt > .chat-suggest-next-dropdown:focus .dropdown-chevron {
	opacity: 1;
}

/* Vertical separator between label and chevron in suggested next actions */
.chat-suggest-next-dropdown > .chat-suggest-next-separator {
	width: 1px;
	height: 16px;
	background-color: currentColor;
	opacity: 0.5;
	border-radius: 1px;
	align-self: center;
	flex-shrink: 0;
}

/* Show more attachments button styling */
.chat-attachments-show-more-button {
	opacity: 0.8;
	transition: opacity 0.2s ease;
}

.chat-attachments-show-more-button:hover {
	opacity: 1;
	background-color: var(--vscode-list-hoverBackground) !important;
}

.chat-attachments-show-more-button:focus {
	outline: 1px solid var(--vscode-focusBorder);
	outline-offset: -1px;
}

.chat-attachments-show-more-button .chat-attached-context-custom-text {
	font-style: italic;
	color: var(--vscode-descriptionForeground);
}

/* Pending request styles */
.interactive-item-container.pending-request {
	opacity: 0.7;

	.request-hover {
		top: -17px !important;
	}
}

/* Drag handle for reordering pending messages */
.interactive-item-container .chat-pending-drag-handle {
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: grab;
	opacity: 0;
	transition: opacity 0.15s;
	color: var(--vscode-descriptionForeground);
	margin-top: -4px; /* visually center with overlaid top controls */
}

.interactive-item-container.pending-request:hover .chat-pending-drag-handle {
	opacity: 1;
}

/* Dragging state */
.interactive-item-container.chat-pending-dragging {
	opacity: 0.4;
}

/* Insertion indicator */
.chat-pending-insert-indicator {
	position: absolute;
	height: 2px;
	background: var(--vscode-focusBorder);
	pointer-events: none;
	z-index: 100;
	display: none;
}

.interactive-item-container .chat-request-status {
	color: var(--vscode-descriptionForeground);
	font-size: var(--vscode-chat-font-size-body-xs);
	margin-top: 2px;
	text-align: right;
}

/* Pending divider styles */
.interactive-item-container.pending-divider {
	padding: 8px 16px;
}

.interactive-item-container.pending-divider .pending-divider-content {
	display: flex;
	align-items: center;
	gap: 8px;
}

.interactive-item-container.pending-divider .pending-divider-label {
	font-size: var(--vscode-chat-font-size-body-xs);
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--vscode-descriptionForeground);
}

/* Outline removal except for HC themes */
.monaco-workbench:not(.hc-black):not(.hc-light) .interactive-list > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused.response {
	outline: none !important;
}
