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

.sessions-chat-widget {
	display: flex;
	flex-direction: column;
	height: 100%;
	width: 100%;
	position: relative;
}

.new-chat-widget-container {
	display: flex;
	flex-direction: column;
	/* Cross-axis: keep children flush left so the input's left edge — and therefore
	 * the attach (+) button — stays anchored as the viewport narrows past max-width. */
	align-items: flex-start;
	justify-content: center;
	width: 100%;
	height: 100%;
	box-sizing: border-box;
	overflow: hidden;
	padding: var(--vscode-spacing-size160) var(--vscode-spacing-size160) var(--vscode-spacing-size200);
	position: relative;
}

.new-chat-widget-container.revealed {
	justify-content: center;
}

.new-session-send-status {
	display: flex;
	align-items: center;
	gap: var(--vscode-spacing-size40);
	min-height: 1.4em;
	margin-top: var(--vscode-spacing-size80);
	color: var(--vscode-descriptionForeground);
	font-size: var(--vscode-fontSize-label1);
	line-height: 1.4;
}

.new-session-send-status > .codicon {
	font-size: var(--vscode-codiconFontSize-compact);
}

.new-chat-widget-container.revealed .new-chat-input-container {
	display: block;
	margin-top: 0;
	animation: chat-full-welcome-fade-in 0.35s ease 0.15s both;
}

/* Workspace and progressively disclosed session options above the input. */
.new-session-workspace-picker-container {
	display: none;
	width: 100%;
	max-width: 800px;
	padding: 0;
	box-sizing: border-box;
	margin-bottom: var(--vscode-spacing-size80);
}

.experimental-new-session-composer .new-session-workspace-picker-container {
	padding: 0;
	margin-top: var(--vscode-spacing-size120);
	margin-bottom: 0;
}

.new-chat-widget-container.revealed .new-session-workspace-picker-container {
	display: block;
	animation: chat-full-welcome-fade-in 0.35s ease 0.1s both;
}

