*, *::before, *::after {
    box-sizing: border-box;
}

@font-face {
	font-family: "GameConsole";
	src: url(/9be04a011dc2beea99854a1dd93267bf.ttf);
}

/*
@font-face {
	font-family: "GameConsoleBold";
	src: url("../fonts/Sansation_Bold.ttf");
}
*/

@font-face {
	font-family: "Header";
	src: url(/1455671bca5476c7d76d896eb844614d.TTF);
}

html, body {
    margin: 0;
    padding: 0;
	width: 100%;
	/* height: 100vh; */
	background-color: #372F2F;
	color: #FFFFFF;
	font-family: GameConsole, Verdana, Geneva, Tahoma, sans-serif;
	font-size: 20px;
}

/* https://css-tricks.com/css-fix-for-100vh-in-mobile-webkit/ */
body {
	min-height: 100vh;
	min-height: -webkit-fill-available;
}
html {
	height: -webkit-fill-available;
}

a, a:visited
{
	color: #a6c8fc;
}

.input-zone {
	/*
    align-items: center;
     display: flex;
    flex-direction: row; */
    margin: 10px;
	width: 100%;
}

.input-zone-input {
    flex: 1;
    margin-right: 10px;
}

.message-author {
    font-weight: bold;
}

.messages {
    margin: 10px;
	margin-top: 0px;
	margin-bottom: 0px;
	height: calc(100vh - 110px); /* TODO make non hardcoded */
    overflow: hidden; /* Prevent canvas from including scroll bar size */
    padding: 0px;
	display: block;
	background-color: #000000;
	border: 1px solid #796666;
	border-radius: 3px;
	white-space: pre-wrap;
}

