:root {
	/* Base colors */
	--base-background: var(--save_the_whales);
	--base-text: var(--white);

	--lowlight-background: var(--petrol_water);
	--lowlight-text: var(--white);

	--midlight-background: var(--vienna);
	--midlight-text: var(--white);

	--highlight-background: var(--white);
	--highlight-text: var(--petrol_water);

	--error-color: var(--clownfish_orange);
	--cancel-color: var(--clownfish_orange);
	--warning-color: var(--clownfish_orange);
	--confirm-color: var(--petrol_water);
	--shadow-color: var(--black);

	--panel-gradient-one: rgb(43, 79, 103, 0.1);
	--panel-gradient-two: rgb(43, 79, 103, 0.1);

	--toolbelt-gradient-off-one: rgb(43, 79, 103, 0.1);
	--toolbelt-gradient-off-two: rgb(43, 79, 103, 0.1);

	--toolbelt-gradient-on-one: rgb(255, 255, 255, 0.1);
	--toolbelt-gradient-on-two: rgb(255, 255, 255, 0.1);
}

* {
	box-sizing: border-box;
	border-color: #666;
}

body,
html {
	margin: 0;
	padding: 0;
	overscroll-behavior: none;
	font-family: "Noto Sans", sans-serif;
	font-optical-sizing: auto;
	font-weight: 300;
	font-style: normal;
	font-variation-settings: "wdth" 100;
	color: #445;
	font-size: 16px;
}

.display-font {
	font-family: "Noto Sans", sans-serif;
	font-optical-sizing: auto;
	font-weight: 300;
	font-style: normal;
	font-variation-settings: "wdth" 100;
	color: #445;
	font-size: 16px;
}

body,
html,
#scroll,
.outer {
	width: 100%;
	height: 100%;
}

html {
	background-color: var(--base-background);
}

body {
	background-color: var(--base-background);
	color: var(--base-text);
}

h1, h2, h3, h4 {
	margin-top: 0;
	font-family: "Faculty Glyphic", sans-serif;
	font-weight: 600;
	font-style: normal;
	display: flex;
	align-items: center;
}

h1 {
	margin-bottom: 20px;
}

h2 {
	margin-bottom: 17px;
}

h3 {
	margin-bottom: 14px;
}

h4 {
	margin-bottom: 10px;
}

h1:last-child,
h2:last-child,
h3:last-child,
h4:last-child {
	margin-bottom: 0;
}

h1 .inline-buttons,
h2 .inline-buttons,
h3 .inline-buttons,
h4 .inline-buttons {
	font-size: 0.8rem;
	margin-left: auto;
}

p:last-child {
	margin-bottom: 0;
}

a,
a:visited,
a:link {
	color: var(--midlight-background);
}

input[type=text] {
	padding: 5px 10px;
	border: solid 1px;
	background-color: #FFF;
	outline: none;
}

.text-center {
	text-align: center;
	justify-content: center;
}

.hidden:not(.space),
.authorized.hide {
	display: none !important;
}

#scroll {
	overflow: hidden;
	transform: all 0.3s ease-in-out;
	opacity: 0;
}

#display {
	position: relative;
}

.positioning-button {
	position: fixed;
	left: 50%;
	top: 50%;
	font-size: 40px;
	background-color: var(--lowlight-background);
	color: var(--lowlight-text);
	display: none;
	align-items: center;
	justify-content: center;
}

#positioningConfirm {
	padding: 15px 30px;
	aspect-ratio: 1;
	border-radius: 70px;
	transform: translate(-50%, -50%);
}

#positioningNudgeLeft,
#positioningNudgeRight {
	width: 80px;
	height: 140px;
}

#positioningNudgeUp,
#positioningNudgeDown {
	width: 140px;
	height: 80px;
}

#positioningNudgeIn,
#positioningNudgeOut {
	display: none;
	background-color: transparent;
}

#positioningNudgeLeft {
	transform: translate(-170px, -50%);
	clip-path: polygon(0 50%, 100% 0, 100% 100%);
}

#positioningNudgeRight {
	transform: translate(90px, -50%);
	clip-path: polygon(0 0, 100% 50%, 0 100%);
}

#positioningNudgeUp {
	transform: translate(-50%, -170px);
	clip-path: polygon(0 100%, 50% 0, 100% 100%);
}

#positioningNudgeDown {
	transform: translate(-50%, 90px);
	clip-path: polygon(0 0, 100% 0, 50% 100%);
}

