body {
	counter-reset: h2counter;
}

header {
	position: relative;
	color: white;
	width: 100%;
	background-color: #50789a;
	height: 80px; 
	border-color: black;
	border-width: 1px;
	border-style: solid;
	padding-top: 10px;
}

main {
	position: relative;
	float: right;
	width: 81%;
	vertical-align: top;
	font-size: 90%;
}

footer {
	display: inline-block;
	width: 100%;
	position: relative;
	background-color: #b4b4b4;
	border-color: black;
	border-width: 1px;
	border-style: solid;
	margin-top: 7px;
	padding-top: 5px;
	padding-bottom: 5px;
}

footer div {
	display: inline;	
}

article h1 { counter-reset: h2counter; }
article h2 { counter-increment: h2counter; counter-reset: h3counter; }
article h3 { counter-increment: h3counter; counter-reset: h4counter; }
article h4 { counter-increment: h4counter; counter-reset: h5counter; }
article h5 { counter-increment: h5counter; counter-reset: h6counter; }
article h6 { counter-increment: h6counter;  }

article h2:before { content: counter(h2counter) " - "; }
article h3:before {	content: counter(h2counter) "." counter(h3counter) " - "; }
article h4:before {	content: counter(h2counter) "." counter(h3counter) "." counter(h4counter) " - "; }
article h5:before {	content: counter(h2counter) "." counter(h3counter) "." counter(h4counter) "." counter(h5counter) " - " }
article h6:before {	content: counter(h2counter) "." counter(h3counter) "." counter(h4counter) "." counter(h5counter) "." counter(h6counter)" - " }

article h2.home:before { content: ""}

article h4, h5, h6 {
	font-size: 1.17em;
	margin-top: 1em;
 	margin-bottom: 1em;
}

th a {
	display: block;
	width: 100%;
	color: black !important;
}

a[href] {
	color: #0000e1;
	text-decoration: none;
}

a {
	color: black;
	text-decoration: none;
}

li {
	list-style-position: inside;
}

table {
	border-color: black;
	border-width: 1px;
	border-style: solid;
	border-collapse: collapse;
	margin-top: 7px;
	margin-bottom: 7px;
}

td {
	border-color: black;
	border-width: 1px;
	border-style: solid;
	padding-left: 2px;
	padding-right: 2px;
}

th {
	overflow: hidden;
    white-space: nowrap;
	border-color: black;
	border-width: 1px;
	border-style: solid;
	background-color: #d7d7d7;
	min-width: 20px;
	text-align: left;
	padding-left: 2px;
	padding-right: 2px;
}

form {
	display: table;
}

pre {
	color: black;
	background-color: #d7d7d7;
	white-space: pre-wrap;
	word-break: break-all;
}

figure {
	display: table;
	margin: 0px;
}

figcaption {
	display: table-caption;
	caption-side: bottom; 
}

img {
	max-width: 100%;
}

button, select, input[type="color"] {
	border-style: solid;
	border-color: black;
	border-width: 1px;
}

button img {
	margin-right: 5px;
	vertical-align: middle;
}

button:disabled img {
	opacity: 0.2;
}

video {
	width: 320px;
}

textarea {
	width: 60vw;
	height: 60vh;
}

p {
	text-align: justify;
}

#menu {
	float: left;
	width: 18%;
	background-color: #b4b4b4;
	vertical-align: top;
	border-color: black;
	border-width: 0px 1px 1px 1px;
	border-style: solid;
	text-align: left;
	padding-top: 2px;
}	

#menu ul {
	padding: 7px;
	margin: 7px;
}

#langs {
	position: absolute;
    top: 20px;
    right: 20px;
}

#user {
	position: absolute;
    top: 20px;
    right: 125px;
}

#logout-button {
	margin-left: 5px;
}

#search {
	position: absolute;
    bottom: 5px;
    right: 20px;
}

#sidebar {
	display: flex;
	flex-direction: column;
	float: right;
	margin: 5px 0px 5px 10px;
}

#type-menu {
	margin-left: auto;
}

#actions {
	background-color: #b4b4b4;
	vertical-align: top;
	border-color: black;
	border-width: 1px 1px 1px 1px;
	border-style: solid;
	padding: 5px;
	margin-top: 5px;
}

#actions a {
	display: block;
}

#dialog {
	width: 49%;
	max-height: 50%;
	overflow-y: auto;
	padding: 10px;
	border-color: black;
	border-width: 1px;
	border-style: solid;
	white-space: pre-wrap;
}

#dialog::backdrop {
	background-color: rgba(84, 84, 84, 0.5);
}

#dialog img {
	width: 30px;
	min-width: 30px;
	vertical-align: middle;
	margin-right: 3px;
}

#progress-bar {
	width: 100%;
}

#cancel-button {
	float: right;
}

#qrcode {
	margin-left: 5px;
}

.select {
	display: block;
	margin-top: 7px;
	margin-bottom: 14px;
}

.select-index {
	width: 100%;
	overflow: auto;
}

.select-header {
	border-color: black;
	border-width: 1px;
	border-style: solid;
	background-color: #92abd9;
	margin-bottom: 7px;
	display: inline-block;
    width: 100%;
}

.select-buttons {
	margin-top: 7px;
}

.select-menu {
	float: right;
}

.reference-field {
	background-color: #92abd9;
}

