html { overflow-y: hidden; scroll-behavior: smooth; }
header { display: flex; }
header h1 {
	padding: 1rem;
	display: flex;
	flex-grow: 1;
	position: relative;
	font-size: 1.4rem;
}
header h1 a { line-height: 0; }
header h1 img {
	margin-right: 0.25em;
	width: 1em;
	height: 1em;
}
header h1 + .about { margin-top: 0; padding: 1rem; line-height: 0; }
footer { overflow-y: auto; padding-bottom: 1rem; }
.container {display: flex; height: 100vh; max-height: 100vh; flex-direction: column; }
.oi-top { top: 0; }
.oi-right { right: 0; }
.oi-bottom { bottom: 0; }
.oi-left { left: 0; }
.oi-top,.oi-bottom { text-align: center; position: absolute; z-index:1000; width: 100%; }
.oi-left, .oi-right { margin-top: 0; margin-bottom: 0; position: absolute; text-align: left; }
.oi-left > * + *, .oi-right > * + * { margin-top: 0.5em; }
.zoomer { margin: 0.5rem; display: flex; gap: 0.5rem; }
.placesearch { display: flex; color: black; font-size: 1rem; margin: 0.5rem; }
.placesearch button { cursor: pointer; padding: 0.4em; border: 0; width: 1.8rem; height: 1.8rem; background-color: #444; color: white; display: flex; align-items: center; justify-content: center; }
.placesearch button svg { width: 1rem; height: 1rem; }
.placesearch input { font-size: 1rem; width: 100%; padding: 0; border: 0; line-height: 28px; padding-inline: 0.5em; }
.placesearch .results ol { margin: 0; padding: 0; list-style: none; }
.placesearch .results ol li { padding: 0.25rem 0.5rem; background: #444; color: white; cursor: pointer; }
.placesearch .results ol li.selected, .placesearch .results ol li:hover { background: #dfdfdf; color: black; outline: 2px solid #E6007C; border-radius: 2px; }


#main { line-height: 1.44em; position: relative; flex-grow: 1; }
#canvas { cursor: grab; }
#canvas.dragging { cursor: grabbing; }
tspan { font-family: Arial; }
.q {
	fill: #0DBC37;
	color: #0DBC37;
}
.r {
	fill: #178CFF;
	color: #178CFF;
}

.box { width: 1rem; height: 1rem; }
#navigation { border-bottom: 1px solid rgba(0,0,0,0.3); }
#navigation ul { position: relative; z-index: 1100; list-style: none; margin: 0; padding: 4px; list-style: none; display: flex; flex-wrap: wrap; box-sizing: border-box; gap: 4px; }
#navigation, #navigation ul, #navigation li[role=menuitem], #navigation .button { background: #fff; }
#navigation li { white-space: nowrap; display:block; cursor: pointer; }
#navigation ul[role=menubar] { flex-direction: row; }
#navigation ul[role=menubar] > li { padding-inline: 0.5rem; line-height: 2rem; position: relative; }
#navigation ul[role=menu] { border: 1px solid rgba(0,0,0,0.3); border-radius: 4px; position: absolute; top: calc(100% + 1px); left: 0; display: none; flex-direction: column; min-width: 192px; box-shadow: 1px 1px 4px rgba(0,0,0,0.2); }
#navigation ul[role=menubar] > li[aria-expanded="true"] > ul { display:flex; }
#navigation ul[role=menu] li[role=menuitem]:focus > *, #navigation ul[role=menu] li[role=menuitem]:hover > * { background: #eee!important; color: black!important; }
#navigation li.separator { line-height: 0; border: 0; border-top: 1px solid rgba(0,0,0,0.3); }
#navigation .button { width: 100%; line-height: 1rem; margin-right: 1px; padding: 0.5em; text-align: left; display: flex; flex-direction: row; gap: 0.5rem; align-items: center; }
#navigation .button svg { height: 1rem; }
#navigation .button .key { flex-grow: 1; text-align: right; color: #80868b; font-weight: bold; }
#navigation .button .icon { width: 1rem; }
#navigation .button:disabled { background: inherit; }
#navigation .button:disabled, #navigation .button:disabled > * { opacity: 0.6; color: inherit!important; }
#navigation ul[role=menu] li[role=menuitem]:focus .button:disabled,#navigation ul[role=menu] li[role=menuitem]:hover .button:disabled { background: inherit!important; color: #000!important; cursor: auto; }


#btn-colour { position: relative; width: 2.5rem; }
#btn-colour > * { height: 100%; margin: 0; display: block; width: 100%; position: absolute; }
#btn-colour input { opacity: 0.01; }
#btn-colour label { padding: 0.5em; cursor: pointer; }
svg.bi {
	width: 1.5em;
	height: 1.5em;
	vertical-align: middle;
	cursor: pointer;
}
button:disabled {
	background: #999;
	color: #555;
}
button:disabled:hover, button:disabled:focus {
	background: #999 !important;
	color: #555 !important;
}
.chooser { text-align: left; display: flex; flex-wrap: wrap; line-height: 1.5rem; gap: 1rem; align-items: stretch; justify-content: center; margin-bottom: 1rem; }
.chooser input { font-size:1em; }
.chooser .vs { font-family: serif; font-style: italic; color: #666666; align-self: center; }
.chooser .part { flex-grow: 1; position: relative; margin: 0px; }
.chooser .part > *:last-child { margin-bottom: 0; }
.chooser .part input { padding: 0px 2px; }
.chooser .part label { display: block; }
.chooser .choose { display: inline; }
.chooser .choose button { height: 100%; margin-left: 1em; }
#validation_form { margin-bottom: 1rem; }
#url {
	line-height: 1.5em;
	width: 100%;
}
form { 
	position: relative;
}
.dropzone {
	line-height: 1.5em;
	position: absolute;
	left: 0px;
	top: 0px;
	padding: 1em;
	box-sizing: border-box;
}
.dropzone.loaded {
	border: 2px solid transparent;
}
.dropzone.loaded .helpertext {
	display: none;
}
.dropzone.drop {
	background-color: #efefef;
	outline: 2px dashed #999999;
}
.dropzone input {
	position: absolute;
	left: 0px;
	top: 0px;
	width: 100%;
	height: 100%;
	opacity: 0.01;
}
#hex-info { margin: 0.5rem; background: rgba(255,255,255,0.85); padding: 0.5rem; border: 1px solid #dfdfdf; }
#hex-info span { font-family: Poppins; }
#messages { width: 100%; max-height: 260px; overflow-y: auto; line-height: 1.44em; }
#messages .message { border-bottom: 1px solid #222; position: relative; display: flex; }
#messages .message .message-inner { flex-grow: 1; }
#messages .message .close { padding-inline: 0.5em; cursor: pointer; border-radius: 2px; }
.msg { text-align: center; padding: 0.5em; }

.hex.hovered path { opacity: 0.7; }
.hex.selected path {}
#canvas path.selection {
	stroke: #000!important;
	stroke-dasharray: 4px 6px;
	stroke-width: 3px;
	stroke-linecap: round;
	animation: rotate-border 1s linear infinite;
}
@keyframes rotate-border {
	from { stroke-dashoffset: 10; }
	to { stroke-dashoffset: 0; }
}

#tutorial { min-width: 220px; }
ol { padding-left: 1rem; }
#instructions { margin-top: 2rem; }
.visually-hidden {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0,0,0,0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

@media (prefers-color-scheme: dark){
	.b6-bg, a.b6-bg:visited { background-color: #000000; color: white; }
	.b5-bg, a.b5-bg:visited { background-color: #333333; color: white; }
	.b4-bg, a.b4-bg:visited { background-color: #999999; color: black; }
	.b3-bg, a.b3-bg:visited { background-color: #bbbbbb; color: black; }
	.b2-bg, a.b2-bg:visited { background-color: #dfdfdf; color: black; }
	#navigation, #navigation ul, #navigation li[role=menuitem], #navigation .button { background: #444; color: white; }
	#canvas pattern path {stroke: #40464c; }
	#hex-info { background: rgba(0, 0, 0, 0.85); }
	.placesearch button { background: #bbb; color: black; }
}