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

/** Dialog: Modal Block */
.monaco-dialog-modal-block {
	position: fixed;
	height: 100%;
	width: 100%;
	left: 0;
	top: 0;
	z-index: 2575; /* Above Context Views, Below Workbench Hover */
	display: flex;
	justify-content: center;
	align-items: center;
}

.monaco-dialog-modal-block.dimmed {
	background: rgba(0, 0, 0, 0.3);
}

/** Dialog: Container */
.monaco-dialog-box {
	display: flex;
	flex-direction: column-reverse;
	width: min-content;
	min-width: 500px;
	max-width: 90vw;
	max-height: 90vh;
	min-height: 75px;
	padding: 10px;
	transform: translate3d(0px, 0px, 0px);
	border-radius: var(--vscode-cornerRadius-large);
	box-shadow: var(--vscode-shadow-xl);
}

.monaco-dialog-box.align-vertical {
	min-width: 350px; /* more narrow when aligned vertically */
}

/** Dialog: Title Actions Row */
.monaco-dialog-box .dialog-toolbar-row {
	height: 22px;
	padding-bottom: 4px;
}

.monaco-dialog-box .dialog-toolbar-row .actions-container {
	justify-content: flex-end;
}

/** Dialog: Message/Footer Row */
.monaco-dialog-box .dialog-message-row,
.monaco-dialog-box .dialog-footer-row {
	display: flex;
	flex-grow: 1;
	align-items: center;
	padding: 0 10px;
	min-height: 0; /* allow flex item to shrink below content size */
	overflow: hidden;
}

.monaco-dialog-box.align-vertical .dialog-message-row {
	flex-direction: column;
}

.monaco-dialog-box.align-vertical .dialog-message-row .dialog-message-container {
	min-height: 0; /* allow flex item to shrink below content size in column layout */
}

.monaco-dialog-box .dialog-message-row > .dialog-icon.codicon {
	flex: 0 0 48px;
	height: 48px;
	font-size: 48px;
}

.monaco-dialog-box.align-vertical .dialog-message-row > .dialog-icon.codicon {
	flex: 0 0 64px;
	height: 64px;
	font-size: 64px;
}

.monaco-dialog-box:not(.align-vertical) .dialog-message-row > .dialog-icon.codicon {
	align-self: baseline;
}

.monaco-dialog-box:not(.align-vertical) .dialog-message-row .dialog-message-container {
	align-self: stretch; /* fill row height so overflow-y scrolling works */
}

/** Dialog: Message/Footer Container */
.monaco-dialog-box .dialog-message-row .dialog-message-container,
.monaco-dialog-box .dialog-footer-row {
	display: flex;
	flex-direction: column;
	overflow-y: auto;
	overflow-x: hidden;
	text-overflow: ellipsis;
	user-select: text;
	-webkit-user-select: text;
	word-wrap: break-word; /* never overflow long words, but break to next line */
	white-space: normal;
}

.monaco-dialog-box .dialog-footer-row {
	margin-top: 20px;
}

.monaco-dialog-box:not(.align-vertical) .dialog-message-row .dialog-message-container,
.monaco-dialog-box:not(.align-vertical) .dialog-footer-row {
	padding-left: 24px;
}

.monaco-dialog-box.align-vertical .dialog-message-row .dialog-message-container,
.monaco-dialog-box.align-vertical .dialog-footer-row {
	align-items: center;
	text-align: center;
}

.monaco-dialog-box .dialog-message-row .dialog-message-container ul,
.monaco-dialog-box .dialog-footer-row ul {
	padding-inline-start: 20px; /* reduce excessive indent of list items in the dialog */
}

/** Dialog: Message */
.monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-message {
	line-height: 22px;
	font-size: 18px;
	flex: 1; /* let the message always grow */
	white-space: normal;
	word-wrap: break-word; /* never overflow long words, but break to next line */
	min-height: 48px; /* matches icon height */
	margin-bottom: 8px;
	display: flex;
	align-items: center;
}

/** Dialog: Details */
.monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-message-detail {
	line-height: 22px;
	flex: 1; /* let the message always grow */
}

.monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-message a:focus {
	outline-width: 1px;
	outline-style: solid;
}

/** Dialog: Checkbox */
.monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-checkbox-row {
	padding: 15px 0px 0px;
	display: flex;
}

.monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-checkbox-row .dialog-checkbox-message {
	cursor: pointer;
	user-select: none;
	-webkit-user-select: none;
	flex: 1;
}

/** Dialog: Input */
.monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-message-input {
	padding: 15px 0px 0px;
	display: flex;
}

.monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-message-input .monaco-inputbox {
	flex: 1;
}

/** Dialog: File Path */
.monaco-dialog-box code {
	font-family: var(--monaco-monospace-font);
}

/** Dialog: Buttons Row */
.monaco-dialog-box > .dialog-buttons-row {
	display: flex;
	align-items: center;
	padding-right: 1px;
	overflow: hidden; /* buttons row should never overflow */
}

.monaco-dialog-box > .dialog-buttons-row {
	display: flex;
	white-space: nowrap;
	padding: 20px 10px 10px;
}

/** Dialog: Buttons */
.monaco-dialog-box > .dialog-buttons-row > .dialog-buttons {
	display: flex;
	width: 100%;
}

.monaco-dialog-box:not(.align-vertical) > .dialog-buttons-row > .dialog-buttons {
	overflow: hidden;
	justify-content: flex-end;
	margin-left: 67px; /* for long buttons, force align with text */
}

.monaco-dialog-box.align-vertical > .dialog-buttons-row > .dialog-buttons {
	margin-left: 5px;
	margin-right: 5px;
	flex-direction: column;
}

.monaco-dialog-box > .dialog-buttons-row > .dialog-buttons > .monaco-button {
	overflow: hidden;
	text-overflow: ellipsis;
	margin: 4px 5px; /* allows button focus outline to be visible */
	outline-offset: 2px !important;
}

.monaco-dialog-box.align-vertical > .dialog-buttons-row > .dialog-buttons > .monaco-button {
	margin: 4px 0; /* allows button focus outline to be visible */
}

.monaco-dialog-box:not(.align-vertical) > .dialog-buttons-row > .dialog-buttons > .monaco-button {
	width: fit-content;
}

/** Dialog: Dropdown */
.monaco-dialog-box:not(.align-vertical) > .dialog-buttons-row > .dialog-buttons > .monaco-button-dropdown {
	margin: 4px 5px;
}

.monaco-dialog-box.align-vertical > .dialog-buttons-row > .dialog-buttons > .monaco-button-dropdown {
	width: 100%;
}

.monaco-dialog-box > .dialog-buttons-row > .dialog-buttons > .monaco-button-dropdown:focus-within {
	/**
	 * This is a trick to make the focus outline appear on the entire
	 * container of the dropdown button to ensure the dialog box looks
	 * consistent to dialogs without dropdown buttons.
	 */
	outline-offset: 2px !important;
	outline-width: 1px;
	outline-style: solid;
	outline-color: var(--vscode-focusBorder);
	border-radius: 4px;
}


.monaco-dialog-box.align-vertical > .dialog-buttons-row > .dialog-buttons > .monaco-button-dropdown > .monaco-text-button {
	width: 100%;
}

.monaco-dialog-box > .dialog-buttons-row > .dialog-buttons > .monaco-button-dropdown > .monaco-dropdown-button {
	padding: 0 4px;
}

.monaco-dialog-modal-block .dialog-shadow {
	border-radius: var(--vscode-cornerRadius-large);
}