.progress-dialog {
	background-color: white;
}

.success-dialog {
	background-color: green;
	color: white;
}

.warning-dialog {
	background-color: yellow;
	color: black;
}

.error-dialog {
	background-color: red;
	color: white;
}

.javascript-disabled-warning {
	background-color: yellow;
	color: black;
	margin-top: 5px;
	padding: 5px;
	font-size: 115%;
	border-color: black;
	border-width: 1px 1px 1px 1px;
	border-style: solid;
}

.order-column {
	background-color: #8DA3DA;
}

.medium-textarea {
	display: block;
	width: 600px;
	height: 300px;
}

.small-textarea {
	width: 300px;
	height: 100px;
}

.menu-title {
	display: inline;
	font-size: 115%;
	font-weight: bold;
	margin-left: 3px;
}

.image {
	display: table;
	background-color: #d7d7d7;
	border-color: black;
	border-width: 1px;
	border-style: solid;
	text-align: center;
	font-size: 75%;
	margin-left: auto;
	margin-right: auto;
}

.image img {
	border: 0px;
}

.icon {
	width: 16px;
	min-width: 16px;
	margin: 2px;
	margin-right: 5px;
}

.small-icon {
	width: 10px;
	min-width: 10px;
	margin: 2px;
}

.big-icon {
	width: 22px;
	min-width: 22px;
	margin: 2px;
	margin-right: 5px;
	vertical-align: middle;
}

.export-button {
	float: right;
	margin-left: 5px;
}

.limit {
	float: right;
	margin: 3px 0px 3px 3px;
}

.offset {
	display: inline-block;
	border-color: black;
	border-width: 1px;
	border-style: solid;
	padding: 2px;
	color: black;
	background-color: #d7d7d7;
	margin-bottom: 1px;
	margin-left: 1px;
}

.near-selected-offset {
	display: inline-block;
	border-color: black;
	border-width: 1px;
	border-style: solid;
	padding: 2px;
	background-color: #b2bacd;
	color: black;
	font-size: 110%;
	margin-bottom: 1px;
	margin-left: 1px;
}

.selected-offset {
	display: inline-block;
	border-color: black;
	border-width: 1px;
	border-style: solid;
	padding: 2px;
	background-color: #8DA3DA;
	color: black;
	font-size: 125%;
	margin-bottom: 1px;
	margin-left: 1px;
}

.reference-output {
	margin-top: 5px;
	margin-bottom: 5px;
	font-size: 125%;
}

.field-output {
	margin-top: 5px;
	margin-bottom: 5px
}

.search-output {
	margin-top: 5px;
	margin-bottom: 5px;
	font-size: 125%;
}

.center {
	text-align: center;
	width: 100%;
}

.right {
	float: right;
}

.left {
	float: left;
}

.date {
	font-size: 75%;
}

.calendar {
	margin-top: 10px;
}

.calendar-month {
	width: 100%;
}

.calendar-month td {
	width: 14%;
	text-align: left;
}

.calendar-month a {
	color: black;
	font-size: 75%;
}

.calendar-day {
	background-color: #a1a1a1;
}

.calendar-today {
	color: white;
	background-color: blue;
}

.message {
	font-size: 125%;
	font-weight: bold;
}

.object-radio-input {
	width: 60vw;
	display: block;
	text-align: left;
}

.objects-textarea-input {
	width: 400px;
	height: 200px;
}

.preview {
	display: table;
	border-color: black;
	border-width: 1px;
	border-style: solid;
	background-color: #d7d7d7;
	margin-top: 10px;
	margin-bottom: 10px;
	width: 100%;
}

.preview h2 {
	margin-top: 5px;
}

.preview time {
	font-size: 75%;
}

.preview img {
	float: left;
	margin-right: 5px;
}

.preview p {
	margin: 5px;
}

.preview .field-output {
	font-size: 75%;
	margin-left: 5px;
}

.field-range {
	font-size: 70%;
	margin-left: 5px;
}

.clear-binary-input {
	margin-left: 5px;
}

.binary-input-size {
	margin-left: 5px;
}

.search-button {
	margin-left: 5px;
}

.CodeMirror {
	width: 60vw;
	height: 60vh !important;
}

.mce-tinymce {
	width: 60vw !important;
}

.hidden {
	display: none;
}

@media screen and (max-width: 900px) {
	header {
		height: auto;
		padding-bottom: 5px;
	}
	
	main {
		width: 77%;
	}
	
	#menu {
		width: 22%;
	}
	
	#user {
		position: static;
	}
	
	#langs {
		position: static;
	}
	
	#search {
		position: static;
	}
}

@media screen and (max-width: 600px) {
	main {
		float: none;
		width: 100%;
	}
	
	textarea {
		width: 75vw;
	}
	
	#sidebar {
		float: none;
		margin-left: 0px;
	}
	
	#menu {
		float: none;
		width: 100%;
	}	
	
	.object-radio-input {
		width: 75vw;
	}
	
	.CodeMirror {
		width: 75vw;
	}

	.mce-tinymce {
		width: 75vw !important;
	}
}

@media print {
	main {
		float: none;
		width: 100%;
	}
	
	#menu {
		display: none;
	}	
		
	#type-menu {
		display: none;
	}
	
	#actions {
		display: none;
	}
	
	#user {
		display: none;
	}
	
	#search {
		display: none;
	}
}