/* Dialog */
#dialog {
	position: fixed;
	display: flex;
	flex-flow: column nowrap;
	justify-content: center;
	top: -100%;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	transition: top 0.25s ease, opacity 0.25s ease;
	opacity: 0;
	z-index: 100;
	font-size: 1.25rem;
	-webkit-user-select: initial;
}

#dialog.visible {
	opacity: 1;
	top: 0;
}

#dialog.empty #dialogMain {
	display: none;
}

#dialogContents {
	display: flex;
	flex-flow: column nowrap;
	flex: 0 0 auto;
	margin: auto;
	min-width: 40rem;
	max-width: 70vw;
	max-height: 90vh;
	overflow: auto;
	border: 2px solid rgba(0, 0, 255, 0.4);
	border-radius: 6px;
	background-color: #fff;
}

#dialogHeader {
	display: flex;
	flex-flow: row nowrap;
	flex: 0 0 auto;
	padding: 1em;
	font-weight: bold;
	text-align: center;
	border-bottom: 1px solid rgba(0, 0, 255, 0.4);
}

#dialogTitle {
	flex: 1 0 auto;
}

#dialogCloseBtn {
	flex: 0 0 auto;
	transition: color 0.1s ease;
	cursor: pointer;
	line-height: 1em;
}

#dialogCloseBtn:hover {
	color: #ff0000;
}

#dialogMain {
	display: flex;
	flex-flow: row nowrap;
	flex: 4 1 auto;
	padding: 1em;
	overflow: auto;
	position: relative;
}

#dialogOutput {
	flex: 1 1 auto;
	overflow: auto;
	padding: 1em;
	border-top: 1px solid rgba(0, 0, 255, 0.4);
	white-space: pre;
	background-color: #333;
	color: #eee;
	font-family: "dejavu sans mono", "liberation mono", monospace;
	font-size: 1rem;
}

#dialogOutputStatus {
	flex: 0 0 auto;
	padding: 0.5em 1em;
	border-top: 1px solid rgba(0, 0, 255, 0.4);
	text-align: center;
}

#dialogOutputStatus:empty {
	display: none;
}

#dialogOutputStatus.success {
	background-color: #ddffdd;
}

#dialogOutputStatus.error {
	background-color: #ffdddd;
}

#dialogOutput:empty {
	display: none;
}

#dialog.empty #dialogOutput {
	display: block;
}
