header, footer {
	margin: 0;
	padding: 10px;
	box-sizing: border-box;
}

header {
	padding: 20px;
	box-shadow: 0 5px 5px #0004;
}

.icon-header {
	height: .8em;
}

#select {
	cursor: pointer;
}

.sorting {
	position: relative;
	display: flex;
	justify-content: space-between;
}

#sorting {
	cursor: pointer;
}

.highlighted {
	color: #9999AD;
}

#icon-expand {
	height: 10px;
}

#sorting-options {
	position: absolute;
	right: 0;
	top: 114%;
	padding: 4px 10px;
	box-sizing: border-box;
	background-color: #111118;
	border-radius: 10px;
	text-align: left;
	box-shadow: 0 0 10px black;
	z-index: 9999;
}

.sorting-option {
	padding: 4px 0;
	display: flex;
	justify-content: space-between;
}

.sorting-option input[type="radio"] {
	float: unset;
	margin-left: 1.8em;
}

.filtering-wrapper {
	margin-top: 10px;
}

.filtering-block {
	position: absolute;
	top: 128px;
	left: 14px;
	right: 14px;
	padding: 14px;
	background-color: #111118;
	border-radius: 10px;
	box-shadow: 0 0 10px 4px #0004;
	z-index: 9998;
}

main {
	margin: 0;
	padding: 10px;
	height: 100%;
	display: flex;
	justify-content: space-between;
	align-content: flex-start;
	align-items: flex-start;
	flex-wrap: wrap;
	box-sizing: border-box;
	overflow-x: hidden;
	overflow-y: scroll;
}

main:after {
	content: "";
	flex: auto;
}

.item-preview {
	position: relative;
}

.item-selected:after {
	content: "";
	display: block;
	position: absolute;
	top: 10px;
	right: 10px;
	width: 100%;
	height: 50%;
	background-image: url("/static/images/icon-select.svg");
	background-size: contain;
	background-position: right;
	background-repeat: no-repeat;
}

.file-preview {
	margin: 1px 0;
	padding: 0;
	width: 160px;
	height: 160px;
	max-width: calc(33vw - 7px);
	max-height: calc(33vw - 7px);
	overflow: hidden;
	cursor: pointer;
}

.file-thumb {
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
}

.file-preview .overlay {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background-color: #0002;
}

.file-preview:hover .overlay {
	background-color: #0004;
}

.tag-preview, .filtering-token {
	margin: 5px 5px;
	padding: 5px 10px;
	border-radius: 5px;
	background-color: #444455;
	cursor: pointer;
}

.category-preview {
	margin: 5px 5px;
	padding: 5px 10px;
	border-radius: 5px;
	background-color: #444455;
	cursor: pointer;
}

.file {
	margin: 0;
	padding: 0;
	min-width: 100vw;
	min-height: 100vh;
	max-width: 100vw;
	max-height: 100vh;
	display: flex;
	justify-content: center;
	align-items: center;
	background-color: black;
}

.file .preview-img {
	max-width: 100vw;
	max-height: 100vh;
}

.selection-manager {
	position: fixed;
	left: 10px;
	right: 10px;
	bottom: 65px;
	box-sizing: border-box;
	max-height: 40vh;
	display: flex;
	flex-direction: column;
	padding: 15px 10px;
	background-color: #181721;
	border-radius: 10px;
	box-shadow: 0 0 5px #0008;
}

.selection-manager hr {
	margin: 5px 0;
}

.selection-header {
	display: flex;
	justify-content: space-between;
}

.selection-header > * {
	cursor: pointer;
}

#selection-edit-tags {
	color: #4DC7ED;
}

#selection-add-to-pool {
	color: #F5E872;
}

#selection-delete {
	color: #DB6060;
}

.selection-tags {
	max-height: 100%;
	overflow-x: hidden;
	overflow-y: scroll;
}

input[type="color"] {
	width: 100%;
}

.tags-container, .filtering-operators, .filtering-tokens {
	padding: 5px;
	background-color: #212529;
	border: 1px solid #495057;
	border-radius: .375rem;
	display: flex;
	justify-content: space-between;
	align-content: flex-start;
	align-items: flex-start;
	flex-wrap: wrap;
	box-sizing: border-box;
}

.filtering-operators {
	margin-bottom: 15px;
}

.tags-container, .filtering-tokens {
	margin: 15px 0;
	height: 200px;
	overflow-x: hidden;
	overflow-y: scroll;
}

.tags-container:after, .filtering-tokens:after {
	content: "";
	flex: auto;
}

.tags-container-selected {
	height: 100px;
}

#files-filter {
	margin-bottom: 0;
	height: 56px;
}

.viewer-wrapper {
	position: absolute;
	left: 0;
	top: 0;
	right: 0;
	bottom: 0;
	background-color: #000a;
	display: flex;
	justify-content: center;
/*	overflow-y: scroll;*/
}

.viewer-nav {
	position: absolute;
	top: 0;
	bottom: 0;
	display: flex;
	justify-content: center;
	align-items: center;
	cursor: pointer;
}

.viewer-nav:hover {
	background-color: #b4adff40;
}

.viewer-nav-prev {
	left: 0;
	right: 80vw;
}

.viewer-nav-next {
	left: 80vw;
	right: 0;
}

.viewer-nav-close {
	left: 0;
	right: 0;
	bottom: unset;
	height: 15vh;
}

.viewer-nav-icon {
	width: 20px;
	height: 32px;
}

.viewer-nav-close > .viewer-nav-icon {
	width: 16px;
	height: 16px;
}

#viewer {
	width: 100%;
	height: 100%;
	max-width: 100%;
}

.sessions-wrapper {
	padding: 14px;
	background-color: #111118;
	border-radius: 10px;
}

.btn-terminate {
	height: 20px;
	cursor: pointer;
}

footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background-color: #0007;
}

.nav {
	display: flex;
	justify-content: center;
	align-items: center;
	height: 40px;
	width: 18vw;
	background: transparent;
	border: 0;
	border-radius: 10px;
	outline: 0;
}

.nav.curr, .nav:hover {
	background-color: #343249;
}

.navicon {
	display: block;
	height: 30px;
}

#loader {
	position: fixed;
	left: 0;
	top: 0;
	right: 0;
	bottom: 0;
	display: flex;
	justify-content: center;
	align-items: center;
	background-color: #000a;
	z-index: 9999;
}

.loader-wrapper {
	padding: 15px;
	border-radius: 12px;
	background-color: white;
}

.loader-img {
	max-width: 20vw;
	max-height: 20vh;
}