#positioningNudgeIn {
	transform: translate(-50%, -185px);
}

#positioningNudgeOut {
	transform: translate(-50%, 150px);
}

.full-map {
	position: relative;
	display: none;
	background-repeat: no-repeat;
	opacity: 0.25;
	z-index: 10;
}

.gm-view .full-map {
	display: block;
}

.positioning .space .icon {
	display: none;
}

#display.positioning .space:not(.selected, .space-placeholder):hover::after {
	display: none;
}

.space {
	position: absolute;
	background-color: var(--white);
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	cursor: pointer;
	z-index: 20;
	clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}

.space.known {
	filter: grayscale(.8);
	opacity: 0.6;
}

.space.known.selected {
	filter: none;
}

.gm-view .space.known {
	opacity: 0.8;
}

.space-shadow {
	position: absolute;
	z-index: 15;
	box-shadow: 0 0 125px var(--white);
	border-radius: 50%;
	transform: scale(0.55);
}

.space-shadow.known {
	display: none;
}

#display .space.selected::after,
#display .space:not(.selected, .space-placeholder):hover::after {
	content: '';
	display: block;
	position: absolute;
	width: 100%;
	height: 100%;
	backdrop-filter: none;
	top: 0;
	left: 0;
}

#display .space:hover::after {
	/*background-color: var(--base-text);
	opacity: 0.2;*/
}

#display .space.selected::after {
	background-color: rgba(0, 0, 255, 0.2);
}

#display .space.known:hover::after {
	opacity: 0.6;
}

.space .overlays,
.space .overlay {
	position: absolute;
	top: -5%;
	left: -5%;
	width: 110%;
	height: 110%;
}

.space .overlay {
	transform-origin: 50% 50%;
	background-size: 100% 100%;
	background-repeat: no-repeat;
	z-index: 20;
}

.space .icons {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 3px;
	z-index: 40;
}

.space .icon {
	padding: 3px;
	font-size: 10px;
	background-color: var(--highlight-background);
	color: var(--highlight-text);
	border-radius: 3px;
	display: flex;
	justify-content: center;
	align-items: center;
	border: solid 1px;
}

.space .party-icon {
	color: #00F;
	background-color: transparent;
	border: none;
	font-size: 26px;
	text-align: center;
	-webkit-text-stroke: #FFF 1px;
	z-index: 40;
}

.space .target-icon {
	color: #00F;
	background-color: transparent;
	font-size: 24px;
	border: none;
	opacity: 0.6;
}

.space.add {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 40px;
	background-color: rgba(255, 255, 255, 0.2);
	z-index: 40;
}

.space.add.overlaid {
	background-color: rgba(255, 255, 255, 0.2);
}

.space.add .party-icon {
	color: #000;
	opacity: 0.2;
}

.space.add.overlaid .party-icon {
	opacity: 0.5;
}

.space.add:hover .party-icon,
.space.add:hover i {
	color: #00F;
	opacity: 1;
}

.space.hidden {
	opacity: 0;
}

.space-placeholder {
	width: 100px;
	height: 86px;
	background-color:#00F;
	opacity: 0.2;
}

.positioning .space.add,
.positioning .space.add::after {
	background-color: transparent !important;
}

#display:not(.gm-view) .space.hidden {
	cursor: default;
}

.gm-view .space.hidden {
	opacity: 0.7;
}

.gm-view .space.hidden::after {
	content: '';
	display: block;
	position: absolute;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	background-color: #BBB;
	opacity: 0.6;
}

.fake-image-for-loading {
	position: absolute;
	bottom: 100%;
}

.modal {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	max-width: 500px;
	max-height: 90%;
	width: 90%;
	background-color: var(--highlight-background);
	color: var(--highlight-text);
	box-shadow: 0 5px 25px var(--shadow-color);
	padding: 25px;
	overflow: auto;
	display: none;
	opacity: 0;
	border-radius: 5px;
}

#loadingOverlay,
.modal-blanket {
	position: fixed;
	top: 0;
	left: 0;
	display: none;
	opacity: 0;
	background-color: rgb(68, 68, 85, 0.9);
	opacity: 0;
	width: 100%;
	height: 100%;
}

#loadingOverlay {
	background-color: var(--base-background);
	transition: all 0.3s ease-in;
	display: flex;
	opacity: 1;
	justify-content: center;
	align-items: center;
}

#loadingOverlay #loadingAnimation {
	width: 0;
	height: 0;
	position: relative;
}

