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

.chat-confirmation-widget {
	border: 1px solid var(--vscode-chat-requestBorder);
	border-radius: 4px;
	padding: 3px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
}

.chat-confirmation-widget:not(:last-child) {
	margin-bottom: 16px;
}

.chat-confirmation-widget .chat-confirmation-widget-title  {
	display: flex;
	align-items: center;
	width: 100%;
	border-radius: 3px;
	padding: 3px 8px;
	user-select: none;
	gap: 4px;
	border: none;
}

.chat-confirmation-widget .chat-confirmation-widget-title.expandable {
	cursor: pointer;
	margin-left: 0;
}

.chat-confirmation-widget .chat-confirmation-widget-title-inner  {
	flex-grow: 1;
	flex-basis: 0;
}

.chat-confirmation-widget .chat-confirmation-widget-title-icon  {
	line-height: 0;
}

.chat-confirmation-widget .chat-confirmation-widget-title p,
.chat-confirmation-widget .chat-confirmation-widget-title .rendered-markdown {
	display: inline;
}

.chat-confirmation-widget .chat-confirmation-widget-title p {
	margin: 0 !important;
}
.chat-confirmation-widget .chat-confirmation-widget-title .codicon-check {
	color: var(--vscode-debugIcon-startForeground) !important;
}
.chat-confirmation-widget .chat-confirmation-widget-title .codicon-error {
	color: var(--vscode-errorForeground) !important;
}

.chat-confirmation-widget .chat-confirmation-widget-title .chat-confirmation-widget-expando {
	display: flex;
	align-items: center;
}

.chat-confirmation-widget .chat-confirmation-widget-title.monaco-button {
	&:hover {
		background: var(--vscode-toolbar-hoverBackground);
	}

	&:active {
		background: var(--vscode-toolbar-activeBackground);
	}

	.monaco-button-mdlabel {
		display: flex;
		width: 100%;
		text-align: left;
		align-items: center;
	}
}

.chat-confirmation-widget-message h3 {
	font-weight: 600;
	margin: 4px 0 8px;
	font-size: 14px;
}

.chat-confirmation-widget .chat-confirmation-widget-title .rendered-markdown p a {
	color: inherit;
}

.chat-confirmation-widget-title small {
	font-size: 1em;
	opacity: 0.85;

	&::before {
		content: ' \2013  ';
	}
}

.chat-confirmation-widget .chat-buttons-container,
.chat-confirmation-widget .chat-confirmation-widget-message {
	flex-basis: 100%;
	padding: 0 8px;
	margin: 8px 0;

	&:last-child {
		margin-bottom: 0;
	}
}

.chat-confirmation-widget.collapsed .chat-confirmation-widget-message {
	display: none;
}

.chat-confirmation-widget .chat-confirmation-widget-message .rendered-markdown p {
	margin-top: 0;
}

.chat-confirmation-widget .chat-confirmation-widget-message .rendered-markdown > :last-child {
	margin-bottom: 0px;
}

.chat-confirmation-widget .chat-confirmation-widget-message .see-more {
	margin-top: -4px;

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

.chat-confirmation-widget .chat-buttons-container:last-child {
	margin-bottom: 8px;
}

.chat-confirmation-widget.hideButtons .chat-buttons-container {
	display: none;
}

.chat-collapsible-io-resource-group {
	display: flex;
	gap: 8px;
	align-items: center;
	margin-bottom: 8px !important;

	.chat-collapsible-io-resource-items {
		display: flex;
		align-items: center;

		.chat-attached-context {
			margin-bottom: 0 !important;
		}
	}
}
