/*** Fonts ***/
@font-face {
	font-family: 'Quicksand';
	font-weight: 100 1000;
	src: url('../fonts/Quicksand-VariableFont_wght.ttf');
}

/*** Main ***/
body, html {
	height: 100%;
	margin: 0px;
}
html {
	background: white;
}
body {
	font-family: "Quicksand", sans-serif;
	font-size: 15px;
	color: #070707;
	margin: 0px;
}
body.loading {
	cursor: wait;
}
a {
	color: #d50c2d;
}
#container {
	display: flex;
	flex-wrap: nowrap;
	flex-direction: column;
	align-items: stretch;
	height: 100%;
	max-height: 100%;
}
#header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 62px;
	background-color: #383838;
	color: white;
	box-sizing: border-box;
	padding: 8px 15px;
	font-size: 20px;
	font-weight: 100;
	box-shadow: 0px 0px 4px rgba(32,32,32,0.6);
	z-index: 2;
}
#header a {
	color: inherit;
	text-decoration: none;
	display: inline-block;
}
#header a img {
	height: 38px;
}
#header * {
	vertical-align: middle;
}
#header button {
	background: transparent;
	background-color: transparent;
	border: none;
	color: #B3B9BE;
	font-size: 14px;
	text-transform: none;
}
#header button > img {
	margin-bottom: 2px;
}
#header span.separator {
	display: inline-block;
	height: 30px;
	width: 1px;
	background-color: #B3B9BE;
	opacity: 0.2;
	margin-bottom: 2px;
}

#login {
	flex-grow: 1;
	display: flex;
	flex-wrap: nowrap;
	flex-direction: row;
	align-items: stretch;
	height: calc(100% - 62px);
}
#login-form {
	flex-grow: 1;
	flex-shrink: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	background-color: #FAFAFA;
	border-right: 1px solid rgba(0, 0, 0, 0.2);
	min-width: 350px;
	width: 30%;
	overflow: auto;
	z-index: 1;
}
#login-form.middle {
	justify-content: space-around;
}
#login-form form {
	width: 80%;
	margin-bottom: 10%;
}
#login-form form input:not([type=checkbox]):not([type=radio]),
#login-form form label,
#login-form form button {
	display: block;
	width: 100%;
	box-sizing: border-box;
	margin-bottom: 10px;
}
#login-form button {
	font-weight: bold;
}
#login-wall {
	position: relative;
	flex-grow: 1;
	flex-shrink: 1;
	width: 70%;
	height: 100%;
}
#login-bg {
	position: absolute;
	background: url('../img/bg.jpg');
	background-size: cover;
	background-position: center;
	width: 100%;
	height: 100%;
}
#login-wall #motd {
	position: absolute;
	bottom: 0px;
	left: 0px;
	right: 0px;
	padding: 20px;
	color: white;
	text-shadow: 0px 0px 2px rgba(0,0,0,0.2);
	max-width: 600px;
}

