html {
	height: 100%;
}

body {
	background-color: #080808;
	border: 0;
	color: #eeeeee;
	cursor: default;
	margin: 0;
	overflow: hidden;
	padding: 0;
	pointer-events: none;		/* These must be overriden for things that need pointer / select */
	user-select: none;			/* These must be overriden for things that need pointer / select */
}

::-webkit-scrollbar {
	pointer-events: auto;
	background-color: #181818;
}

::-webkit-scrollbar-thumb {
	pointer-events: auto;
	background-color: #444444;
}

#gridder {
	display: grid;
	height: 100vh;
	grid-template-columns: min-content 1fr;
	grid-template-rows: min-content min-content 1fr;
	grid-template-areas:
		"a b"
		"f f"
		"g g";
}

#rightgridder {
	grid-area: b;
	display: grid;
	margin: 1em 0 0 0;
	height: 0;							/* js needs to keep this equal to the boardsize */
	grid-template-columns: none;
	grid-template-rows: min-content 1fr min-content;
	grid-template-areas:
		"c"
		"d"
		"e";
}

#boardsquares {
	grid-area: a;
	margin: 1em 0 0 1em;
	background-size: cover;
	border-collapse: collapse;
	table-layout: fixed;
	z-index: 1;
}

#canvas {
	grid-area: a;
	margin: 1em 0 0 1em;
	display: block;
	outline-offset: 6px;
	z-index: 2;
}

#boardfriends {
	grid-area: a;
	margin: 1em 0 0 1em;
	border-collapse: collapse;
	pointer-events: auto;
	table-layout: fixed;
	z-index: 3;
}

#statusbox {
	grid-area: c;
	margin: 0 0 0 1em;
	border: none;
	display: block;
	font-family: monospace, monospace;
	pointer-events: auto;
	overflow: hidden;
	white-space: pre;
}

#infobox {
	grid-area: d;
	margin: 1em 1em 0 1em;
	display: block;
	color: #cccccc;						/* only used for Lc0 stderr output at startup */
	font-family: monospace, monospace;
	overflow-x: hidden;
	overflow-y: auto;
	padding-right: 10px;				/* so the text doesn't get so near the scroll bar */
	pointer-events: auto;
	white-space: pre-wrap;
}

#graph {
	grid-area: e;
	align-self: end;
	display: block;
	margin: 10px 0 0 1em;
	pointer-events: auto;
}

input[type=text]:focus {
	outline: 2px dashed gray;
	outline-offset: 4px;
}

#fenbox {
	grid-area: f;
	margin: 1em 1em 0 1em;
	background-color: #080808;
	border: none;
	caret-color: white;
	color: #6cccee;
	display: block;
	font-family: monospace, monospace;
	font-size: 100%;
	pointer-events: auto;
	user-select: auto;
}

#movelist {
	grid-area: g;
	margin: 1em 1em 1em 1em;
	display: block;
	color: #999999;
	font-family: monospace, monospace;
	overflow-x: hidden;
	overflow-y: auto;
	padding-right: 10px;				/* so the text doesn't get so near the scroll bar */
	pointer-events: auto;
	white-space: pre-wrap;
}

#promotiontable {
	border-collapse: collapse;
	display: none;
	pointer-events: auto;
	position: fixed;
	table-layout: fixed;
	z-index: 4;
}

#fullbox {
	background-color: #080808;
	display: none;						/* better than visibility: hidden - never intercepts inputs */
	font-family: monospace, monospace;
	font-size: 100%;
	height: 100%;
	left: 0;
	overflow-y: auto;
	pointer-events: auto;
	position: fixed;
	top: 0;
	width: 100%;
	z-index: 6;
}

#fullbox_content {
	overflow: hidden;
	padding: 1em;
	white-space: pre;
}

td {
	background-color: transparent;
	background-size: contain;
	border: 0;
	margin: 0;
	padding: 0;
}

a, a:link, a:visited, a:hover, a:active {	/* I think this is now only used for the "Nibbler in normal browser" message. */
	color: #6cccee;
}

ul {
	list-style: none;
}

.pink {
	color: #ffaaaa;
}

.white {
	color: #eeeeee;
}

.gray {
	color: #999999;
}

.darkgray {
	color: #666666;
}

.red {
	color: #ff6666;
}

.yellow {
	color: #ffff00;
}

.green {
	color: #66ff66;
}

.blue {
	color: #6cccee;
}

.infoline {
	margin-bottom: 1em;
}

.enginechooser {
	margin-bottom: 1em;
}

.enginechooser:hover {
	color: #6cccee;
}

.pgnchooser:hover {
	background-color: #202020;
}

.ocm_highlight {
	background-color: #770000;
}

.hover_highlight {
	background-color: #222244;
}

span.movelist_highlight_blue {
	background-color: #222244;
	color: #6cccee;
}

span.movelist_highlight_yellow {
	background-color: #444422;
	color: #ffff00;
}

span.nobr {
	white-space: nowrap;				/* Used for O-O and O-O-O moves */
}