#loadingOverlay .loading-hex {
	position: absolute;
	width: 20px;
	height: 20px;
	background-color: #DDD;
	transition: opacity 1s ease-in-out;
	mask-image: url("data:image/svg+xml,<svg id=\"tile0_0\" class=\"space\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"><polygon class=\"space\" points=\"5,0 15,0 20,8.6 15,17.2 5,17.2 0,8.6\"></polygon></svg>");
	opacity: 0.2;
}

.loading-hex:nth-child(1) {
	left: -10px;
	top: -10px;
}

.loading-hex:nth-child(2) {
	left: -10px;
	top: -28px;
}

.loading-hex:nth-child(3) {
	left: 6px;
	top: -19px;
}

.loading-hex:nth-child(4) {
	left: 6px;
	top: -1px;
}

.loading-hex:nth-child(5) {
	left: -10px;
	top: 8px;
}

.loading-hex:nth-child(6) {
	left: -26px;
	top: -1px;
}

.loading-hex:nth-child(7) {
	left: -26px;
	top: -19px;
}

.form-field {
	padding: 0 0 25px 0;
	position: relative;
	display: flex;
	flex-direction: column;
}

.form-field label {
	display: flex;
	align-items: center;
	justify-content: left;
	margin-bottom: 5px;
	font-family: "Faculty Glyphic", sans-serif;
	font-weight: 600;
	font-style: normal;
}

.form-field label span,
.form-field label .inline-buttons {
	flex: 1 0 fit-content;
}

.form-field label input {
	flex-shrink: 0;
	flex-grow: 0;
}

.form-field input,
.form-field select {
	padding: 5px 10px;
	display: block;
	width: 100%;
	min-height: 40px;
	background-color: #FFF;
}

.form-field select {
	outline: none;
	background-color: #FFF;
	border: solid 1px;
}

.form-field input[type=file] {
	display: none;
}

.form-field input[type=checkbox] {
	display: inline;
	width: 20px;
	height: 20px;
	min-height: unset;
}

.form-field .upload-target {
	border: dashed 2px;
	border-radius: 5px;
	padding: 20px;
	cursor: pointer;
	display: flex;
	justify-content: center;
	align-items: center;
	background-color: #FFF;
	flex-direction: column;
}

.form-field input.error,
.form-field select.error,
.form-field .upload-target.error {
	border-color: var(--error-color);
}

.form-field.errors {
	transition: opacity 0.3s ease-in;
	opacity: 0;
}

.form-field.errors .error {
	padding: 5px 10px;
	display: grid;
	grid-template-columns: 20px 1fr;
	column-gap: 10px;;
	transition: opacity 0.3s ease-in;
}

.form-field.errors .error .error-icon {
	color: var(--error-color);
}

#mapUploadName {
	display: none;
}

#mapUploadImage {
	width: 90%;
}

#mapUploadImage img {
	width: 100%;
}

.form-field .description {
	font-size: 0.8rem;
	padding: 0 8px;
	text-align: justify;
}

.form-buttons {
	display: flex;
	flex-direction: row;
	gap: 10px;
	align-items: center;
}

.form-buttons.form-buttons-right {
	justify-content: right;
}

.form-buttons.cancel-button {
	padding: 10px 0 0 0;
	text-align: center;
	justify-content: center;
}

.form-buttons a {
	cursor: pointer;
}

.button i,
button i {
	margin: 0 10px;
}

.form-buttons button,
.form-field button,
.form-buttons .button,
.form-field .button {
	flex-grow: 1;
	background-color: var(--lowlight-background);
	color: var(--lowlight-text);
	padding: 10px 10px;
	outline: 0;
	border: none;
	font-size: 16px;
	cursor: pointer;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
}

.form-buttons button.fit-content,
.form-field button.fit-content,
.form-buttons .button.fit-content,
.form-field .button.fit-content {
	flex-grow: 0;
	width: fit-content;
}

.form-buttons .inverse-button,
.form-field .inverse-button {
	background-color: var(--lowlight-text);
	color: var(--lowlight-background);
	border: solid 1px;
}

.form-buttons .warning-button,
.form-field .warning-button {
	background-color: var(--warning-color);
	color: var(--base-text);
}

.tool-belt {
	position: fixed;
	top: 15px;
	right: 15px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	align-items: flex-start;
	transition: all 0.2s ease-in;
}

.tool-belt.hidden {
	display: flex !important;
	transform: translateX(calc(100% + 20px));
}

