/* HTML5 display-role reset for older browsers */
p, h1, h2, h3, h4, h5 {
	margin: 0;
}
iframe {
	border: 0;
	color-scheme: auto;
}
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
	display: block;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}

/** compatibility **/
html,body {
	margin: 0;
	padding: 0;
	height: 100%;
	width: 100%;
	font-size: calc(1rem / 16 * 13);

	overflow: hidden;

	border: 0;
}
body.night_mode {
	color-scheme: dark;
}

body {
	font-family: "Roboto", Tahoma, Helvetica, sans-serif;
	font-size: 1rem;
	color: #333;
}
pre, textarea, input{
	font-family: inherit;
	font-size: 1rem;
	font-weight: inherit;
}
textarea, input {
	background-color: #fff;
	color: #333;
}

body {
	opacity: 1!important;
	transition: opacity 500ms ease-in;
}

*::selection {
	background: var(--bg_main);
	color: #fff!important;
}

[hidden] {
	display: none!important;
}

body.light{
	font-weight: 200;
}
body.light textarea,
body.light input{
	font-family: inherit;
}

body:lang(ar), textarea:lang(ar), input:lang(ar),
body:lang(fa), textarea:lang(fa), input:lang(fa) {
	font-family: "Vazirmatn", "Roboto", Tahoma, Helvetica, sans-serif!important;
}
body:lang(he), textarea:lang(he), input:lang(he) {
	font-family: "Heebo", "Roboto", Tahoma, Helvetica, sans-serif!important;
}
body.rtl {
	direction: rtl;
}
form{
	padding: 0;
	margin: 0;
}
* {
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;

	/* disable history back swipe in IE10 Tablet */
	-ms-scroll-chaining: none;
	-ms-touch-action: none;
}

/* removes yellow outline for Chrome browser */
textarea, input{
	outline: none;
}

/* tables */
table{
	border-collapse: collapse;
}
th,td{
	padding: 0;
	line-height: 32px;
}
table.compact th,
table.compact td {
	line-height: 16px;
}

/* form tables */
table.frmtbl{
	border-collapse: separate;
	border-spacing: 2px 2px;
}

table.frmtbl th{
	text-align: left;
	font-weight: normal;
	white-space: nowrap;
}
body.light table.frmtbl th{
	font-weight: 200;
}

	table.frmtbl .th{
		padding: 1px 15px 1px 0;
	}
	.rtl table.frmtbl .th {
		padding: 1px 0 1px 5px;
	}
	table.frmtbl th.vat,
	table.frmtbl td.vat{
		vertical-align: top;
	}
	table.frmtbl .td{
		width: 100%;
	}
	table.frmtbl .td50{
		width: 50%;
	}
	table.frmtbl.nospace{
		border-collapse: collapse;
		border-spacing: 0;
	}
	table.frmtbl td.caption{
		padding-bottom: 5px;
		color: #888;
	}
	.rtl table.frmtbl th {
		text-align: right;
	}

table.frmtbl100 {
	width: 100%;
	font-size: inherit;
}

.maxbox,
table.frmtblmax{
	width: 100%;
	height: 100%;
}
table.frmtbl .valign{
	vertical-align: top;
}
table.frmtbl td.space{
	height: 10px;
	line-height: 10px;
}
.relative{
	position: relative;
}

th.msiebox,
td.msiebox{
	position: relative;
	min-height: 28px;
	height: inherit;
}
div.msiebox{
	position: relative;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Flex */
.flex-col{
	display: flex;
	flex-flow: column nowrap;
	width: 100%;
	height: 100%;
}
	.flex-max-h{
		position: relative;
		height: 100%;
		overflow: hidden;
	}
	.flex-min-h{
		position: relative;
	}

.flex-row{
	display: flex;
	flex-flow: row nowrap;
	width: 100%;
}
	.flex-row.wrap{
		flex-wrap: wrap;
	}

	.flex-max-w{
		position: relative;
		flex: auto;
		overflow: hidden;
	}
	.flex-min-w{
		position: relative;
	}
	.flex-row-filler {
		flex-grow: 1;
	}

pre {
	white-space: pre-wrap;
}

.unselectable {
	user-select: none;
	-webkit-user-select: none;
	cursor: default;
}

/** global **/
.hidden{
	visibility: hidden;
}
.absolute{
	position: absolute!important;
}
.overflow{
	overflow: hidden;
}
.pad5{
	padding: 5px;
}
.pad10{
	padding: 10px;
}
.pad15{
	padding: 15px;
}

.bubble1,
.bubble2{
	background-color: rgba(255, 255, 255, 0.96);
	border-radius: 8px;
}
.bubble1{
	box-shadow: 0 0 3px rgba(0,0,0,0.3);
}
.bubble2{
	box-shadow: 0 0 15px rgba(0,0,0,0.25);
}

/* global animations */
@-webkit-keyframes reveal {
	0% {opacity: 0;}
	100% {opacity: 1;}
}

@keyframes reveal {
	0% {opacity: 0;}
	100% {opacity: 1;}
}

@-webkit-keyframes rotate{
	from {-webkit-transform: rotate(0deg);}
	to {-webkit-transform: rotate(360deg);}
}
@keyframes rotate{
	from {transform: rotate(0deg);}
	to {transform: rotate(360deg);}
}


@-webkit-keyframes typing {
	0%, 80%, 100% { -webkit-transform: scale(0) }
	40% { -webkit-transform: scale(1.0) }
}

@keyframes typing {
	0%, 80%, 100% {
		-webkit-transform: scale(0);
		transform: scale(0);
	} 40% {
		-webkit-transform: scale(1.0);
		transform: scale(1.0);
	}
}

/* print */
@media print{
	html,body{
		overflow: visible;
	}
}


/* PAGE BACKGROUND */
#gui {
	transition: background 300ms ease-in 200ms;

	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	background-color: var(--backgroundColor, var(--bg_main));
	background-image: var(--backgroundImageURL);
}
#gui.contain:not(.dashboard_enabled) {
	background-size: contain;
}
#gui.tile:not(.dashboard_enabled) {
	background-size: auto;
	background-repeat: repeat;
}
#gui.center:not(.dashboard_enabled) {
	background-size: auto;
}

#gui:before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.16) 0%, rgba(0, 0, 0, 0) 16%, rgba(0, 0, 0, 0) 84%, rgba(0, 0, 0, 0.16) 100%);
}

#gui.server_overload {
	filter: saturate(0);
	transition: 1s filter;
	pointer-events: none;
}