:root {
	--black-20: rgba(0, 0, 0, 0.2);
	--black-40: rgba(0, 0, 0, 0.4);
	--black-60: rgba(0, 0, 0, 0.6);
	--black-80: rgba(0, 0, 0, 0.8);

	--white-10: rgba(255, 255, 255, 0.1);
	--white-20: rgba(255, 255, 255, 0.2);
	--white-40: rgba(255, 255, 255, 0.4);
	--white-60: rgba(255, 255, 255, 0.6);
	--white-80: rgba(255, 255, 255, 0.8);

	--full-pad: 8px;
	--half-pad: 4px;
	--dialog-box-shadow: 3px 3px 4px var(--black-40);

	--dark-blue-03: hsla(200, 100%, 20%, 0.03);
	--dark-blue-05: hsla(200, 100%, 20%, 0.05);
	--dark-blue-10: hsla(200, 100%, 20%, 0.1);
	--dark-blue-20: hsla(200, 100%, 20%, 0.2);
	--dark-blue-30: hsla(200, 100%, 20%, 0.3);
	--dark-blue-40: hsla(200, 100%, 20%, 0.4);
	--dark-blue-50: hsla(200, 100%, 20%, 0.5);
	--dark-blue-60: hsla(200, 100%, 20%, 0.6);
	--dark-blue-70: hsla(200, 100%, 20%, 0.7);
	--dark-blue-80: hsla(200, 100%, 20%, 0.8);
	--dark-blue-90: hsla(200, 100%, 20%, 0.9);
	--dark-blue: hsla(200, 100%, 20%, 1.0);

	--highlight: hsl(55, 80%, 80%);
}

* {
	margin: 0;
	padding: 0;
	font-family: sans-serif;
	box-sizing: border-box;
	user-select: none;
}

textarea, input {
	user-select: text;
}

html, body {
	height: 100%;
}

body {
	display: grid;
	grid-template-columns: 150px 1fr;
	gap: 10px;
	max-height: 100%;
	overflow: hidden;
}

h1 {
	font-weight: normal;
	color: var(--dark-blue);
}

#documentName {
	display: inline-block;
}

.searchWrapper {
	display: inline-grid;
	width: 300px;
	grid-template-columns: 24px 1fr 24px;
	margin: 0px 0px 0px var(--full-pad);
	position: relative;
	top: -4px;
	border: 1px solid var(--black-40);
	border-radius: 4px;
}

.searchIcon {
	grid-column: 1;
	text-align: center;
	font-size: 1.1em;
	color: var(--dark-blue-50);
	padding: 0px 0px 1px 2px;
	font-weight: bold;
}

#search {
	grid-column: 2;
	padding: 4px;
	border: 0;
}

.searchClear {
	grid-column: 3;
	cursor: pointer;
	border-left:1px solid var(--dark-blue-05);
	color: var(--dark-blue-40);
	text-align: center;
}

.searchClear:hover {
	background-color: var(--dark-blue-40);
	color: white;
}

.searchNote {
	margin: 10px;
	color: var(--black-60);
	font-style: italic;
}

#searchResultCount {
	position: relative;
	top: -2px;
}

#appBar {
	grid-column: 1;
	background-color: var(--dark-blue-80);
	border-right: 1px solid  var(--dark-blue);
	color: white;
	text-align: center;
	box-shadow: 2px 0px 7px var(--dark-blue-50);
}

#wrapper {
	grid-column: 2;
	padding-right: 10px;
	overflow-y: scroll;
}

#wrapper h1 {
	margin: 10px;
}

.logo {
	display: inline-block;
	width: 80%;
	background-color: var(--dark-blue);
	font-size: 24px;
	line-height: 0.9em;
	text-align: center;
	font-weight: bold;
	margin: 12px auto 20px auto;
	padding: 10px 0px;
	border: 1px solid var(--white-80);
	box-shadow: var(--dialog-box-shadow);
	border-radius: 0px 12px;
}

#appBar button,
#appBar button:disabled:hover {
	width: 80%;
	color: var(--white-80);
	background-color: var(--white-20);
	border: 1px solid var(--white-40);
	border-radius: 2px;
	margin: 4px 0px;
	padding: 4px 0px;
}

#appBar button:hover {
	cursor:pointer;
	color: white;
	background-color: var(--white-10);
	border: 1px solid var(--white-80);
	border-radius: 4px;
}

#appBar button:disabled {
	background-color: var(--white-20);
	opacity: 0.4;
	cursor: default;
}

#appBar hr {
	margin: 10px 10px;
	background-color: var(--white-60);
	border: 0;
	height: 1px;
}