.tool-belt > button,
.tool-belt > .button-group {
	width: 40px;
	height: auto;
	display: flex;
	justify-content: center;
	align-items: center;
	background-color: var(--highlight-background);
	color: var(--highlight-text);
	box-shadow: 0 5px 15px var(--shadow-color);
	position: relative;
	flex-direction: column;
	border-radius: 5px;
	background-image: linear-gradient(-45deg, var(--toolbelt-gradient-off-one) 0%, transparent 20%, transparent 80%, var(--toolbelt-gradient-off-two) 100%);
}

.tool-belt button {
	width: 40px;
	height: 40px;
	padding: 0;
	border-radius: 5px;
}

.tool-belt button.on {
	background-image: linear-gradient(-45deg, var(--toolbelt-gradient-on-one) 0%, transparent 20%, transparent 80%, var(--toolbelt-gradient-on-two) 100%);
}

.tool-belt > button.disabled {
	opacity: .3;
}

.tool-belt .center-party {
	color: #00F;
}

.tool-belt-label {
	position: absolute;
	right: calc(100% + 10px);
	top: 10px;
	display: none;
	opacity: 0;
	color: var(--highlight-background);
}

.tool-belt .button-group > button:not(:first-child) {
	height: 0;
	margin-top: 0;
	margin-bottom: 0;
	transition: all 0.2s ease-in-out;
}

.tool-belt .button-group.expand > button:not(:first-child) {
	height: 40px;
	margin-top: 10px;
	margin-bottom: 10px;
}

.tool-belt .terrain-select {
	clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
	background-repeat: no-repeat;
	background-position: 0 0;
	background-size: cover;
	transform: scale(0.8);
}
.tool-belt .button-group.expand > button.terrain-select:not(:first-child) {
	height: 34.4px;
}

.hex-icon {
	background-color: var(--highlight-text);
	width: 20px;
	height: 17.2px;
	mask-image: url("data:image/svg+xml,<svg id=\"tile0_0\" class=\"hex\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"><polygon class=\"space\" points=\"5,0 15,0 20,8.6 15,17.2 5,17.2 0,8.6\"></polygon></svg>");
}

.map-name {
	margin-left: 10px;
}

#generateNameButton {
	position: absolute;
	right: 10px;
	bottom: 33px;
}

#generateNameButton i {
	--fa-animation-duration: 0.3s;
}

.settings {
	position: fixed;
	top: 15px;
	right: 70px;
	width: 250px;
	max-width: calc(100% - 85px);
	background-color: var(--highlight-background);
	color: var(--highlight-text);
	box-shadow: 0 5px 15px var(--shadow-color);
	border-radius: 5px 0 5px 5px;
	overflow: hidden;
}

.settings.hidden {
	display: none;
}

.tools-horizontal {
	display: flex;
	flex-direction: row;
	border-bottom: solid 1px;
	color: var(--highlight-text);
}

.tools-horizontal .menu-item {
	display: flex;
	flex-basis: 25%;
	flex-grow: 1;
	flex-shrink: 1;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	border-right: solid 1px;
	padding: 10px;
}

.tools-horizontal .menu-item:not(.on):hover {
	background-color: rgba(120, 120, 120, 0.2);
}

.tools-vertical .menu-item:last-child {
	border-bottom: none;
}

.tools-horizontal .menu-item:last-child {
	border-right: none;
}

.menu-item .on {
	display: none;
}

.menu-item.on .on {
	display: initial;
}

.menu-item.on .off {
	display: none;
}

.menu-item.on {
	background-color: var(--lowlight-background);
	color: var(--base-text);
}

.menu-item .text {
	padding: 10px;
}

.dropdown .menu-item {
	display: flex;
	flex-direction: row;
	align-items: center;
	border-bottom: solid 1px;
	cursor: pointer;
}

.dropdown .menu-item:last-child {
	border-bottom: none;
}

.dropdown .menu-item:hover {
	background-color: #EEE;
}

.dropdown .menu-item .icon {
	padding: 10px 0 10px 10px;
}

a {
	text-decoration: none;
}

textarea {
	width: 100%;
	min-height: 60px;
}

button {
	width: 100px;
	padding: 10px;
	font-size: 18px;
	border: 0;
	background-color: transparent;
	margin: 0;
	cursor: pointer;
}

button.on {
	background-color: var(--midlight-background);
	color: var(--midlight-text);
}

button .on {
	display: none;
}

button .off {
	display: initial;
}

button.on .off {
	display: none;
}

button.on .on {
	display: initial;
}