#explorer {
	flex-grow: 1;
	display: flex;
	flex-wrap: nowrap;
	flex-direction: row;
	align-items: stretch;
	height: calc(100% - 62px);
}
#explorer.nosidebar #explorer-tree {
	display: none;
}
#explorer.nosidebar #explorer-content {
	flex-basis: 100%;
}
#explorer-tree {
	position: relative;
	flex-grow: 1;
	flex-shrink: 1;
	background-color: white;
	border-right: 1px solid rgba(0, 0, 0, 0.2);
	resize: horizontal;
	width: 20%;
	height: 100%;
	overflow: auto;
	box-sizing: border-box;
	white-space: nowrap;
	z-index: 1;
	padding: 10px;
}
#explorer-tree a {
	display: block;
	text-decoration: none;
	color: inherit;
	padding: 10px;
	border-radius: 4px;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	overflow: hidden;
	transition: all 0.2s ease;
}
#explorer-tree a:focus,
#explorer-tree a:hover,
#explorer-tree a:active {
	background-color: rgba(0,0,0,0.08);
	border-left-color: #d50c2d;
	cursor: pointer;
}
#explorer-tree a img {
	width: 25px;
	margin-right: 5px;
	margin-bottom: 2px;
	vertical-align: middle;
}
#explorer-tree .node {
	margin-bottom: 10px;
}
#explorer-tree .node > a {
	padding: 15px 10px 15px 10px;
}
#explorer-tree .node > .subitems {
	margin-left: 17px;
}
#explorer-tree .subitems {
	max-height: 0px;
	overflow: hidden;
	margin-left: 12px;
	padding-left: 8px;
	border-left: 1px dashed rgb(150,150,150,0.4);
}
#explorer-tree .subitems.expanded {
	max-height: none;
	overflow: visible;
}
#explorer-content {
	position: relative;
	background-color: #FAFAFA;
	flex-basis: 80%;
	padding: 20px;
	box-sizing: border-box;
	overflow: scroll;
	height: 100%;
}
#explorer-content > *:first-child {
	margin-top: 0px;
	padding-top: 0px;
}
#homepage {
	text-align: center;
}
#homepage .title {
	font-size: 20px;
}
#homepage .subtitle {
	font-size: 92%;
	opacity: 0.6;
}
#homepage .subtitle2 {
	font-weight: bold;
}

#dialog-container {
	display: none;
	position: fixed;
	top: 0px;
	left: 0px;
	right: 0px;
	bottom: 0px;
	z-index: 999;
}
#dialog-container.active,
#dialog-container.loading {
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: rgba(0,0,0,0.3);
}
#dialog-container > img {
	display: none;
	position: absolute;
	top: calc(50% - 45px);
	left: calc(50% - 45px);
}
#dialog-container.loading > #dialog-box,
#dialog-container.loading2 > #dialog-box {
	display: none;
}
#dialog-container.loading2 > img {
	display: inline-block;
}
#dialog-container #dialog-box {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 100%;
	padding: 25px;
	background-color: white;
	border-radius: 4px;
	z-index: 999;
	box-shadow: 0px 0px 25px rgba(0,0,0,0.2);
}
#dialog-container #dialog-box.large {
	width: 75%;
	height: 75%;
}
#dialog-container #dialog-box.small {
	width: 55%;
	height: 55%;
}
#dialog-container #dialog-box #dialog-title {
	margin: 0px;
}
#dialog-container #dialog-box #dialog-text {
	flex-grow: 1;
	overflow: auto;
	margin-top: 15px;
}
#dialog-container #dialog-box #dialog-text.monospace {
	font-family: monospace;
	white-space: pre-wrap;
	border-left: 2px solid rgb(200,200,200);
	padding: 10px;
}
#dialog-container #dialog-box #dialog-controls {
	margin-top: 15px;
}

#message-container {
	position: fixed;
	top: 62px;
	right: 0px;
	width: 22%;
	min-width: 200px;
	padding: 5px;
	z-index: 999;
}
#message-container .message {
	position: relative;
	background-color: white;
	color: gray;
	padding: 15px;
	padding-right: 30px;
	margin-bottom: 10px;
	border-radius: 3px;
	box-shadow: 0px 0px 6px rgba(0,0,0,0.35);
	overflow: hidden;
	animation: message-in 0.4s ease 0s forwards;
}
#message-container .message.icon {
	padding-left: 44px;
	background-size: 24px;
	background-position: 10px center;
	background-repeat: no-repeat;
}
#message-container .message .message-content {
	max-height: 340px;
	word-wrap: break-word;
	overflow-y: auto;
}
#message-container .message.info {
	border-left: 6px solid #0f6082;
	background-image: url('../img/info.message.svg');
}
#message-container .message.success {
	border-left: 6px solid #87CA81;
	background-image: url('../img/success.message.svg');
}
#message-container .message.warning {
	border-left: 6px solid #FFC122;
	background-image: url('../img/warning.message.svg');
}
#message-container .message.error {
	border-left: 6px solid #EC5870;
	background-image: url('../img/error.message.svg');
}
#message-container .message .message-title {
	font-weight: bold;
	color: black;
}
#message-container .message .message-close {
	position: absolute;
	width: 20px;
	height: 20px;
	top: calc(50% - 10px);
	right: 6px;
	padding: 0px;
	border: none;
	background-image: url('../img/close.opacity.svg');
	background-size: 20px 20px;
	background-position: center center;
	background-color: transparent;
	box-shadow: none;
	color: transparent;
}
@keyframes message-in {
	0%   { opacity:0; max-height:0; transform:translateY(-50%); }
	100% { opacity:1; max-height:350px; transform:translateY(0); }
}

