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

/* Container */

/* Editor depth shadows - the ::after pseudo-element draws inset shadows on each edge,
 * creating the illusion that sidebar, panel, and auxiliarybar float above it. */
.monaco-workbench.vs .part.editor {
	position: relative;
}

.monaco-workbench.vs .part.editor::after {
	content: '';
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 10;
	box-shadow:
		inset var(--vscode-shadow-depth-x),
		inset calc(-1 * 5px) 0 10px -4px rgba(0, 0, 0, 0.04),
		inset 0 calc(-1 * 5px) 10px -4px rgba(0, 0, 0, 0.05);
}

/* When sidebar is on the right, flip the stronger shadow to the right edge */
.monaco-workbench.sidebar-right.vs .part.editor::after {
	box-shadow:
		inset 5px 0 10px -4px rgba(0, 0, 0, 0.04),
		inset calc(-1 * 5px) 0 10px -4px rgba(0, 0, 0, 0.05),
		inset 0 calc(-1 * 5px) 10px -4px rgba(0, 0, 0, 0.05);
}

/* Panel positions: strengthen the shadow on whichever edge faces the panel */
.monaco-workbench.panel-position-left.vs .part.editor::after {
	box-shadow:
		inset var(--vscode-shadow-depth-x),
		inset calc(-1 * 5px) 0 10px -4px rgba(0, 0, 0, 0.04);
}

.monaco-workbench.panel-position-right.vs .part.editor::after {
	box-shadow:
		inset 5px 0 10px -4px rgba(0, 0, 0, 0.04),
		inset calc(-1 * 5px) 0 10px -4px rgba(0, 0, 0, 0.05);
}

.monaco-workbench.panel-position-top.vs .part.editor::after {
	box-shadow:
		inset var(--vscode-shadow-depth-x),
		inset calc(-1 * 5px) 0 10px -4px rgba(0, 0, 0, 0.04),
		inset 0 var(--vscode-shadow-depth-y);
}

.monaco-workbench .part.editor > .content .editor-group-container {
	height: 100%;
}

.monaco-workbench .part.editor > .content .editor-group-container.empty  {
	opacity: 0.5; /* dimmed to indicate inactive state */
}

.monaco-workbench .part.editor > .content .editor-group-container.empty.active,
.monaco-workbench .part.editor > .content .editor-group-container.empty.dragged-over {
	opacity: 1; /* indicate active/dragged-over group through undimmed state */
}

.monaco-workbench .part.editor > .content:not(.empty) .editor-group-container.empty.active:focus {
	outline-offset: -2px;
	outline: 1px solid var(--vscode-editorGroup-focusedEmptyBorder);
}

.monaco-workbench .part.editor > .content.empty .editor-group-container.empty.active:focus {
	outline: none; /* never show outline for empty group if it is the last */
}

/* Watermark & shortcuts */

.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-watermark  {
	display: flex;
	height: 100%;
	max-width: 272px;
	margin: auto;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-watermark > .watermark-container {
	display: flex;
	width: 100%;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 24px;
}

.monaco-workbench .part.editor > .content .editor-group-container:not(.empty) > .editor-group-watermark {
	display: none;
}

.monaco-workbench .part.editor > .content:not(.empty) .editor-group-container.empty > .editor-group-watermark,
.monaco-workbench .part.editor > .content.auxiliary .editor-group-container.empty > .editor-group-watermark {
	max-width: 200px;
	height: calc(100% - 70px);
}

.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-watermark .letterpress {
	width: 100%;
	max-height: 100%;
	aspect-ratio: 1/1;
	background-image: url('./letterpress-light.svg');
	background-size: contain;
	background-position-x: center;
	background-repeat: no-repeat;
	max-width: 256px;
}

.monaco-workbench.vs-dark .part.editor > .content .editor-group-container .editor-group-watermark .letterpress {
	background-image: url('./letterpress-dark.svg');
}

.monaco-workbench.hc-light .part.editor > .content .editor-group-container .editor-group-watermark .letterpress {
	background-image: url('./letterpress-hcLight.svg');
}

.monaco-workbench.hc-black .part.editor > .content .editor-group-container .editor-group-watermark .letterpress {
	background-image: url('./letterpress-hcDark.svg');
}

.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-watermark .shortcuts {
	width: 100%;
}

.monaco-workbench .part.editor > .content:not(.empty) .editor-group-container > .editor-group-watermark .shortcuts,
.monaco-workbench .part.editor > .content.auxiliary .editor-group-container > .editor-group-watermark .shortcuts,
.monaco-workbench .part.editor > .content .editor-group-container.max-height-478px > .editor-group-watermark .shortcuts {
	display: none;
}

.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-watermark .shortcuts > .watermark-box {
	display: flex;
	flex-direction: column;
}

.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-watermark .shortcuts dl {
	display: flex;
	justify-content: space-between;
	margin: 4px 0;
	cursor: default;
	color: var(--vscode-descriptionForeground);
}

.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-watermark .shortcuts dl:first-of-type {
	margin-top: 0;
}

.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-watermark .shortcuts dl:last-of-type {
	margin-bottom: 0;
}

.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-watermark .shortcuts dt {
	letter-spacing: 0.04em;
}

.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-watermark .shortcuts dd {
	text-align: left;
	margin-inline-start: 24px;
}

/* Title */

.monaco-workbench .part.editor > .content .editor-group-container > .title {
	position: relative;
	box-sizing: border-box;
	overflow: hidden;
}

.monaco-workbench .part.editor > .content .editor-group-container > .title:not(.tabs) {
	display: flex; /* when tabs are not shown, use flex layout */
	flex-wrap: nowrap;
}

.monaco-workbench .part.editor > .content .editor-group-container > .title.title-border-bottom::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	z-index: 9;
	pointer-events: none;
	background-color: var(--title-border-bottom-color);
	width: 100%;
	height: 1px;
}

.monaco-workbench .part.editor > .content .editor-group-container.empty > .title {
	display: none;
}

/* Toolbar */

.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-container-toolbar {
	display: none;
	height: 35px;
}

.monaco-workbench .part.editor > .content .editor-group-container.empty.locked > .editor-group-container-toolbar,
.monaco-workbench .part.editor > .content:not(.empty) .editor-group-container.empty > .editor-group-container-toolbar,
.monaco-workbench .part.editor > .content.auxiliary .editor-group-container.empty > .editor-group-container-toolbar {
	display: block; /* show toolbar when more than one editor group or always when auxiliary or locked */
}

.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-container-toolbar .actions-container {
	justify-content: flex-end;
}

.monaco-workbench .part.editor > .content .editor-group-container > .editor-group-container-toolbar .action-item {
	margin-right: 4px;
}

/* Editor */

.monaco-workbench .part.editor > .content .editor-group-container.empty > .editor-container {
	display: none;
}

.monaco-workbench .part.editor > .content .editor-group-container > .editor-container > .editor-instance {
	height: 100%;
}

.monaco-workbench .part.editor > .content .grid-view-container {
	width: 100%;
	height: 100%;
}