.visualizer {
	width: 3px;
	height: 3px;
	position: fixed;
	background-color: #F00;
}

.no-content {
	padding: 5px 10px;
	text-align: center;
	background-color: #DDD;
}

#panels {
	position: fixed;
	top: 15px;
	left: 15px;
	width: 400px;
	max-width: calc(100% - 30px);
	max-height: calc(100% - 30px);
	display: flex;
	flex-direction: column;
}

#panels.hidden {
	display: none;
}

.panel {
	background-color: var(--highlight-background);
	color: var(--highlight-text);
	box-shadow: 0 5px 15px var(--shadow-color);
	border-radius: 5px;
	margin-bottom: 15px;
	overflow: hidden;
	background-image: linear-gradient(-45deg, var(--panel-gradient-one) 0%, transparent 20%, transparent 85%, var(--panel-gradient-two) 100%);
	border: solid 2px var(--highlight-background);
}

.panel.hidden {
	display: none;
}

#mapSettingsPanel {
	flex-shrink: 0;
	flex-grow: 0;
}

#mapSettingsPanel header > div {
	display: flex;
	align-items: center;
}

#mapSettingsPanel .menu {
	display: none;
}

#mapName {
	margin-left: 8px;
}

#spaceSettingsPanel {
	flex-shrink: 1;
	flex-grow: 0;
	display: flex;
	flex-direction: column;
}

#spaceSettings {
	overflow: auto;
}

#spaceSettings .overlay {
	display: grid;
	grid-template-columns: 40px 1fr 40px;
	border: solid 1px;
	border-radius: 5px;
	overflow: hidden;
	margin-bottom: 15px;
}

#spaceSettings .overlay .move-button {
	display: flex;
	align-items: center;
	justify-content: center;
	height: auto;
}

#spaceSettings .overlay .move-up-button {
	border-bottom: solid 1px;
}

#spaceSettings .overlay .move-button.off i {
	display: none;
}

#spaceSettings .overlay select {
	border-width: 0 0 1px 0;
}

#spaceSettings .overlay .angle-inputs {
	grid-column: 2 / span 2;
	padding: 0 10px;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 15px;
	padding: 5px;
}

#spaceSettings .overlay .angle-inputs input {
	border-width: 1px;
	min-height: 0;
	padding: 5px 3px 5px 10px;
}

#spaceSettings .overlay .lock {
	font-size: 0.8rem;
	display: flex;
	align-items: center;
	justify-content: center;
}

#spaceSettings .overlay .lock .active {
	display: none;
}

#spaceSettings .overlay .lock.active i {
	display: none;
}

#spaceSettings .overlay .lock.active i.active {
	display: inline;
}

#spaceSettings .overlay .angle-inputs > div {
	width: 50%;
}

#spaceSettings .overlay .angle-inputs > div > div {
	display: flex;
	flex-direction: row;
	justify-content: center;
	gap: 5px;
}

#spaceSettings .overlay .angle-inputs label {
	display: block;
	font-size: 0.8rem;
	text-align: center;
	font-family: "Noto Sans", sans-serif;
	font-weight: normal;
}

#spaceSettings .add-overlay {
	font-size: 0.8rem;
	float: right;
}

#spaceNotes {
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.panel header {
	display: flex;
	flex-direction: row;
	padding: 10px 11px;
}

.panel header > * {
	flex-grow: 1;
}

.panel > .content {
	border-top: solid 1px;
}

.inline-buttons {
	width: fit-content;
	flex-grow: 0 !important;
	flex-shrink: 0;
	display: flex;
	flex-direction: row;
}

.inline-buttons > * {
	width: fit-content;
	flex-grow: 0;
	flex-shrink: 0;
	margin: 0 0 0 4px;
	cursor: pointer;
	padding: 2px 4px;
	border: solid 1px;
	border-color: transparent;
	text-align: center;
}

.inline-buttons .icon-button {
	width: 30px;
}

.inline-buttons > .on {
	border-color: unset;
	border-radius: 3px;
}

.row {
	display: flex;
	flex-direction: row;
}

.row > * {
	flex-grow: 1;
}

.player,
.map-link {
	display: grid;
	grid-template-columns: 50px 1fr;
	border: solid 1px;
	margin-bottom: 10px;
	cursor: pointer;
	background-color: #FFF;
}

.map-link {
	grid-template-columns: 40px 1fr 40px;
}

.map-link.no-copy {
	grid-template-columns: 40px 1fr;
}

.map-link .player-role {
	border-right: none;
}