/* Infobox */
.alert {
	border-radius: 2px;
	margin-top: 10px;
	margin-bottom: 10px;
	padding: 8px !important;
}
.alert.info {
	background: #e1f1f6;
	color: #565656;
	border: 1px solid #49afd9
}
.alert.success {
	background: #dff0d0;
	color: #565656;
	border: 1px solid #60b515
}
.alert.warning {
	background: #feecb5;
	color: #565656;
	border: 1px solid #ffdc0b
}
.alert.error {
	background: #f5dbd9;
	color: #565656;
	border: 1px solid #ebafa6
}

/* General */
.hidden {
	display: none !important;
}
.invisible {
	opacity: 0 !important;
	pointer-events: none;
}

#photoEditContainer {
	display: flex;
	align-items: flex-start;
	gap: 15px;
}
#photoEditContainer > * {
	width: calc(50% - 10px);
}
.photo {
	width: 100%;
	border-radius: 2px;
	box-shadow: rgba(0,0,0,0.2);
	margin-bottom: 5px;
}
.user {
	width: 250px;
	height: 250px;
	border-radius: 999px;
	object-fit: cover;
}

.gallery {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
}
.gallery > * {
	flex-grow: 1;
	flex-shrink: 1;
	flex-basis: 0px;
}
.gallery > * > * {
	width: 100%;
}
.gallery > * > *:first-child {
	margin-top: 0px;
}

.controls {
	display: flex;
	flex-direction: row;
	align-items: center;
	margin: 18px 0px;
	gap: 4px;
}
.controls.spread {
	justify-content: space-between;
}
.controls h1, .controls h2, .controls h3 {
	margin: 0px;
}
.controls:last-child {
	margin-bottom: 0px;
}
.controls.right {
	justify-content: right;
}
.controls > * {
	display: inline-block;
	vertical-align: middle;
}
.controls > span {
	display: flex;
	align-items: center;
}
.controls select {
	max-width: 150px;
}
.spread {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	justify-content: space-between;
}

h1 img {
	margin-right: 15px;
	margin-bottom: 5px;
	vertical-align: middle;
	width: 35px;
}

table {
	border-spacing: 0px;
}
table th, table td {
	text-align: left;
	padding: 4px;
}
table tr.hidden {
	display: none;
}

