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

.scm-view {
	height: 100%;
	position: relative;
}

.scm-view .monaco-tl-contents > div {
	margin-right: 12px;
	overflow: hidden;
}

.scm-view .count {
	display: flex;
	margin-left: 6px;
}

.scm-view .count.hidden {
	display: none;
}

.scm-view .scm-provider {
	display: flex;
	flex-direction: column;
	height: 100%;
	align-items: center;
	flex-flow: nowrap;
}

.scm-view.hide-provider-counts .scm-provider > .count,
.scm-view.auto-provider-counts .scm-provider > .count[data-count="0"] {
	display: none;
}

.scm-view .scm-provider > .label {
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
}

.scm-view .scm-provider > .label > .name {
	font-weight: bold;
}

.scm-view .scm-provider > .label > .description {
	opacity: 0.7;
	margin-left: 0.5em;
	font-size: 0.9em;
}

.scm-view .scm-provider > .actions {
	overflow: hidden;
	justify-content: flex-end;
}

/**
 * The following rules are very specific because of inline drop down menus
 * https://github.com/microsoft/vscode/issues/101410
 */
.scm-view .scm-provider > .actions > .monaco-toolbar > .monaco-action-bar > .actions-container > .action-item {
	padding-left: 4px;
	display: flex;
	align-items: center;
	min-width: 16px;
}

.scm-view .scm-provider > .actions > .monaco-toolbar > .monaco-action-bar > .actions-container  > .action-item > .action-label,
.scm-view .scm-provider > .actions > .monaco-toolbar > .monaco-action-bar > .actions-container  > .action-item > .monaco-dropdown > .dropdown-label > .action-label {
	display: flex;
	align-items: center;
	overflow: hidden;
	min-width: 16px; /* for flex */
	height: 100%;
	margin: 0;
	background-repeat: no-repeat;
	background-position: center;
}

.scm-view .scm-provider > .actions > .monaco-toolbar > .monaco-action-bar > .actions-container  > .action-item > .action-label > .codicon {
	font-size: 12px;
	margin-right: 2px;
}

.scm-view .scm-provider > .actions > .monaco-toolbar > .monaco-action-bar > .actions-container > .action-item:last-of-type {
	padding-right: 0;
}

.scm-view .scm-provider > .body {
	flex-grow: 1;
}

.scm-view .monaco-list-row {
	line-height: 22px;
}

.scm-view .monaco-list-row .resource-group {
	display: flex;
	height: 100%;
	align-items: center;
}

.scm-view .monaco-list-row .resource-group > .name {
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
}

.scm-view .monaco-list-row .resource {
	display: flex;
	height: 100%;
}

.scm-view .monaco-list-row .resource.faded {
	opacity: 0.7;
}

.scm-view .monaco-list-row .resource > .name {
	flex: 1;
	overflow: hidden;
}

.scm-view .monaco-list-row .resource > .name > .monaco-icon-label::after {
	padding-right: 3px;
}

.scm-view .monaco-list-row .resource > .name.strike-through > .monaco-icon-label > .monaco-icon-label-container > .monaco-icon-name-container > .label-name {
	text-decoration: line-through;
}

.scm-view .monaco-list-row .resource > .decoration-icon {
	width: 16px;
	height: 100%;
	background-repeat: no-repeat;
	background-position: 50% 50%;
	margin-right: 8px;
}

.scm-view .monaco-list .monaco-list-row .resource > .name > .monaco-icon-label > .actions {
	flex-grow: 100;
}

.scm-view .monaco-list .monaco-list-row .resource-group > .actions,
.scm-view .monaco-list .monaco-list-row .resource > .name > .monaco-icon-label > .actions {
	display: none;
	max-width: fit-content;
}

.scm-view .monaco-list .monaco-list-row:hover .resource-group > .actions,
.scm-view .monaco-list .monaco-list-row.selected .resource-group > .actions,
.scm-view .monaco-list .monaco-list-row.focused .resource-group > .actions,
.scm-view .monaco-list .monaco-list-row:hover .resource > .name > .monaco-icon-label > .actions,
.scm-view .monaco-list .monaco-list-row.selected .resource > .name > .monaco-icon-label > .actions,
.scm-view .monaco-list .monaco-list-row.focused .resource > .name > .monaco-icon-label > .actions,
.scm-view .monaco-list:not(.selection-multiple) .monaco-list-row .resource:hover > .actions {
	display: block;
}

.scm-view.show-actions .scm-provider > .actions,
.scm-view.show-actions > .monaco-list .monaco-list-row .resource-group > .actions,
.scm-view.show-actions > .monaco-list .monaco-list-row .resource > .name > .monaco-icon-label > .actions {
	display: block;
}

.scm-view .monaco-list-row .resource > .name > .monaco-icon-label > .actions .action-label,
.scm-view .monaco-list-row .resource-group > .actions .action-label {
	width: 16px;
	height: 100%;
	background-position: 50% 50%;
	background-repeat: no-repeat;
}

.scm-view .monaco-list-row .resource > .name > .monaco-icon-label > .actions .action-label.codicon {
	line-height: 22px;
}

.scm-view .scm-input {
	height: 100%;
	margin-left: 9px;
}

.scm-view .scm-editor {
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.scm-view .scm-editor.hidden {
	display: none;
}

.scm-view .scm-editor-container {
	position: relative;
	box-sizing: border-box;
	padding: 1px;
	outline-offset: -1px;
}

.scm-editor-validation {
	box-sizing: border-box;
	font-size: 0.9em;
	padding: 1px 3px;
	display: block;
	border-width: 1px;
	border-style: solid;
	border-top: none;
}

.scm-view .scm-editor-placeholder {
	position: absolute;
	pointer-events: none;
	z-index: 1;
	padding: 2px 4px 3px 4px;
	box-sizing: border-box;
	width: 100%;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.scm-view .scm-editor-placeholder.hidden {
	display: none;
}

.scm-view .scm-editor-container .monaco-editor-background,
.scm-view .scm-editor-container .monaco-editor,
.scm-view .scm-editor-container .mtk1 {
	color: inherit;
}

/* Repositories */

.scm-repositories-view .scm-provider {
	margin: 0 12px 0 20px;
	overflow: hidden;
}

.scm-repositories-view .scm-provider > .label > .name {
	font-weight: normal;
}