.mainButtonHolder {
	min-width: 19%;
	width: 33%;
	min-height: 25px;
	max-height: 25px; /* Fix firefox being ever so slightly too tall */
	margin-bottom: 10px;
	margin-left: 3px;
	margin-right: 3px;
	background-image: linear-gradient(#443a3a, #443a3a);
	display: inline-block;
	vertical-align: top;
}

.mainButton {
	font-family: GameConsole, Verdana, Geneva, Tahoma, sans-serif;
	width: 100%;
	height: 100%;
	font-weight: 500;
	padding-left: 2px;
	padding-right: 2px;
	padding-top: 0px;
	padding-bottom: 0px;
}

/* The default button style is:
	background: linear-gradient(to bottom, #323030 0%,#282727 50%,#222020 51%,#0d0d0d 100%); 
*/

.mainButtonSubscribe {
	background: linear-gradient(to bottom, #003f00 0%,#003600 50%,#002e00 51%,#002000 100%); 
}

.mainButtonNavigation {
	background: linear-gradient(to bottom, #302b44 0%,#2d2842 50%,#272338 51%,#1e1b2b 100%); 
}

.mainButtonSystem {
	background: linear-gradient(to bottom, #3d342a 0%,#383027 50%,#312a22 51%,#302921 100%); 
}

.mainButtonBottomRow{
	margin-bottom: 0px;
}

.mainButtonText {
	overflow: hidden;
	white-space: normal;
	display: inline-block;
}

.mainButtons
{
	text-align: center;
	margin-top: 0px;
	white-space: nowrap;
	display: flex;
}

.portraitButtonRowOnly
{
	display: none;
}

#gameText {
	width: 200px;
}

#topButtons
{
	float: right;
	overflow: auto;
}

#leftControls
{
	float: left;
	width: 250px;
	height: 100%;
	/*
	height: auto;
	*/
	/*
	overflow-y: hidden;
	*/

	position: relative; /* So map panel can align to the bottom of it */
	display: flex;
	flex-direction: column;
	margin-right: 10px;
	margin-left: 10px;
}

#rightControls
{
	width: 100%;
	min-height: 100%;
	height: auto;
}

#gameInterface
{
	display: block;
	height: auto;

	/* min-height: 100%; */
	height: calc(100vh - 100px); /* TODO make non hardcoded */
	overflow: hidden;
}

#mapPanel
{
	width: 250px;
	min-height: 200px;

	/*
	background-color: grey;
	*/

	margin-bottom: 10px;


	/*
	position: absolute;
	bottom: 0;
	*/
	order: 99; /* display at bottom */

	border: 1px solid #796666;
	border-radius: 3px;
}

/* Short numbers */
#statsPanel
{
	font-family: Header, Verdana, Geneva, Tahoma, sans-serif;
}

/* Long description */
#statusPanel
{
	/*overflow: hidden;*/ /* Prevent canvas from including scroll bar size */
	overflow:hidden;
/*
	flex-shrink: 1;
*/
	height: 100%;

	background-color: #000000;
	border: 1px solid #796666;
	border-radius: 3px;

	padding: 0px;

	margin-top: 10px;
	margin-bottom: 10px;

	white-space: pre-wrap;
}

#statusPanelExamineSelfButtonContainer
{
	display: none;
}

#header
{
	overflow: auto;
	color: #c7df23;
	font-family: Header, Verdana, Geneva, Tahoma, sans-serif;
	position: relative; /* allow child headertext to center itself */
}

#headerTextPortrait
{
	display: none;

	color: #c7df23;
	font-family: Header, Verdana, Geneva, Tahoma, sans-serif;
	width: 100%;
	padding-left: 5px;
	padding-right: 5px;
	padding-top: 5px;
	/*
	word-wrap: break-word;
	white-space: normal;
	*/
	white-space: nowrap;;
	text-align: center;
}

#header button
{
	font-size: 16px;
	margin-top: 2px;
	margin-bottom: 2px;
	margin-right: 5px;
}

#modalBackground
{
	display: none; /* Hidden by default */
	z-index: 100; /* Sit on top */
}

#loadingBackground
{
	z-index: 50; /* Sit on top of most things to hide the game loading */
	display: block;
}

#modalBackground, #loadingBackground
{
	position: fixed; /* Stay in place */
	left: 0;
	top: 0;
	width: 100%; /* Full width */
	height: 100%; /* Full height */
	overflow: auto; /* Enable scroll if needed */
	
	/*background-color: rgb(0,0,0);*/ /* Fallback color */
	/*background-color: rgba(0,0,0,0.7);*/ /* Black w/ opacity */
	background: rgb(27,23,23);
	background: linear-gradient(0deg, rgba(27,23,23,1) 0%, rgba(46,40,40,1) 100%);
}

/* This prevents the modal window from breaking the layout when it is displayed.  This causes a scrollbar to appear on firefox
	which then breaks the canvas scrollers width. */
html
{
	overflow: hidden;
}

.modalContent
{
	display: none; /* Hidden by default */
	background-color: #461616;
	margin: 15% auto; /* 15% from the top and centered */
	padding: 20px;
	border: 1px solid #888;
	width: 80%; /* Could be more or less, depending on screen size */
	box-shadow: 5px 5px 10px 5px rgba(0, 0, 0, 0.3);
}

.loadingContent
{
	background-color: #312e0e;

	margin: 15% auto; /* 15% from the top and centered */

	padding: 20px;
	border: 1px solid #888;
	
	
	width: 80%; 
	box-shadow: 5px 5px 10px 5px rgba(0, 0, 0, 0.3);
}

.loadingDot
{
	display: inline-block;
	background-color: #FFF;

	margin: 5px;
	border: 1px solid #888;
	
	
	width: 10px; 
	height: 10px;
	box-shadow: 5px 5px 10px 5px rgba(0, 0, 0, 0.3);

	-webkit-animation: spin linear 3s infinite;
	animation: spin linear 3s infinite;
}

#fullscreenPanel
{
	position: fixed;
	z-index: 10;
	right: 40px;
	top: 100px;
	background-color: #002000;
	padding: 10px;
	border: 1px solid #888;
	text-align: center;
	display: none; 
}

#requestFullscreenButton, #hideLandscapePanelButton
{
	padding: 30px;
}

#hideFullscreenPanelButton
{
	padding: 30px;
	margin-left: 60px;
}


#landscapePanel
{
	position: fixed;
	z-index: 9;
	right: 40px;
	background-color: #000f00;
	padding: 10px;
	bottom: 100px;
	border: 1px solid #888;
	text-align: center;
	display: none;
}
#devButtonBar
{
	display: none; /* Hidden by default */
}

#headerText
{
	display: inline;
	top: 50%;
	position: absolute;
	transform: translate(0%, -50%);
	left: 20px;

	overflow: clip;
	white-space: nowrap;
}

button
{
	border: 1px solid #0d0d0d;
	border-radius: 3px;
	background: linear-gradient(to bottom, #323030 0%,#282727 50%,#222020 51%,#0d0d0d 100%); 
	color: white;
	font-size: 20px;

	touch-action: manipulation; /* useful to help reduce accidental double tap to zoom on ios+safari */

	/* Disable selection, since it feels weird to do so for a button */
	-webkit-touch-callout:none;
	-webkit-user-select:none;
	-khtml-user-select:none;
	-moz-user-select:none;
	-ms-user-select:none;
	user-select:none;
	-webkit-tap-highlight-color:rgba(0,0,0,0);
}


button:hover
{
	/*  background-image: linear-gradient(#252424, #0d0d0d);  */
	/* Allow hover state support to be driven by javascript */
	background-image: var(--button-hover-background-image);
}

button:active
{
	/* background-image: linear-gradient(#1d1c1c, #0d0d0d); */
	/* Changing this also be to be JS in order to support button colorization */
	background-image: var(--button-active-background-image);	
}

/* no longer used since disabled buttons break hotkeys in firefox, and cause a weird scroll issue if dragging down
and ending on a disabled button */
button:disabled
{
	background-image: linear-gradient(#443a3a, #443a3a);
}

::-webkit-scrollbar {
	width: 15px; 
}

::-webkit-scrollbar-track {
  background-color: #1C1919;
}

::-webkit-scrollbar-thumb {
  /*background: #4e4e4e;*/
  /*border-radius: 25px;*/
  background: linear-gradient(to right, #303030 0%,#303030 50%,#282828 51%,#282828 100%); 
}

#worldItemsScroller
{
	background-color: #222222;
	width: 300px;
	max-height: 300px;
	position: absolute;
	right: 150px;
	bottom: 85px;
	color:#584f4f;
	overflow-y:auto;
	border: 1px solid #888;
	box-shadow: 5px 5px 10px 5px rgba(0, 0, 0, 0.3);
	z-index: 10;
}

.worldItemButton
{
	/*margin-bottom: 10px;*/
	display: inline;
	width: 100%;
}

.worldItemButtonColumn
{
	width: 100%;
}

.worldItemHotkeyColumn
{
	width: 50px;
	text-align: right;
}

#communityDropdown, #systemDropdown
{
	background-color: #222222;
	width: 300px;
	/*max-height: 300px;*/
	position: absolute;
	top: 40px;
	color:#584f4f;
	overflow-y:auto;
	border: 1px solid #888;
	box-shadow: 5px 5px 10px 5px rgba(0, 0, 0, 0.3);
	z-index: 5;
}

#communityDropdown
{
	right: 150px;
}

#systemDropdown
{
	right: 10px;
}

#systemInstall
{
	display: none;
}

.communityButton
{
	/*margin-bottom: 10px;*/
	display: inline;
	width: 100%;

	padding-top: 3px;
	padding-bottom: 3px;
}

.communityButton:not(:first-child) {
    margin-top: 15px;
}

#communitySubscribe, #systemSubscribe
{
	border: 1px solid #0d0d0d;
	border-radius: 3px;
	background: linear-gradient(to bottom, #003f00 0%,#003600 50%,#002e00 51%,#002000 100%); 
	color: white;
	font-size: 20px;
}

#communitySubscribe:hover, #systemSubscribe:hover
{
	background-image: linear-gradient(#123b1b, #002000);
}

#communitySubscribe:active, #systemSubscribe:active
{
	background-image: linear-gradient(#091f0e, #002000);
}


#quitPanel
{
	position: fixed;
	z-index: 10;
	right: 40px;
	top: 100px;
	background-color: #1d0f0f;
	padding: 10px;
	border: 1px solid #888;
	text-align: center;
	display: none; 
}

#quitPanel button
{
	padding: 30px;
}

#confirmQuitButton
{
	background: linear-gradient(to bottom, #580101 0%,#4d0101 50%,#2b0101 51%,#290000 100%); 
	color: white;	
	margin-left: 60px;
}

#confirmQuitButton:hover
{
	background-image: linear-gradient(#3b0303, #1b0101);
}

#confirmQuitButton:active
{
	background-image: linear-gradient(#1d0202, #0f0101);
}


@-webkit-keyframes spin {
	0% {
		-webkit-transform: rotate(0);
		transform: rotate(0);
	}
	50% {
		-webkit-transform: rotate(180deg);
		transform: rotate(180deg);
	}
	100% {
		-webkit-transform: rotate(360deg);
		transform: rotate(360deg);
	}
}

@keyframes spin {
	0% {
		-webkit-transform: rotate(0);
		transform: rotate(0);
	}
	50% {
		-webkit-transform: rotate(180deg);
		transform: rotate(180deg);
	}
	100% {
		-webkit-transform: rotate(360deg);
		transform: rotate(360deg);
	}
}

#textEntryPanel
{
	display: none;
}

#textEntry
{
	margin: 10px;

	margin-top: 10px;
	margin-bottom: 0px;

	background-color: #2b2929;
	border: 1px solid #796666;
	border-radius: 3px;
	padding: 10px;

	color: #EEE;
	font-size: 14px;
}

#textParagraphPanel
{
	display: none;
}

#textParagraph
{
	margin: 10px;

	margin-top: 10px;
	margin-bottom: 0px;

	background-color: #2b2929;
	border: 1px solid #796666;
	border-radius: 3px;
	padding: 10px;

	color: #EEE;
	font-size: 14px;

	width: 100%;
	height: 100%
}

.webWindow
{
	position: fixed;
	z-index: 9;
	background-color: #121e39;
	border: 1px solid #888;
	display: none;
	overflow: hidden;
	box-shadow: black 0px 0px 20px;
	padding: 10px;
}

#textEditorWindow
{
	left: 40px;
	top: 40px;
	width: 1200px;
	height: 500px;
	/* display: block; */
}

.windowTitleBar
{
	background-color: #7784B0;
	cursor: move;
	text-align: center;
	font-weight: bold;
	color: black;
	font-size: 24px;
	margin: -10px -10px 4px -10px;	
}

.windowResizer
{
	cursor:nwse-resize;
	
	width: 30px;
	height: 30px;
	right: 0px;
	bottom: 0px;
	position: absolute;
	background-image: url("/images/window-resize.png");
}

/*
.windowResizer:after{
	content:"";
	position:absolute;
	border-top:1px solid red;
	width:40px;
	transform: rotate(135deg);
	transform-origin: 0% 0%;
}
*/

.closeWindowButton
{
	position: absolute;
	right: 5px;
	width: 30px;	
	height: 28px;
	font-size: 14px;


	border: 1px solid #121e39;
	border-radius: 3px;
	background: linear-gradient(to bottom, #c5c5df 0%,#c5c5df 50%,#b3b3dd 51%,#b3b3dd 100%); 
	color: black;
	font-size: 20px;
}

#textEditorMainRow /* contains key select list + text editor */
{
	display: flex;
	height: 80%; /* there is probably some more elegant way than hardcoding this (using flexbox for the parent layout?) but I couldn't figure it out.  Css sucks. */
}

#textEditorKeySelect
{
	min-width: 400px;
	width: 400px;
	overflow: scroll;
}

#textEditorTextEdit
{
	width: 100%;
	font-size: 18px;
	background-color: black;
	color: white;
	border: 1px solid #2d4374;
	padding: 10px;
	/*
	font-family: GameConsole, Verdana, Geneva, Tahoma, sans-serif;
	*/
}

#textEditorWindowContent
{
	display: flex;
	flex-direction: column;
}


.textEditorTab
{
	background-color: #2d4374;
	background-image: none;
	padding-left: 10px;
	padding-right: 10px;
	border: 0px;
	border-radius: 0px;
}

.textEditorTab:hover
{
	background-color: #4868af;
	background-image: none;
}

.textEditorTabActive
{
	background-color: #3c5997;
	font-weight: bold;
}

#textEditorCategoryTabBar
{
	margin-bottom: 5px;
	background-color: #2d4374;
	border-bottom: 1px black;;
}

.textEditorKey
{
	background-color: none;
	background-image: none;	
	border: 0px;
	border-radius: 0px;
	width: 100%;
	text-align: left;
	font-size:15px;
}

.textEditorKeyActive
{
	background-color: #3c5997;
	background-image: none;	
	font-weight: bold;
}

.textEditorKey:hover
{
	background-color: #2b3b5f;
	background-image: none;
}

#textEditorBottomButtonBar
{
	margin-top: 5px;	
}

#textEditorTextEdit:focus
{
	outline:none;
}

#textEditorRenameDeletePopupWindow
{
	left: 150px;
	top: 200px;
	/*
	display: block;
	*/
	z-index: 11;
	width: 550px;
	height: 110px;
}

#textEditorAddNewPopupWindow
{
	left: 150px;
	top: 200px;

	z-index: 11;
	width: 650px;
	height: 200px;
}

#textEditorRename
{
	margin-bottom: 5px;
	font-size: 18px;
	width: 100%;
}

#textEditorAddNewText
{
	margin-bottom: 5px;
	font-size: 18px;
	width: 100%;
}


#textEditorRenameButton
{
	float: right;
}

#textEditorDeleteButton
{
	float: right;
	margin-right: 50px;
}

#parseTesterWindow
{
	left: 100px;
	top: 10px;
	width: 800px;
	height: 600px;
}

#parseTesterMainRow /* contains key select list + text editor */
{
	display: flex;
	height: 70%; /* there is probably some more elegant way than hardcoding this (using flexbox for the parent layout?) but I couldn't figure it out.  Css sucks. */
}

#parseTesterTextEdit
{
	width: 100%;
	font-size: 18px;
	background-color: black;
	color: white;
	border: 1px solid #2d4374;
	padding: 10px;
	margin-bottom: 10px;
	font-family: GameConsole, Verdana, Geneva, Tahoma, sans-serif;
}

#parseTesterBottomButtonBar
{
	text-align: center;
}

#parseTesterBottomButtonBar p
{
	margin: 4px 0;
}

#loginRegisterForm
{
	display: none;
	font-size: 14px;
	overflow-y: auto;
	margin: 20px;
}

.loginRegisterFormHeader
{
	font-size: 16px;
	font-weight: bold;
	margin-bottom: 20px;
}

#loginSubForm
{
	display: inline-block;
	margin-right: 20px;
	vertical-align: top;
}

#registerSubForm
{
	display: inline-block;
	width: 500px;
	border-left: 1px dashed black;
	padding-left: 20px;
}

#stillWaitingMessage
{
	display: none;
}

#characterVisualizationEditorWindow
{
	left: 150px;
	top: 20px;

	z-index: 11;
	width: 1000px;
	height: 500px;
}

/* #characterVisualizationEditorWindowContent
{
	display: flex;
	flex-direction: column;
} */

#characterVisualizationEditorMainRow /* contains key select list + text editor */
{
	display: flex;
	height: 80%; /* there is probably some more elegant way than hardcoding this (using flexbox for the parent layout?) but I couldn't figure it out.  Css sucks. */
}

#characterVisualizationEditorDisplay
{
	width: 100%;
	min-width: 150px;
	min-height: 200px;
	height: 100%;
	background-color: black;
	color: white;
	border: 1px solid #2d4374;
}

#characterVisualizationEditorRightSidebar
{
	min-width: 400px;
	width: 400px;
	overflow: scroll;
}

#characterVisualizationEditorCategoryTabBar
{
	margin-bottom: 5px;
	background-color: #2d4374;
	border-bottom: 1px black;;
}

#characterVisualizationEditorBoneTitle
{
	background-color: #111726;
	text-align: center;
	font-size: 16pt;
	padding-bottom: 2px;
	color: #999;
}

.characterVisualizationEditorJson
{
	margin: 10px;
	margin-top: 0px;
	margin-bottom: 0px;
    padding: 0px;
	background-color: #000000;
	border: 1px solid #796666;
	border-radius: 3px;
	white-space: pre-wrap;	
	font-family: 'Courier New', Courier, monospace;
	font-size: 12px;;
}

#cachedFileListEditorWindow
{
	left: 175px;
	top: 40px;

	z-index: 11;
	width: 1000px;
	height: 500px;
}

#cachedFileListMainRow /* contains key select list + text editor */
{
	display: flex;
	height: 80%; /* there is probably some more elegant way than hardcoding this (using flexbox for the parent layout?) but I couldn't figure it out.  Css sucks. */
}

#cachedFileListSelect
{
	min-width: 400px;
	width: 400px;
	overflow: scroll;
}

#cachedFileListTextEdit
{
	width: 100%;
	font-size: 12px;
	background-color: black;
	color: white;
	border: 1px solid #2d4374;
	padding: 10px;
	/*
	font-family: GameConsole, Verdana, Geneva, Tahoma, sans-serif;
	*/
}