.big {
	width: 100%;
	min-height: 150px;
}
.small {
	font-size: 90%;
	opacity: 0.6;
}
table.largepadding th,
table-largepadding td {
	padding: 20px;
}
textarea {
	resize: vertical;
}
input, select, button, textarea {
	box-sizing: border-box;
	font-family: inherit;
	font-size: inherit;
	border: 2px solid #DBDBDB;
	border-radius: 3px;
	padding: 5px;
	outline: none;
}
input, select, textarea, button {
	padding: 4px;
	background-color: white;
}
input:disabled, select:disabled, textarea:disabled,
input:not([type=file]):read-only, textarea:read-only {
	background-color: rgb(240, 240, 240);
	background-image: repeating-linear-gradient(45deg, rgb(255,255,255), rgb(255,255,255) 10px, rgb(240, 240, 240) 10px, rgb(240, 240, 240) 20px);
}
/* default button */
button {
	cursor: pointer;
	color: #4C4C4C;
	background-color: #E4E4E4;
	letter-spacing: 0.2px;
	text-transform: uppercase;
	text-decoration: none;
	padding: 6px 7px;
	border-color: rgba(0,0,0,0.1);
}
button.small,
tfoot button {
	padding: 3px 4px;
}
button.small img,
tfoot button img {
	height: 16px !important;
}
button:hover,
button:focus {
	background-color: #EDEDED;
}
button:active:not(:disabled) {
	box-shadow: 0px 0px 10px rgba(0,0,0,0.4) inset;
}
button:disabled {
	color: #C0C0C0 !important;
	cursor: not-allowed !important;
	background-color: #EDEDED !important;
}
button:disabled > img {
	opacity: 0.2;
}
button > img {
	vertical-align: middle;
	margin-bottom: 1px;
}
button > select {
	padding: 1px;
}
/* primary button */
button.primary {
	color: white;
	font-weight: bold;
	background-color: #d50c2d;
}
button.primary:hover,
button.primary:focus {
	background-color: #F32D4E;
}

input.tableSearch {
	width: 100%;
	min-width: 80px;
	padding: 2px;
	border: none !important;
}
input.tableSearch:not(:placeholder-shown) {
	background-color: rgba(255,250,0,0.2) !important;
}
table.form input:not([type=checkbox]):not([type=radio]),
table.form select,
table.form textarea {
	width: 100%;
	min-width: 300px;
}
table.form tr th:first-child,
table.form tr td:first-child {
	width: 1%;
}
table.form tr th:first-child {
	white-space: nowrap;
}
input:focus, select:focus, textarea:focus {
	border-color: #C4C4C4;
	outline: none;
}
.updown {
	white-space: nowrap;
}
.returned {
	text-decoration: line-through;
}

table.list {
	border-spacing: 0;
	background-color: white;
}
table.list tr th, table.list tr td {
	border-bottom: 1px solid rgba(0,0,0,0.2);
}
table.list tr:first-child th,
table.list tr:first-child td {
	border-top: 1px solid rgba(0,0,0,0.2);
}
table.list tr th:first-child,
table.list tr td:first-child {
	border-left: 1px solid rgba(0,0,0,0.2);
}
table.list tr th:last-child,
table.list tr td:last-child {
	border-right: 1px solid rgba(0,0,0,0.2);
}
table.list tr:first-child th:first-child,
table.list tr:first-child td:first-child {
	border-top-left-radius: 2px;
}
table.list tr:first-child th:last-child,
table.list tr:first-child td:last-child {
	border-top-right-radius: 2px;
}
table.list tr:last-child th:first-child,
table.list tr:last-child td:first-child {
	border-bottom-left-radius: 2px;
}
table.list tr:last-child th:last-child,
table.list tr:last-child td:last-child {
	border-bottom-right-radius: 2px;
}

table.list .sortbutton {
	width:100%;
	height:100%;
	border: none;
	background-color: transparent;
	font: inherit;
	color: inherit;
	text-align: inherit;
	padding: 0;
	cursor: pointer;
	box-shadow: none;
	text-transform: none;
}
table.list .sortsymbol::after {
	display: inline-block;
	letter-spacing: -.2em;
	margin-left:.1em;
	width: 1.8em;
}
table.list .sortsymbol.sortedasc::after {
	content: "▲▽";
}
table.list .sortsymbol.sorteddesc::after {
	content: "△▼";
}
table.list .sortsymbol.unsorted::after {
	content: "△▽";
}
table.list tfoot .spread {
	display: flex;
	justify-content: space-between;
	align-items: center;
}
table.list tfoot .spread > div:last-child {
	text-align: right;
}