.nodeWrapper {
	background-color: var(--dark-blue-03);
	border-left: 1px solid var(--dark-blue-10);
	padding:0px 8px 1px 0px;
	margin: 4px 0px 4px var(--full-pad);
}

.nodeHeader {
	padding: 0px 4px 0px 0px;
}

.nodeContent {
	padding: 0px;
}

.title, .togglerTitle {
	display: inline-block;
	border: 1px solid transparent;
	border-radius: 0px 4px 4px 0px;
	margin-right: var(--half-pad);
	color:var(--dark-blue-90);
	padding: 2px 8px 2px 2px;
	height: 1.8em;
}

.togglerTitle:hover {
	cursor: pointer;
	color: var(--dark-blue);
	background-color: var(--dark-blue-05);
}

.title {
	color:var(--black-80);
	cursor: default;
	padding: 4px 4px 0px 21px;
}

.commentNode {
	background-color: transparent;
	border-left: 1px solid transparent;
	padding:2px 8px 2px var(--full-pad);
	margin: 4px 0px 4px 0px;
}

.textContent {
	font-family: monospace;
	color: var(--black-80);
	background-color: var(--white-60);
	display: inline-block;
	border: 0px;
	min-height: 1em;
	padding: 10px 12px 10px var(--full-pad);
}

.textContent:hover {
	cursor: pointer;
	color: black;
	background-color: white;
}

.textContent .highlight {
	background-color: var(--highlight);
	font-family: monospace;
}

.commentContent {
	display: inline-block;
	font-style: italic;
	font-size: 0.8em;
	color: forestgreen;
	text-shadow: 1px 1px 0px white;
	background-color: transparent;
	border: 1px solid transparent;
	border-radius: 4px;
}

.commentContent:hover {
	cursor: pointer;
	border: 1px solid var(--white-80);
	background-color: var(--white-40);
}

.commentContent .highlight {
	background-color: var(--highlight);
	font-style: italic;
	color: forestgreen;
	text-shadow: 1px 1px 0px white;
}

.textNode {
	background-color: transparent;
}

.attributeContent {
	display: inline-block;
	padding: 2px 4px;
	color: var(--dark-blue-80);
	background-color: var(--white-20);
	border: 1px solid var(--white-80);
	border-radius: 4px;
	font-size: 0.8em;
	margin-left: var(--half-pad);
	position: relative;
	top: -2px;
	cursor: default;
}

.attributeContent .highlight {
	background-color: var(--highlight);
	font-weight: normal;
	color: var(--dark-blue-90);
}

.attributeContent:hover {
	color: var(--dark-blue-90);
	background-color: var(--white-80);
	border: 1px solid white;
	cursor: pointer;
}

.attributeContent span {
	color:var(--black-40);
	padding: 0px 4px;
	font-weight: bold;
}

.node h1 {
	font-weight: normal;
	font-size: 1.2em;
	margin-bottom: 4px;
	margin-right: 12px;
	display: inline-block;
}

.dialog {
	position: absolute;
	top: 200px;
	left: 200px;
	min-width: 100px;
	min-height: 100px;
	background-color: white;
	border: 1px solid var(--dark-blue);
	border-radius: 4px;
	box-shadow: var(--dialog-box-shadow);
}

.dialog .content {
	padding: 10px;
}

.dialog .buttonfooter {
	padding: 0px 10px 10px 10px;
	background-color: var(--dark-blue-05);
	text-align: left;
}

.dialog button {
	display: inline-block;
	margin: 10px 5px 0px 0px;
	color: var(--dark-blue-80);
	background-color: var(--dark-blue-10);
	border: 1px solid var(--dark-blue-40);
	border-radius: 2px;
	padding: 4px 20px;
}

.dialog button:hover {
	cursor:pointer;
	color: var(--dark-blue);
	background-color: var(--dark-blue-05);
	border: 1px solid var(--dark-blue-50);
	border-radius: 4px;
}

.dialog label {
	padding: 0px 10px 0px 0px;
}

.dialog input {
	padding: 4px 0px 4px 4px;
}

.dialog textarea {
	width: 100%;
	height: 100%;
	padding: 10px 12px 10px 10px;
	background-color: white;
	font-family: monospace;
	border: 0;
	line-height: 1.4em;
}

#dropTarget {
	border: 1px dashed var(--dark-blue-10);
	border-radius: 10px;
	color: var(--dark-blue-70);
	margin: 20px 0px 0px 0px;
	padding: 70px 0px;
	text-align: center;
	height: 155px;
}

.warn {
	padding: 10px 15px;
	border-radius: 4px;
	background-color: hsla(55, 100%, 50%, 0.4);
	color: hsl(0, 90%, 30%);
}