.map-link input {
	border-width: 0 1px;
	padding: 10px;
}

.map-link.no-copy input {
	border-width: 0 0 0 1px;
}

.map-link button {
	width: 100%;
	padding: 10px 0;
}

.player:hover {
	background-color: #EFEFEF;
}

.player:last-child {
	margin-bottom: 0;
}

.player > * {
	padding: 5px 10px;
}

.player-id .sub-id {
	font-size: 0.8rem;
	color: #555;
}

.player-role {
	color: #FFF;
	border-right: solid 1px;
	display: grid;
	align-items: center;
	justify-content: center;
}

.player-role.player-role-gm {
	background-color: #800;
}

.player-role.player-role-player {
	background-color: #060;
}

.player-role.player-role-spectator {
	background-color: #006;
}

#searchPlayers {
	border-top: solid 1px;
	padding: 10px 0 0;
	margin-top: 10px;
	position: relative;
}

#searchPlayers .search {
	margin-bottom: 10px;
}

#searchPlayers input {
	height: 40px;
	padding-right: 35px
}

#searchPlayersButton {
	position: absolute;
	right: 0;
	top: 17px;
	padding: 0;
}

.space-name {
	flex-shrink: 0;
	display: flex;
	align-items: center;
}

.space-name .icon {
	margin-right: 8px;
}

.note-form {
	transition: all 0.4s ease-in-out;
	max-height: 250px;
	overflow: hidden;
	flex-shrink: 0;
	margin-bottom: 15px;
}

.note-form .form-field {
	margin: 0;
	padding: 0;
}

.note-form .form-buttons {
	margin: 0;
	padding: 0;
	gap: 0;
}

.note-form textarea {
	outline: 0;
	border: solid 1px;
	padding: 8px;
}

.note-form button {
	width: fit-content;
	flex-grow: 0;
	height: 38px;
}

#panels .content {
	padding: 20px;
	max-height: 1000px;
	transition: all 0.4s ease-in-out;
	overflow: hidden;
}

#panels .content.hidden {
	max-height: 0;
	padding-top: 0;
	padding-bottom: 0;
	border-bottom-width: 0;
}

#panels .content:last-child {
	border-bottom: none;
}

#spaceNotes .content {
	flex-shrink: 1;
	flex-grow: 0;
	overflow: auto;
}

.note {
	display: flex;
	flex-direction: row;
	gap: 10px;
	margin-bottom: 15px;
}

.note:last-child {
	margin-bottom: 0;
}

.note .icon {
	flex-grow: 0;
	flex-shrink: 0;
	padding-top: 15px;
	display: flex;
	justify-content: center;
	width: 20px;
}

.note .note-content {
	flex-grow: 1;
	flex-shrink: 1;
}

.note .note-text {
	padding: 15px;
	background-color: #EEE;
	white-space: pre-wrap;
}

.note-edit {
	padding: 10px;
}

.note .note-controls {
	display: flex;
	flex-direction: row;
	font-size: 0.9rem;
}

.note .note-controls > * {
	padding: 5px;
}

.note .note-author {
	flex-basis: 100%;
}

.note-type-select {
	width:max-content;	
	border: solid #444 1px;
	flex-grow: 1;
}

.note-type-options {
	border: solid #444 1px;
	width: fit-content;
	box-shadow: 0 5px 5px var(--shadow-color);
	position: fixed;
	z-index: 100;
	background-color: #FFF;
}

.note-type-options.hidden {
	display: none;
}

.note-type-select {
	display: flex;
	flex-direction: row;
	gap: 10px;
}

.note-type-select div {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 0 10px 0 0;
}

.note-type-select div:first-child {
	flex-shrink: 0;
	flex-grow: 0;
	padding: 10px 0 10px 10px;
}

.modal.hiding {
	opacity: 0;
}

.modal.hidden {
	display: none;
}

@media (max-width: 500px) {
	body {
		font-size: 14px;
	}

	.panel {
		border-radius: 0;
	}

	#mapSettingsPanel {
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
	}

	#mapSettingsPanel .menu {
		display: block;
	}

	#spaceSettingsPanel {
		position: fixed;
		bottom: 0;
		left: 0;
		width: 100%;
		box-shadow: 0 -2px 15px var(--shadow-color);
		margin-bottom: 0;
		max-height: 80%;
		flex-direction: column-reverse;
	}

	#toolBelt {
		top: 62px;
		right: 8px;
		transition: all 0.2s ease-in-out;
	}
}