table tr th img,
table tr td img {
	display: inline-block;
	vertical-align: middle;
	height: 18px;
}
table tr td img.preview {
	height: 60px;
}
table tr td button > img {
	height: 24px;
}

table.fixed {
	table-layout: fixed;
}

.green {
	color: green;
}
.red {
	color: red;
}

div.details-abreast {
	display: flex;
	align-items: flex-start;
	column-gap: 25px;
}
div.details-abreast > div h1,
div.details-abreast > div h2,
div.details-abreast > div h3 {
	margin-top: 25px;
}
div.details-abreast > div {
	flex-grow: 1;
	flex-shrink: 1;
	flex-basis: 100%;
	width: 0px;
	overflow: auto;
	/* to preserve table box shadow */
	padding: 4px;
	margin: -4px;
}
div.details-abreast > div > table {
	width: 100%;
}
div.details-abreast > div.stickytable {
	overflow: visible;
}
div.stickytable > table.list thead,
div.stickytable > table.list tfoot {
	position: sticky;
	background-color: white;
	z-index: 2;
}
div.stickytable > table.list thead {
	inset-block-start: -20px;
}
div.stickytable > table.list tfoot {
	inset-block-end: -20px;
}

.vl {
	display: inline-block;
	width: 2px;
	min-width: 2px;
	border-radius: 2px;
	background-color: #DDDDDD;
}
.fullwidth {
	width: 100%;
}
.margintop {
	margin-top: 15px;
}
.center {
	text-align: center;
}

.progressbar-container {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	white-space: nowrap;
	max-width: 100%;
	width: 180px;
	height: 41px; /*button height*/
	position: relative;
}
.progressbar-container.big {
	height: 40px;
	width: 180px;
}
.progressbar-container.stretch {
	display: flex;
}
.progressbar-container > .progresstext {
	display: inline-block;
	text-align: center;
	position: absolute;
	left: 0;
	right: 0;
	background: linear-gradient(to right, white var(--progress,0%), black 0);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	font-weight: bold;
}
.progressbar {
	flex-grow: 1;
	vertical-align: middle;
	display: inline-block;
	height: 100%;
	max-width: 100%;
	width: 100px;
	background-color: #EEEEEE;
	border-radius: 2px;
	overflow: hidden;
	text-align: left;
}
.progressbar > .progress {
	display: inline-block;
	height: 100%;
	width: var(--progress,0%);
	background-color: #d50c2d;
	border-radius: 2px;
}
.progressbar-container.animated {
	--progress: 100% !important;
}
.progressbar-container.animated > .progressbar > .progress {
	width: 100%;
	background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.25) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.25) 50%, rgba(255, 255, 255, 0.25) 75%, transparent 75%, transparent);
	background-size: 1rem 1rem;
	animation: progressbar-stripes 1s linear infinite;
}
@keyframes progressbar-stripes {
	from { background-position: 1rem 0; }
	to { background-position: 0 0; }
}

@media (max-width: 1050px) {
	#header button > span {
		display: none;
	}
	div.details-abreast {
		flex-wrap: wrap;
	}
	div.details-abreast > div {
		width: 100%;
		overflow: visible;
		padding: 0px;
		margin: 0px;
	}
	.controls {
		flex-wrap: wrap;
	}
	table.form input:not([type=checkbox]):not([type=radio]),
	table.form select,
	table.form textarea {
		min-width: 150px;
	}
}
@media (max-width: 750px) {
	#header {
		justify-content: center;
		flex-direction: column;
		height: 115px;
	}
	#header .separator.space {
		display: none;
	}
	#header > #search-container {
		width: 278px;
		margin-right: 0px;
	}
	#explorer,
	#login {
		display: block;
		height: auto;
		overflow: auto;
	}
	#explorer #explorer-tree,
	#login #login-form {
		width: 100%;
		height: 100%;
		max-width: none;
		min-width: auto;
		border: none;
	}
	#explorer:not(.nosidebar) #explorer-content {
		display: none;
	}
	#login #login-wall {
		display: none;
	}
	#message-container {
		top: 5px;
		right: 0px;
		left: 0px;
		width: auto;
		min-width: auto;
	}
	#photoEditContainer {
		flex-direction: column;
	}
	#photoEditContainer > * {
		width: 100%;
	}
}

