html, body {
	margin: 0;
	width: 100%;
	height: 100%;
	background-color: black;
	display: flex;
	flex-direction: column;
	color: white;
	-webkit-print-color-adjust: exact;
}

/* NAV */

nav {
	background-color: #2a579a;
	width: 100%;
}

nav > ul {
	width:100%;
	display: flex;
	flex-direction: row;
	list-style-type: none;
	margin: 0;
	padding: 0;
	overflow: hidden;
	background-color: #2a579a;
}

nav input {
	display: block;
	width: 10%;
	height: 34px;
	position: absolute;
	cursor: pointer;
	opacity: 0; /* hides input */
}

nav .submenu img {
	width: 30px;
	height: 30px;
	margin-left: 40%;
}

img:hover ~ .tooltip {
	position: absolute;
	z-index: 1;
	top: 0;
	overflow: visible;
}

nav li {
	float: left;
	margin: auto auto;
	display: flex;
	flex: 1;
	justify-content: center;
	align-items: center;
}

nav li a {
	margin: auto;
	display: block;
	color: white;
	text-align: center;
	padding: 1.1em 1.1em;
	text-decoration: none;
}
.logo {
	width: 130px;
	padding: 0 0;
}

.bookmark-links a {
	margin-top: 5px;
	margin-bottom: 5px;
	display: block;
}

.logo > img { width: 130px; }

#label-menu {
	position: absolute;
	z-index: -1;
	width:8%;
}

#noscript {
	position: fixed;
	top: 0px;
	left: 0px;
	z-index: 3000;
	height: 100%;
	width: 100%;
	background-color: black;
}

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

#viewport {
	height: 100%;
	overflow-y: hidden;
}

#editors, #bookmarks, #pdf, #options { flex: 1; }
#bookmarks, #pdf, #options {
	max-width: 20%;
	display: none;
}

nav input:checked > .submenu ul,
.submenu input:checked ~ ul {
	visibility: visible;
	opacity: 1;
	display: flex;
	flex-direction: column;
	top: 50px;
	margin: 0;
}

.active {
	display: none;
	margin-top: 10px;
}

.submenu input ~ div {
	color:black;
	font-size: x-large;
}

.submenu input:checked ~ div {
	color:#0699f7;
}

.checkbox_change_editor {
	opacity: 0;
	width: 40px;
	position: absolute;
	margin: 2px 0 3px 0;
	height: 32px;
}

.checkbox_change_editor:checked > .checkbox-text,
.checkbox_change_editor:checked ~ .checkbox-text {
	color: white;
	background-color: #c8cbcf;
	border: 0;
	border-radius: 3px;
}

.checkbox-text {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 34px;
	width: 50px;
}

.checkbox-text img {
	width: 40px;
	height: 30px;
}

.overflow-content {
	color: white;
}

.change-editor {
	right: 10%;
	z-index: 2;
	margin-bottom: 5px;
	margin-left: 80px;
}

.submenu {
	margin: auto auto;
}

#options {
	min-width: 100px;
	max-width: 300px;
	height: 100%;
	max-height: 100%;
	overflow: auto;
	margin-left: 10px;
	color: white;
}

#options > * {
	margin: 10px;
}

#options li:hover, #options input:hover {
	background-color: #dee0e2;
}

.checkbox_change_editor {
	opacity: 0;
	width: 40px;
	position: absolute;
	margin: 2px 0 3px 0;
	height: 32px;
}

.checkbox_change_editor:checked > .checkbox-text,
.checkbox_change_editor:checked ~ .checkbox-text {
	color: white;
	background-color: #c8cbcf;
	border: 0;
	border-radius: 3px;

}

.smaller-title {
	width:10%
}

.padding {
	padding: 10px;
}

#title {
	width: 50% !important;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	text-align: center;
}

#template-popup, #autoload-popup, #loading-file-popup { display: none; }

#bookmarks {
	width: 20%;
	border-right: 1px solid #ccc;
	height: 100%;
	overflow: auto;
}

#visual-editor, #code-editor {
	height: 100%;
	border-right: 1px solid white;
}

/* DESKTOP WORKFLOW */

@media only screen and (min-width: 900px) {
	#editors {
		width: 100%;
	}
}

/* MOBILE WORKFLOW */

@media only screen and (max-width: 900px) {
	.options-width{
		max-width:100%;
	}
	.hide-if-mobile{
		display:none !important;
	}
}

/* Bookmarks styles */

.header1, .header2, .header3{ color:white; }
.header1:hover, .header2:hover, .header3:hover{ color:#2a579a; }

.header1{margin-left:8px;}
.header2{margin-left:15px;}
.header3{margin-left:23px;}


#bookmarks {
  counter-reset: section;
}

.header1 {
  counter-reset: subsection;
}

.header2 {
  counter-reset: subsubsection;
}

.header1::before {
  counter-increment: section;
  content: counter(section) ". ";
}

.header2::before {
  counter-increment: subsection;
  content: counter(section) "." counter(subsection) " ";
}

.header3::before {
  counter-increment: subsubsection;
  content: counter(section) "." counter(subsection) "." counter(subsubsection) " ";
}

/* Overriding creta styles */
table, td, th, tr {
	border: 1px solid white !important;
}

.popup {
	background-color: black !important;
}

.image > img {
	background-color: white;
}

.edit-controls > div {
	color: white;
}

.center {
	text-align: center;
}