@keyframes chat-full-welcome-fade-in {
	from {
		opacity: 0;
		transform: translateY(12px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.new-session-workspace-picker-container:empty {
	display: none;
	margin-bottom: 0;
}

/* Quick chat composer: no workspace to pick, so hide the picker row entirely. */
.new-chat-widget-content.quick-chat .new-session-workspace-picker-container {
	display: none;
}

.new-chat-widget-content .new-session-quick-chat-header {
	display: none;
}

.new-chat-widget-content.quick-chat .new-session-quick-chat-header {
	display: flex;
	margin-top: var(--vscode-spacing-size120);
}

.experimental-new-session-composer .new-session-quick-chat-header {
	justify-content: flex-end;
	margin-bottom: 0;
}

.agent-sessions-workbench:not(.phone-layout) .experimental-new-session-composer .new-session-quick-chat-header {
	width: 100%;
	margin: var(--vscode-spacing-size120) 0 0;
	padding: var(--vscode-spacing-size40) var(--vscode-spacing-size80) var(--vscode-spacing-size60);
	border-radius: var(--vscode-cornerRadius-large);
}

.new-session-workspace-picker-container .sessions-workspace-category-picker.new-chat-session-options {
	width: fit-content;
	max-width: 100%;
	margin: 0;
	flex-wrap: nowrap;
	gap: 0;
	padding: var(--vscode-spacing-size60) var(--vscode-spacing-size80);
	border: var(--vscode-strokeThickness) solid var(--vscode-contrastBorder, transparent);
	border-radius: var(--vscode-cornerRadius-large);
}

.agent-sessions-workbench:not(.phone-layout) .experimental-new-session-composer .new-session-workspace-picker-container .new-chat-session-options {
	max-width: calc(100% - 2 * (var(--vscode-spacing-size100) + var(--vscode-strokeThickness)));
	margin-inline: calc(var(--vscode-spacing-size100) + var(--vscode-strokeThickness));
}

.monaco-workbench.agent-sessions-workbench .sessions-chat-widget .new-chat-widget-content.experimental-new-session-composer .new-chat-session-options {
	background-color: color-mix(in srgb, var(--vscode-agentsChatInput-background) 75%, var(--session-view-background));
	border-radius: var(--vscode-cornerRadius-large) var(--vscode-cornerRadius-large) 0 0;
}

.monaco-workbench.agent-sessions-workbench:is(.hc-black, .hc-light) .sessions-chat-widget .new-chat-widget-content.experimental-new-session-composer .new-chat-session-options {
	background-color: var(--vscode-agentsChatInput-background);
}

.new-session-below-input-surfaces {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	width: 100%;
	margin-top: var(--vscode-spacing-size200);
	overflow-y: auto;
}

/* Getting-started tip demoted below the input in the experimental composer. */
.experimental-new-session-composer .new-session-getting-started-tip-below {
	width: 100%;
	/* Keep the floating toolbar inside the parent's scrollable area. */
	padding-top: var(--vscode-spacing-size200);
}

/* As a standalone card (not attached above the input) the tip takes a full border and
	rounds every corner, unlike the input-attached notice that squares its joined bottom. */
.new-session-getting-started-tip-below .chat-input-notice {
	border: var(--vscode-strokeThickness) solid var(--vscode-contrastBorder, color-mix(in srgb, var(--vscode-foreground) 10%, transparent));
	border-radius: var(--vscode-cornerRadius-medium);
	background-color: color-mix(in srgb, var(--vscode-foreground) 3%, var(--session-view-background, var(--vscode-editor-background)));
}

:is(.hc-black, .hc-light) .new-session-getting-started-tip-below .chat-input-notice {
	border-color: var(--vscode-contrastBorder);
	background-color: var(--vscode-editor-background);
}

.agent-sessions-workbench.phone-layout .new-session-below-input-surfaces {
	position: static;
	order: 1;
	flex: 0 1 auto;
	min-height: 0;
	margin: 0 0 var(--vscode-spacing-size200);
}

.new-chat-session-options .new-chat-session-options-details {
	display: flex;
	flex: 0 0 auto;
	flex-wrap: nowrap;
	align-items: center;
	gap: var(--vscode-spacing-size80);
	min-width: 0;
	width: max-content;
	margin-left: var(--vscode-spacing-size80);
	interpolate-size: allow-keywords;
	overflow: clip;
	transition: width 180ms ease-out, margin-left 180ms ease-out, opacity 180ms ease-out, display 180ms allow-discrete;
}

.new-chat-session-options .new-chat-session-options-details[hidden] {
	display: none;
	width: 0;
	margin-left: 0;
	opacity: 0;
}

@starting-style {
	.new-chat-session-options .new-chat-session-options-details:not([hidden]) {
		width: 0;
		margin-left: 0;
		opacity: 0;
	}
}

.monaco-reduce-motion .new-chat-session-options .new-chat-session-options-details {
	transition: none;
}

/* Intrinsic sizing must measure the final expanded width, not the reveal transition. */
.chat-input-picker-measurement-host .new-chat-session-options .new-chat-session-options-details {
	transition: none;
}

@media (prefers-reduced-motion: reduce) {
	.new-chat-session-options .new-chat-session-options-details {
		transition: none;
	}
}

.new-chat-session-options .monaco-button.new-chat-session-options-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: var(--vscode-spacing-size240);
	height: var(--vscode-spacing-size240);
	margin-left: var(--vscode-spacing-size80);
	padding: 0;
	border: 0;
	border-radius: var(--vscode-cornerRadius-small);
	color: var(--vscode-descriptionForeground);
	font-size: var(--vscode-codiconFontSize-compact);
	cursor: pointer;
}

/*
 * The disclosure toggle sets its `hidden` attribute when the experimental composer layout is off
 * (or a screen reader is active). The base `.monaco-text-button { display: flex }` rule would
 * otherwise override the user-agent `[hidden]` behavior and keep the chevron visible, changing the
 * layout when the feature is disabled. Honor `hidden` explicitly.
 */
.new-chat-widget-container .monaco-button.new-chat-session-options-toggle[hidden] {
	display: none;
}

.new-chat-session-options .monaco-button.new-chat-session-options-toggle:hover {
	background-color: var(--vscode-toolbar-hoverBackground);
	color: var(--vscode-foreground);
}

.new-chat-session-options .monaco-button.new-chat-session-options-toggle:focus:not(:focus-visible),
.new-chat-widget-container .new-chat-session-options .action-label:focus:not(:focus-visible) {
	outline: none;
}

.new-chat-session-options .monaco-button.new-chat-session-options-toggle:focus-visible,
.new-chat-widget-container .new-chat-session-options .action-label:focus-visible,
.monaco-workbench .new-chat-widget-container .new-chat-session-options .monaco-action-bar .action-item .action-label:focus-visible {
	outline: var(--vscode-strokeThickness) solid var(--vscode-focusBorder);
	outline-offset: calc(-1 * var(--vscode-strokeThickness));
}

.new-chat-widget-container .new-chat-session-options :is(.sessions-chat-picker-slot, .new-chat-repo-config-container) .action-label:not(.separator) {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: var(--vscode-spacing-size60);
	height: var(--vscode-spacing-size240);
	min-height: var(--vscode-spacing-size240);
	padding: var(--vscode-spacing-size20) var(--vscode-spacing-size60);
	background: transparent;
	border: var(--vscode-strokeThickness) solid transparent;
	border-radius: var(--vscode-cornerRadius-small);
	color: var(--vscode-descriptionForeground);
	font-size: var(--vscode-fontSize-label1);
	line-height: var(--vscode-spacing-size160);
}

.new-chat-widget-container .new-chat-session-options :is(.sessions-chat-picker-slot, .new-chat-repo-config-container) .action-label:not([aria-disabled='true'], [aria-readonly='true']):is(:hover, [aria-expanded='true']) {
	background: var(--vscode-toolbar-hoverBackground);
	border-color: var(--vscode-contrastBorder, transparent);
	color: var(--vscode-foreground);
}

.new-chat-widget-container .new-chat-session-options :is(.sessions-chat-picker-slot, .new-chat-repo-config-container) .action-label:not([aria-disabled='true'], [aria-readonly='true']):active,
.new-chat-session-options .monaco-button.new-chat-session-options-toggle:active {
	background: var(--vscode-toolbar-activeBackground, var(--vscode-toolbar-hoverBackground));
}

.new-chat-widget-container .new-chat-session-options .new-chat-repo-config-container .monaco-action-bar .actions-container {
	gap: var(--vscode-spacing-size80);
}

.new-chat-widget-container .new-chat-session-options .new-chat-repo-config-container .action-item {
	margin: 0;
}

.new-chat-session-options .action-item.repository-config-separator,
.new-chat-session-options .sessions-workspace-category-picker-slot .sessions-chat-dropdown-chevron {
	display: none;
}

.new-chat-session-options .sessions-chat-dropdown-label {
	margin-left: 0;
}

/* Collapsed icon rail: keep the repository and harness pickers as icons only, so they
	stay reachable without their labels taking up space. The workspace picker keeps its
	label as the composer's anchor. */
.new-chat-session-options .new-chat-session-options-details.collapsed-icon-rail .sessions-chat-dropdown-label {
	display: none;
}

.new-chat-session-options .new-chat-repo-config-container {
	flex-shrink: 0;
}

.new-chat-session-options > .sessions-chat-picker-slot {
	min-width: 0;
}

.new-chat-widget-content {
	width: 100%;
	max-width: 800px;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	align-self: center;
}

/* Flex centering shares attachment growth above and below the midpoint. Offset
 * that growth so the bottom controls stay anchored and the composer grows up. */
.sessions-chat-widget > .new-chat-widget-container > .new-chat-widget-content {
	position: relative;
	/* Composer controls take precedence over the blank session drag strip. */
	z-index: 1;
}

.new-session-welcome-message {
	align-self: center;
	align-items: center;
	display: flex;
	gap: var(--vscode-spacing-size40);
	justify-content: center;
	margin-bottom: var(--vscode-spacing-size400);
	position: relative;
	text-align: center;
}

.new-session-welcome-message[hidden] {
	display: none;
}

.new-session-welcome-message-title {
	color: var(--vscode-foreground);
	font-size: var(--vscode-fontSize-heading1);
	font-weight: var(--vscode-fontWeight-semiBold);
	line-height: 1.4;
	margin: 0;
}

.new-session-welcome-pet-platform {
	display: none;
	position: absolute;
	top: 0;
	height: var(--vscode-spacing-size40);
	box-sizing: content-box;
	padding-inline: var(--vscode-spacing-size40);
	border: var(--vscode-strokeThickness) solid var(--vscode-contrastBorder, transparent);
	border-radius: var(--vscode-cornerRadius-circle);
	background-color: var(--vscode-descriptionForeground);
	pointer-events: none;
	transform: translate(-50%, -50%);
}

.new-session-welcome-message-title.chat-pet-platform-occupied + .new-session-welcome-pet-platform {
	display: block;
}

.new-session-welcome-message-actions {
	left: 100%;
	opacity: 0;
	padding-left: var(--vscode-spacing-size40);
	position: absolute;
}

.new-session-welcome-message:hover .new-session-welcome-message-actions,
.new-session-welcome-message:focus-within .new-session-welcome-message-actions {
	opacity: 1;
}

.new-chat-widget-container .new-chat-bottom-container {
	width: 100%;
	max-width: 800px;
	margin-top: var(--vscode-spacing-size40);
	padding: 0 var(--vscode-spacing-size40);
	box-sizing: border-box;
	display: none;
	flex-direction: row;
	align-items: center;
	gap: var(--vscode-spacing-size20);
	min-height: var(--vscode-spacing-size280);
	justify-content: space-between;
}

.experimental-new-session-composer .new-chat-bottom-container {
	justify-content: flex-end;
}

.new-chat-widget-container.revealed .new-chat-bottom-container {
	display: flex;
}

.new-chat-widget-container.revealed .new-chat-bottom-container.empty {
	display: none;
}

.agent-sessions-workbench:not(.phone-layout) .new-chat-widget-container .new-chat-bottom-container {
	overflow: hidden;
}

.new-chat-widget-container .new-chat-bottom-container .new-chat-secondary-controls-container,
.new-chat-widget-container .new-chat-repo-config-container {
	display: flex;
	align-items: center;
	gap: var(--vscode-spacing-size20);
	min-width: 0;
	overflow: hidden;
}

.new-chat-widget-container .new-chat-repo-config-container {
	.monaco-action-bar .actions-container {
		gap: 0;
	}

	.action-label:not(.separator) {
		background: transparent;
	}

	.sync-changes-action-view-item {
		display: flex;
		align-items: center;
		gap: var(--vscode-spacing-size60);

		> .codicon {
			color: inherit;
		}
	}
}

.new-chat-widget-container .new-chat-bottom-container .new-chat-repo-config-container .action-label:not(.separator):is(:hover, [aria-expanded='true']) {
	background-image: unset !important;
	background-color: var(--vscode-toolbar-activeBackground, var(--vscode-toolbar-hoverBackground)) !important;
	color: var(--vscode-foreground);

	> .codicon {
		color: inherit;
	}
}

.new-chat-widget-container .new-chat-repo-config-container.has-no-actions {
	display: none;
}

.new-chat-widget-container .new-chat-bottom-container .new-chat-repo-config-container:hover,
.new-chat-widget-container .new-chat-bottom-container .new-chat-repo-config-container[data-picker-open='true'] {
	background-color: var(--vscode-toolbar-hoverBackground);
	border-radius: var(--vscode-cornerRadius-small);
}

.new-chat-widget-container .new-chat-bottom-container .new-chat-status-toolbar.has-no-actions {
	display: none;
}

/* Toolbar hosts can shrink, while individual expanded pickers remain intrinsic
 * and switch to compact form before their labels would truncate. */
.new-chat-widget-container .new-chat-bottom-container .new-chat-secondary-controls-container > *,
.new-chat-widget-container .new-chat-repo-config-container > * {
	min-width: 0;
	overflow: hidden;
}

/* Expanded picker controls never shrink or ellipsize. */
.agent-sessions-workbench:not(.phone-layout) .new-chat-widget-container .new-chat-bottom-container .monaco-action-bar .action-item:not(.compact-picker),
.agent-sessions-workbench:not(.phone-layout) .new-chat-widget-container .new-chat-bottom-container .sessions-chat-picker-slot:not(.compact-picker),
.agent-sessions-workbench:not(.phone-layout) .new-chat-widget-container .new-chat-bottom-container .sessions-chat-picker-slot:not(.compact-picker) .action-label {
	flex-shrink: 0;
	min-width: 30px;
	overflow: visible;
}

.agent-sessions-workbench:not(.phone-layout) .new-chat-widget-container .new-chat-bottom-container .monaco-action-bar .action-item.repository-config-separator,
.agent-sessions-workbench:not(.phone-layout) .experimental-new-session-composer .new-chat-repo-config-container .monaco-action-bar .action-item.repository-config-separator {
	min-width: 0;
}

.new-chat-widget-container .new-chat-bottom-container .monaco-action-bar .action-item.repository-config-separator .action-label.separator,
.experimental-new-session-composer .new-chat-repo-config-container .monaco-action-bar .action-item.repository-config-separator .action-label.separator {
	background-color: var(--vscode-widget-border, var(--vscode-editorWidget-border, transparent));
	height: var(--vscode-spacing-size120);
	margin: 0 !important;
}

.agent-sessions-workbench:not(.phone-layout) .new-chat-widget-container .new-chat-bottom-container .sessions-chat-picker-slot:not(.compact-picker) .sessions-chat-dropdown-label,
.agent-sessions-workbench:not(.phone-layout) .new-chat-widget-container .new-chat-bottom-container .sessions-chat-picker-slot:not(.compact-picker) .chat-session-option-label {
	flex-shrink: 0;
	overflow: visible;
	text-overflow: clip;
	white-space: nowrap;
}

/* Individual picker controls collapse from right to left as their row runs out of room. */
.new-chat-widget-container .compact-picker .sessions-chat-dropdown-label {
	display: none;
}

.new-chat-widget-container .compact-picker .sessions-chat-sandbox-icon {
	display: none;
}

.agent-sessions-workbench:not(.phone-layout) .new-chat-widget-container .new-chat-bottom-container .compact-picker.action-item,
.agent-sessions-workbench:not(.phone-layout) .new-chat-widget-container .new-chat-bottom-container .compact-picker.sessions-chat-picker-slot {
	box-sizing: border-box;
	width: var(--chat-input-control-height);
	height: var(--chat-input-control-height);
	min-width: var(--chat-input-control-height);
	padding: 0;
}

.agent-sessions-workbench:not(.phone-layout) .new-chat-widget-container .new-chat-bottom-container .compact-picker.action-item .action-label,
.agent-sessions-workbench:not(.phone-layout) .new-chat-widget-container .new-chat-bottom-container .compact-picker.sessions-chat-picker-slot .action-label {
	box-sizing: border-box;
	width: var(--chat-input-control-height);
	height: var(--chat-input-control-height);
	min-width: var(--chat-input-control-height);
	justify-content: center;
	padding: 0;
}

.agent-sessions-workbench:not(.phone-layout) .new-chat-widget-container .new-chat-bottom-container .compact-picker.sessions-chat-picker-slot .action-label > .codicon {
	width: var(--vscode-codiconFontSize-compact);
	height: var(--vscode-codiconFontSize-compact);
	line-height: var(--vscode-codiconFontSize-compact);
}

.agent-sessions-workbench:not(.phone-layout) .new-chat-widget-container .new-chat-bottom-container .compact-picker.sessions-chat-checkbox-chip .monaco-checkbox {
	width: 12px;
	height: 12px;
	margin-right: 0;
}

/* Spacing between action items inside the bottom-row toolbars (e.g. Worktree, branch) */
.new-chat-widget-container .new-chat-bottom-container .monaco-action-bar .actions-container,
.experimental-new-session-composer .new-chat-repo-config-container .monaco-action-bar .actions-container {
	gap: var(--vscode-spacing-size20);
}

/* Match VS Code chat-secondary-toolbar sizing for action items in the bottom row
 * (e.g. session control pickers and repo config pickers) so they align with the
 * model picker font in the input toolbar. Each item carries its own opaque
 * surface so a chat background cannot show through it. */
.new-chat-widget-container .new-chat-bottom-container .action-label,
.experimental-new-session-composer .new-chat-repo-config-container .action-label {
	box-sizing: border-box;
	height: var(--chat-input-control-height);
	align-items: center;
	padding: 0 var(--vscode-spacing-size40);
	font-size: var(--vscode-fontSize-label2, 11px);
	color: var(--vscode-icon-foreground);
	background-color: var(--session-view-background);
}

.experimental-new-session-composer .new-chat-repo-config-container .action-label:not(.separator) {
	background-color: transparent;
}

.experimental-new-session-composer .new-chat-repo-config-container .codicon::before {
	font-size: var(--vscode-codiconFontSize-compact);
}

.new-chat-bottom-container .sessions-chat-picker-slot > .action-label.agent-host-mode-permissions-trigger {
	padding: 0;
}

.new-chat-bottom-container .agent-host-mode-picker-button:active {
	background-color: var(--vscode-toolbar-hoverBackground);
}

/* Over a chat background, use the same opaque secondary-control surface as the
 * in-session toolbar rather than relying on the transparent session view. */
.monaco-workbench.agent-sessions-workbench .part.sessionspart.has-chat-background .new-chat-widget-container .new-chat-bottom-container .action-label:not(.separator),
.monaco-workbench.agent-sessions-workbench .part.sessionspart.has-chat-background .new-chat-widget-container .experimental-new-session-composer .sessions-chat-picker-slot.sessions-workspace-category-picker-slot:not(.new-chat-session-options *) .action-label {
	background-color: var(--vscode-chat-list-background, var(--session-view-background));
	background-image: linear-gradient(var(--vscode-button-secondaryBackground), var(--vscode-button-secondaryBackground));
	border: var(--vscode-strokeThickness) solid var(--vscode-button-secondaryBorder);
	border-radius: var(--vscode-cornerRadius-small);
	color: var(--vscode-button-secondaryForeground);
}

.monaco-workbench.agent-sessions-workbench .part.sessionspart.has-chat-background .new-chat-widget-container .new-chat-bottom-container .new-chat-repo-config-container .monaco-action-bar {
	box-sizing: border-box;
	height: var(--chat-input-control-height);
	background-color: var(--vscode-chat-list-background, var(--session-view-background));
	background-image: linear-gradient(var(--vscode-button-secondaryBackground), var(--vscode-button-secondaryBackground));
	border: var(--vscode-strokeThickness) solid var(--vscode-button-secondaryBorder);
	border-radius: var(--vscode-cornerRadius-small);
	color: var(--vscode-button-secondaryForeground);
}

.monaco-workbench.agent-sessions-workbench .part.sessionspart.has-chat-background .new-chat-widget-container .new-chat-bottom-container .new-chat-repo-config-container .monaco-action-bar .action-label:not(.separator) {
	background-color: transparent;
	background-image: none;
	border: none;
}

.new-chat-session-options .new-chat-repo-config-container .monaco-action-bar {
	height: var(--vscode-spacing-size240);
}

.monaco-workbench.agent-sessions-workbench .part.sessionspart.has-chat-background .new-chat-widget-container .new-chat-bottom-container .new-chat-repo-config-container:hover .monaco-action-bar,
.monaco-workbench.agent-sessions-workbench .part.sessionspart.has-chat-background .new-chat-widget-container .new-chat-bottom-container .new-chat-repo-config-container[data-picker-open='true'] .monaco-action-bar {
	background-image: linear-gradient(var(--vscode-button-secondaryHoverBackground), var(--vscode-button-secondaryHoverBackground));
}

.monaco-workbench.agent-sessions-workbench .part.sessionspart.has-chat-background .new-chat-widget-container .new-chat-bottom-container .action-label:not(.agent-host-mode-permissions-trigger):not(.disabled):hover,
.monaco-workbench.agent-sessions-workbench .part.sessionspart.has-chat-background .new-chat-widget-container .experimental-new-session-composer .sessions-chat-picker-slot.sessions-workspace-category-picker-slot:not(.new-chat-session-options *) .action-label:not(.disabled):hover,
.monaco-workbench.agent-sessions-workbench .part.sessionspart.has-chat-background .new-chat-widget-container .experimental-new-session-composer .sessions-chat-picker-slot.sessions-workspace-category-picker-slot:not(.new-chat-session-options *) .action-label[aria-expanded='true'] {
	background-image: linear-gradient(var(--vscode-button-secondaryHoverBackground), var(--vscode-button-secondaryHoverBackground));
}

.monaco-workbench.agent-sessions-workbench .part.sessionspart.has-chat-background .new-chat-widget-container .new-chat-bottom-container .action-label.agent-host-mode-permissions-trigger:hover,
.monaco-workbench.agent-sessions-workbench .part.sessionspart.has-chat-background .new-chat-widget-container .new-chat-bottom-container .action-label.agent-host-mode-permissions-trigger[data-mode-permissions-picker-open='true'] {
	background-image: linear-gradient(var(--vscode-button-secondaryHoverBackground), var(--vscode-button-secondaryHoverBackground));
}

/* Outranks the shared action-bar hover in workbench style.css, which would
 * otherwise swap the opaque surface for a translucent one. The tint goes on the
 * background-image layer so it composites over that surface. */
.monaco-workbench.agent-sessions-workbench .new-chat-widget-container .new-chat-bottom-container .action-label:not(.agent-host-mode-permissions-trigger):not(.disabled):hover {
	background-color: var(--session-view-background);
	background-image: linear-gradient(var(--vscode-toolbar-hoverBackground), var(--vscode-toolbar-hoverBackground));
}

.new-chat-widget-container .new-chat-bottom-container .action-label > .codicon {
	font-size: var(--vscode-codiconFontSize-compact, 12px);
	width: auto;
	height: auto;
}

.new-chat-widget-container .new-chat-bottom-container .action-label > .codicon-chevron-down,
.new-chat-widget-container .new-chat-bottom-container .sessions-chat-picker-slot .action-label > .codicon-chevron-down,
.new-chat-widget-container .new-chat-bottom-container .monaco-action-bar .action-item .action-label > .codicon-chevron-down {
	display: none;
}

/* Icon status actions use the compact control box; text actions remain intrinsic. */
.agent-sessions-workbench:not(.phone-layout) .new-chat-widget-container .new-chat-bottom-container .new-chat-status-toolbar .monaco-action-bar .action-item.new-chat-status-icon-action {
	width: 22px;
	min-width: 22px;
}

.agent-sessions-workbench:not(.phone-layout) .new-chat-widget-container .new-chat-bottom-container .new-chat-status-toolbar .new-chat-status-icon-action .action-label {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	min-width: 22px;
	padding: 0;
}

.agent-sessions-workbench:not(.phone-layout) .new-chat-widget-container .new-chat-bottom-container .new-chat-status-toolbar .new-chat-status-icon-action .action-label.codicon {
	font-size: var(--vscode-codiconFontSize-compact);
}

/* The category row is quiet at rest, while hover/open state reveals the active target. */
.sessions-workspace-category-picker {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-start;
	gap: var(--vscode-spacing-size80);
	width: 100%;
	box-sizing: border-box;
	padding: 0;
}

.experimental-new-session-composer .sessions-workspace-category-picker {
	justify-content: flex-start;
	gap: var(--vscode-spacing-size80) !important;
}

.experimental-new-session-composer .sessions-workspace-category-picker > .sessions-chat-session-type-picker {
	margin-left: auto;
}

.experimental-new-session-composer .sessions-workspace-category-picker .new-chat-session-options-details,
.experimental-new-session-composer .sessions-workspace-category-picker .new-chat-session-options-toggle {
	margin-left: 0;
}

.experimental-new-session-composer .sessions-workspace-category-picker .action-label > .codicon {
	font-size: var(--vscode-codiconFontSize-compact);
	width: var(--vscode-codiconFontSize-compact);
	height: var(--vscode-codiconFontSize-compact);
	line-height: var(--vscode-codiconFontSize-compact);
}

.new-chat-repository-controls-host {
	display: contents;
}

.experimental-new-session-composer .sessions-chat-picker-slot.sessions-workspace-category-picker-slot .action-label {
	min-height: var(--chat-input-control-height);
	padding: 0 var(--vscode-spacing-size40);
	background-color: transparent;
	border-color: transparent;
	border-radius: var(--vscode-cornerRadius-small);
	color: var(--vscode-icon-foreground);
	font-size: var(--vscode-fontSize-label2);
}

.experimental-new-session-composer .sessions-chat-picker-slot.sessions-workspace-category-picker-slot .action-label:hover,
.experimental-new-session-composer .sessions-chat-picker-slot.sessions-workspace-category-picker-slot .action-label[aria-expanded='true'] {
	background-color: var(--vscode-toolbar-hoverBackground);
	background-image: none;
	border-color: transparent;
}

.experimental-new-session-composer .sessions-chat-picker-slot.sessions-workspace-category-picker-slot .action-label > .codicon {
	font-size: var(--vscode-codiconFontSize-compact);
}

.sessions-workspace-category-picker-label {
	color: var(--vscode-descriptionForeground);
	font-size: var(--vscode-fontSize-body2);
}

.sessions-workspace-category-picker-slot {
	flex: 0 1 auto;
}

.sessions-chat-picker-slot > .monaco-toolbar,
.sessions-chat-picker-slot > .monaco-toolbar .action-item {
	min-width: 0;
}

.sessions-workspace-category-picker-slot[hidden] {
	display: none;
}

.sessions-chat-picker-slot.sessions-workspace-category-picker-slot .action-label {
	gap: var(--vscode-spacing-size60);
	min-height: var(--vscode-spacing-size240);
	padding: var(--vscode-spacing-size20) var(--vscode-spacing-size120);
	background-color: var(--session-view-background);
	border: var(--vscode-strokeThickness) solid var(--vscode-commandCenter-inactiveBorder, var(--vscode-widget-border));
	border-radius: var(--vscode-cornerRadius-circle);
	box-sizing: border-box;
	color: var(--vscode-descriptionForeground);
	font-size: var(--vscode-fontSize-body1);
	line-height: var(--vscode-spacing-size160);
}

/* Re-assert the opaque surface, which the generic picker-slot hover below would
 * otherwise replace, and keep the tint on the background-image layer so it
 * composites over that surface. */
.sessions-chat-picker-slot.sessions-workspace-category-picker-slot .action-label:hover,
.sessions-chat-picker-slot.sessions-workspace-category-picker-slot .action-label[aria-expanded='true'] {
	background-color: var(--session-view-background);
	background-image: linear-gradient(var(--vscode-toolbar-hoverBackground), var(--vscode-toolbar-hoverBackground));
	border-color: var(--vscode-commandCenter-activeBorder, var(--vscode-focusBorder));
	color: var(--vscode-foreground);
}

.sessions-chat-picker-slot.sessions-workspace-category-picker-slot .action-label:focus-visible {
	outline: var(--vscode-strokeThickness) solid var(--vscode-focusBorder);
	outline-offset: calc(-1 * var(--vscode-strokeThickness));
}

.sessions-chat-picker-slot.sessions-workspace-category-picker-slot .action-label > .codicon {
	font-size: var(--vscode-codiconFontSize-compact);
}

.sessions-chat-picker-slot.sessions-workspace-category-picker-slot .action-label > .sessions-chat-dropdown-chevron {
	font-size: var(--vscode-codiconFontSize-compact);
}

.experimental-new-session-composer .sessions-chat-picker-slot.sessions-workspace-category-picker-slot .action-label > .sessions-chat-dropdown-chevron {
	display: none;
}

.sessions-workspace-picker-trigger.workspace-clearable {
	position: relative;
}

.sessions-workspace-picker-trigger > .sessions-workspace-clear-button {
	position: absolute;
	left: calc(var(--vscode-spacing-size20) + var(--vscode-strokeThickness));
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--vscode-spacing-size200);
	height: var(--vscode-spacing-size200);
	border-radius: var(--vscode-cornerRadius-small);
	cursor: pointer;
	color: var(--vscode-icon-foreground);
	opacity: 0;
	pointer-events: none;
}

.sessions-workspace-picker-trigger > .sessions-workspace-clear-button:is(:hover, .hovered) {
	background-color: var(--vscode-toolbar-hoverBackground);
}

.sessions-workspace-picker-trigger > .sessions-workspace-clear-button:is(:hover, .hovered):not(:focus-visible) {
	outline: var(--vscode-strokeThickness) dashed var(--vscode-toolbar-hoverOutline);
	outline-offset: calc(-1 * var(--vscode-strokeThickness));
}

.sessions-workspace-picker-trigger > .monaco-button.sessions-workspace-clear-button.codicon::before {
	font-size: var(--vscode-codiconFontSize-compact);
}

.sessions-workspace-picker-trigger > .sessions-workspace-clear-button[hidden],
.sessions-workspace-picker-trigger.compact-picker > .sessions-workspace-clear-button {
	display: none;
}

.sessions-workspace-picker-trigger.workspace-clearable:is(:hover, .workspace-focus-visible, .workspace-picker-open) > .sessions-workspace-clear-button {
	opacity: 1;
	pointer-events: auto;
}

.sessions-workspace-picker-trigger.workspace-clearable:not(.compact-picker):is(:hover, .workspace-focus-visible, .workspace-picker-open) .action-label > .codicon:first-child {
	opacity: 0;
}

.sessions-workspace-picker-trigger > .sessions-workspace-clear-button:focus-visible {
	outline: var(--vscode-strokeThickness) solid var(--vscode-focusBorder);
	outline-offset: var(--vscode-spacing-sizeNone);
}

.action-widget .sessions-new-chat-picker-list .monaco-list-row.action .codicon {
	font-size: var(--vscode-codiconFontSize);
}

.action-widget .sessions-new-chat-picker-list.inline-description .monaco-list-row.action {
	padding-right: var(--vscode-spacing-size60);
}

.action-widget .sessions-new-chat-picker-list.inline-description .monaco-list-row.action .action-list-submenu-indicator {
	margin-right: var(--vscode-spacing-sizeNone);
}

.sessions-workspace-category-picker > .sessions-chat-picker-slot .sessions-chat-dropdown-label {
	margin-left: 0;
}

.sessions-workspace-category-picker .new-chat-repo-config-container .action-label > .codicon:not(.monaco-checkbox) {
	font-size: var(--vscode-codiconFontSize-compact);
	width: var(--vscode-codiconFontSize-compact);
	height: var(--vscode-codiconFontSize-compact);
	line-height: var(--vscode-codiconFontSize-compact);
}

.experimental-new-session-composer .sessions-workspace-category-picker .new-chat-repo-config-container .action-label:not(.separator) {
	padding-left: var(--vscode-spacing-size60);
	padding-right: var(--vscode-spacing-size60);
}

/* Phones have no hover to frame, and the tray needs the room to keep its labels. */
.agent-sessions-workbench.phone-layout .new-chat-widget-container .new-chat-session-options :is(.sessions-chat-picker-slot, .new-chat-repo-config-container) .action-label:not(.separator) {
	padding-left: var(--vscode-spacing-size40);
	padding-right: var(--vscode-spacing-size40);
}

.sessions-workspace-category-picker:empty {
	display: none;
}

.sessions-chat-dropdown-label {
	margin-left: 6px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	min-width: 0;
}

.sessions-chat-sandbox-icon {
	flex-shrink: 0;
	margin-left: var(--vscode-spacing-size60);
}

.sessions-chat-picker-slot {
	display: flex;
	align-items: center;
	min-width: 0;
	overflow: hidden;
}

.sessions-chat-picker-slot .action-label {
	display: flex;
	align-items: center;
	box-sizing: border-box;
	height: var(--chat-input-control-height);
	padding: 0 var(--vscode-spacing-size60);
	background-color: transparent;
	border: none;
	color: var(--vscode-icon-foreground);
	cursor: pointer;
	touch-action: manipulation;
	white-space: nowrap;
	border-radius: var(--vscode-cornerRadius-small);
	min-width: 0;
	overflow: hidden;
}

.sessions-chat-picker-slot[hidden],
.sessions-chat-picker-slot .action-label.hidden {
	display: none;
}

.sessions-chat-picker-slot .action-label:not(.agent-host-mode-permissions-trigger):hover {
	background-color: var(--vscode-toolbar-hoverBackground);
	color: var(--vscode-foreground);
}

.sessions-chat-picker-slot.disabled .action-label {
	opacity: 0.5;
	cursor: default;
	pointer-events: none;
}

.sessions-chat-picker-slot.disabled .action-label:hover {
	background-color: transparent;
	color: var(--vscode-icon-foreground);
}

.sessions-chat-picker-slot.resolving .action-label,
.sessions-chat-config-resolving {
	cursor: default;
	pointer-events: none;
}

.sessions-chat-picker-slot.resolving .action-label:hover {
	background-color: transparent;
	color: var(--vscode-icon-foreground);
}

.sessions-chat-picker-slot.loading .action-label {
	opacity: 0.5;
	cursor: default;
	pointer-events: none;
}

.sessions-chat-picker-slot.loading .action-label .codicon-chevron-down {
	display: none;
}

.sessions-chat-picker-slot.loading .action-label::after {
	content: '';
	display: inline-block;
	width: 12px;
	height: 12px;
	margin-left: 4px;
	border: 1.5px solid var(--vscode-descriptionForeground);
	border-top-color: transparent;
	border-radius: 50%;
	animation: sessions-chat-picker-spin 0.8s linear infinite;
	flex-shrink: 0;
}

@keyframes sessions-chat-picker-spin {
	to {
		transform: rotate(360deg);
	}
}

.interactive-input-part .sessions-chat-picker-slot .action-label .codicon {
	font-size: var(--vscode-codiconFontSize-compact, 12px);
	flex-shrink: 0;
	/* Override the base .monaco-action-bar .action-item .codicon { width:16px; height:16px }
	 * so codicons here size naturally to their font-size, matching pickers (like Copilot CLI)
	 * that are rendered outside a monaco-action-bar. */
	width: auto;
	height: auto;
}

.sessions-chat-picker-slot .action-label .codicon-chevron-down {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: var(--vscode-codiconFontSize-compact);
	margin-left: 2px;
	line-height: 1;
	width: 12px;
	height: 12px;
}

.sessions-chat-picker-slot .action-label .chat-session-option-label {
	overflow: hidden;
	text-overflow: ellipsis;
}

.sessions-chat-picker-slot .action-label .monaco-count-badge {
	min-width: var(--vscode-spacing-size160);
	min-height: var(--vscode-spacing-size160);
	padding: var(--vscode-spacing-size20);
	border-radius: var(--vscode-cornerRadius-circle);
	font-size: var(--vscode-fontSize-label3);
	line-height: normal;
}

.sessions-chat-picker-slot .action-label span + .chat-session-option-label {
	margin-left: 2px;
}

.sessions-chat-picker-slot .action-label.warning {
	color: var(--vscode-problemsWarningIcon-foreground);
}

.sessions-chat-picker-slot .action-label.warning .codicon {
	color: var(--vscode-problemsWarningIcon-foreground) !important;
}

.sessions-chat-picker-slot .action-label.info {
	color: var(--vscode-problemsInfoIcon-foreground);
}

.sessions-chat-picker-slot .action-label.info .codicon {
	color: var(--vscode-problemsInfoIcon-foreground) !important;
}

/* Inline browse actions (e.g. "Select Folders…" entries in the Remote group):
 * show the host name as the primary label and only reveal the secondary
 * "Select Folders…" description on hover/focus to reduce repetition. */
.action-widget .monaco-list-row.action.sessions-browse-inline-item .description {
	visibility: hidden;
}

.action-widget .monaco-list-row.action.sessions-browse-inline-item:hover:not(.option-disabled) .description,
.action-widget .monaco-list-row.action.sessions-browse-inline-item.focused:not(.option-disabled) .description {
	visibility: visible;
}