@media (prefers-color-scheme: dark) {
	html, #explorer-content {
		background-color: #141414;
	}
	#explorer-tree, #login-form, #dialog-container #dialog-box, #header #search-results {
		background-color: #303030;
	}
	#explorer-tree, #login-form {
		border-right: 1px solid rgba(255,255,255,0.2);
	}
	#login-bg {
		background-image: url('../img/bg.dark.jpg');
	}
	#dialog-container.active {
		background-color: rgba(0,0,0,0.45);
	}
	#explorer-tree a:focus,
	#explorer-tree a:hover,
	#explorer-tree a:active {
		background-color: rgba(255,255,255,0.08);
	}
	body, a {
		color: #E9ECEF;
	}
	table.list, .box,
	div.stickytable > table.list thead,
	div.stickytable > table.list tfoot {
		background-color: #2b2b2b;
	}
	table.list tr th, table.list tr td {
		border-bottom: 1px solid rgba(255,255,255,0.2);
	}
	table.list tr:first-child th,
	table.list tr:first-child td {
		border-top: 1px solid rgba(255,255,255,0.2);
	}
	table.list tr th:first-child,
	table.list tr td:first-child {
		border-left: 1px solid rgba(255,255,255,0.2);
	}
	table.list tr th:last-child,
	table.list tr td:last-child {
		border-right: 1px solid rgba(255,255,255,0.2);
	}
	.box {
		border: 2px solid rgba(255,255,255,0.1);
	}
	input:not([type=range]):not([type=radio]):not([type=checkbox]), select, textarea {
		color: white;
		background-color: transparent;
		border: none;
		border-bottom: 1px solid rgba(255,255,255,0.4);
		border-radius: 0px;
	}
	input:disabled, select:disabled, textarea:disabled, .disabled,
	input:not([type=file]):read-only, textarea:read-only {
		background-color: rgb(240, 240, 240, 0.1);
		background-image: repeating-linear-gradient(45deg, transparent, transparent 10px, rgb(240, 240, 240, 0.1) 10px, rgb(240, 240, 240, 0.1) 20px);
	}
	input:not([type=range]):not([type=radio]):not([type=checkbox]):focus,
	textarea:focus,
	select:focus {
		border-bottom: 1px solid rgba(255,255,255,0.6);
	}
	button {
		color: white;
		background-color: rgb(32, 32, 32);
		border-color: rgba(255,255,255,0.1);
	}
	/*
	button.primary {
	}
	button.primary:hover,
	button.primary:focus {
	}
	*/
	button:hover,
	button:focus {
		background-color: rgb(48, 48, 48);
	}
	button:disabled {
		color: rgb(82, 82, 82) !important;
		background-color: rgb(32, 32, 32) !important;
	}
	.progressbar-container > .progresstext {
		background: linear-gradient(to right, black var(--progress,0%), white 0);
		-webkit-background-clip: text;
		background-clip: text;
	}
	.progressbar {
		background-color: rgb(32, 32, 32);
	}
	.alert.info {
		background: #0f6082;
		color: #e9ecef;
		border: 1px solid transparent
	}
	.alert.success {
		background: #62a420;
		color: #fff;
		border: none
	}
	.alert.warning {
		background: #7f6509;
		color: #e9ecef;
		border: 1px solid transparent
	}
	.alert.error {
		background: #882d31;
		color: #e9ecef;
		border: 1px solid transparent
	}
	.vl {
		background-color: rgba(255,255,255,0.2);
	}
	#message-container .message {
		background-color: black;
	}
	#message-container .message .message-title {
		color: white;
	}
}
