@font-face {
	font-family: NunitoSans;
	font-display: swap;
	font-style: normal;
	font-weight: normal;
	src: url('/fonts/nunito-sans-regular.woff2') format('woff2');
}
@font-face {
	font-family: NunitoSans;
	font-display: swap;
	font-style: normal;
	font-weight: bold;
	src: url('/fonts/nunito-sans-bold.woff2') format('woff2');
}
@font-face {
	font-family: 'FabricMDL2Icons';
	src: url('/fonts/fabric-icons.woff') format('woff');
}

:root {
	--gray1: #eee;
	--gray2: #888;
	--gray3: #333;
	--blue1: #e0f0ff;
	--blue2: #b0d0e0;
	--yellow1: #ffffe0;
	--yellow2: #e0e0b0;
	--white: #fff;
	--black: #000;
}

* {
	font-family: NunitoSans, sans-serif;
	box-sizing: border-box;
}

[hidden] {
	display: none !important;
}

body {
	background-color: var(--white);
	color: var(--black);
	font-size: 16px;
	margin: 0;
	overflow: hidden;
	padding: 0;
}

main {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 8px;
	width: 100vw;
	height: 100vh;
}

a {
	color: var(--black);
	text-decoration: none;
}

button {
	background-color: var(--gray1);
	border: 1px solid var(--gray2);
	border-radius: 3px;
	cursor: pointer;
	font-size: 100%;
	margin: 0;
	outline: none;
	padding: 4px 16px;
}
button:hover {
	background-color: var(--blue1);
	border-color: var(--blue2);
}
button > i {
	margin-right: 4px;
	position: relative;
	top: 2px;
}

input[type=text], input[type=password], textarea {
	font-size: 100%;
	outline: none;
}

i {
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
	display: inline-block;
	font: normal 14px FabricMDL2Icons;
}
i.add:before { content: "\E710"; }
i.check:before { content: "\E73E"; }
i.close:before { content: "\E8BB"; }
i.delete:before { content: "\E74D"; }
i.download:before { content: "\E896"; }
i.edit:before { content: "\E70F"; }
i.movetoFolder:before { content: "\F0A5"; }
i.newFolder:before { content: "\F0AB"; }
i.link:before { content: "\E71B"; }
i.removeLink:before { content: "\ED90"; }
i.rename:before { content: "\E8AC"; }
i.signOut:before { content: "\F3B1"; }
i.upload:before { content: "\E898"; }

.toolbar {
	display: flex;
	gap: 16px;
}
.toolbar > * {
	line-height: 24px;
}

.minibar {
	display: flex;
	gap: 8px;
	padding: 0 8px;
}
.minibar [role=button] {
	border: 0;
	cursor: pointer;
	padding: 4px;
	position: relative;
	width: 24px; height: 24px;
}
.minibar [role=button] > span {
	background-color: var(--gray3);
	color: var(--white);
	display: none;
	font-size: 12px;
	padding: 2px 4px;
	position: absolute;
	top: 100%; left: 100%;
}
.minibar [role=button]:hover > i {
	color: blue;
}
.minibar [role=button]:hover > span {
	display: block;
}

.fill {
	flex: 1;
}

.menu {
	background-color: var(--white);
	border: 1px solid var(--gray2);
	border-radius: 3px;
	box-shadow: 2px 2px 4px -2px var(--gray2);
	cursor: default;
	padding: 4px;
	position: absolute;
	z-index: 1;
}
.menu > div {
	border: 1px solid transparent;
	border-radius: 3px;
	line-height: 34px;
	padding: 0 16px;
}
.menu > div:hover {
	background-color: var(--blue1);
	border-color: var(--blue2);
}
.menu i {
	margin-right: 8px;
	position: relative;
	top: 2px;
}
.menu hr {
	border: 0;
	border-top: 1px solid var(--gray1);
	margin: 4px;
}

.login {
	align-items: center;
	display: grid;
	gap: 8px;
	grid-template-columns: auto 1fr;
	margin: auto;
	width: 320px;
}

.browser {
	display: flex;
	flex: 1;
	gap: 8px;
	overflow-y: auto;
	position: relative;
}

.dir-list {
	border: 1px solid var(--gray2);
	cursor: default;
	padding: 8px;
	overflow: hidden auto;
	user-select: none;
	width: 400px;
}
.dir-list ul {
	display: block;
	margin: 0;
	padding: 0;
}
.dir-list ul:empty {
	display: none !important;
}
.dir-list li {
	display: block;
	padding-left: 24px;
	position: relative;
}
.dir-list li > ul {
	display: none;
}
.dir-list input:checked ~ ul {
	display: block;
}
.dir-list input {
	appearance: none;
	outline: none;
	margin: 0;
	padding: 0;
	position: absolute;
	left: 0; top: 0; width: 32px; height: 36px;
}
.dir-list input::before {
	border-bottom: 1px solid var(--gray3);
	border-right: 1px solid var(--gray3);
	content: '';
	position: absolute;
	left: 8px; top: 12px; width: 6px; height: 6px;
	transform: translate(0, 2px) rotate(-45deg);
}
.dir-list input:checked::before {
	transform: translate(2px, 0) rotate(45deg);
}
.dir-list span {
	display: block;
	line-height: 36px;
	margin-left: -24px;
	padding: 0 8px 0 32px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.dir-list span::after {
	border: 1px solid transparent;
	border-radius: 3px;
	content: '';
	position: absolute;
	left: 0; right: 0; top: 0; height: 34px;
	z-index: -1;
}
.dir-list span:hover::after {
	background-color: var(--gray1);
}
.dir-list .active > span::after {
	background-color: var(--blue1);
	border-color: var(--blue2);
}

.file-list {
	border: 1px solid var(--gray2);
	cursor: default;
	flex: 1;
	overflow-y: auto;
	padding: 8px;
	user-select: none;
}
.file-list.drop {
	background-color: var(--yellow1);
	border: 2px solid var(--yellow2);
	margin: -1px;
}
.file-list > div {
	border: 1px solid transparent;
	border-radius: 3px;
	display: grid;
	gap: 8px;
	grid-template-columns: 1fr 200px 100px;
	line-height: 36px;
	padding: 0 8px;
}
.file-list > div:hover {
	background-color: var(--gray1);
}
.file-list > div.active {
	background-color: var(--blue1);
	border-color: var(--blue2);
}
.file-list > div > div:last-child {
	text-align: right;
}

.progress {
	border: 1px solid var(--blue2);
	position: absolute;
	right: 0; top: 0;
	width: 100%; max-width: 400px; height: 8px;
}
.progress > .value {
	background-color: var(--blue1);
	border: 1px solid var(--blue2);
	width: 0; height: 100%;
	transition: width .1s;
}

.message {
	background-color: rgba(128,128,128,.1);
	display: flex;
	position: fixed;
	left: 0; right: 0; top: 0; bottom: 0;
	z-index: 2;
}
.message > div {
	background-color: var(--white);
	border: 1px solid var(--gray2);
	border-radius: 3px;
	box-shadow: 2px 2px 4px -2px var(--gray2);
	margin: auto;
	position: relative;
	padding: 48px 16px 16px 16px;
}
.message .close {
	border-radius: 3px;
	color: #ff0000;
	cursor: pointer;
	line-height: 32px;
	position: absolute;
	right: 0px; top: 0px; width: 32px;
	text-align: center;
	user-select: none;
}
.message .close:hover {
	background-color: #fff0f0;
}

#file-link > div {
	display: flex;
}
#file-link input {
	border: 1px solid var(--gray2);
	border-right: 0;
	padding: 0 8px;
	width: 320px;
	height: 40px;
}
#file-link button {
	background-color: var(--blue1);
	border-color: var(--blue2);
	border-radius: 0;
	color: var(--gray3);
	height: 40px;
}

.link-list {
	margin: 0 auto;
	width: 100%;
	max-width: 600px;
}
.link-list > div {
	border: 1px solid var(--gray2);
	border-radius: 3px;
	cursor: pointer;
	display: grid;
	gap: 8px;
	grid-template-columns: 1fr auto auto;
	margin: 8px 0;
	padding: 8px;
}
.link-list > div:hover {
	background-color: var(--blue1);
	border-color: var(--blue2);
}
.link-list .name {
	font-weight: bold;
}
.link-list .url {
	color: var(--gray2);
	font-size: 14px;
}
.link-list [role=button] {
	margin: auto;
	padding: 4px;
}
.link-list [role=button]:last-child:hover {
	color: #ff0000;
}

.note-list {
	border: 1px solid var(--gray2);
	cursor: default;
	display: flex;
	flex-direction: column;
	user-select: none;
	width: 400px;
}
.note-list ul {
	display: block;
	margin: 16px 0 0 0;
	overflow: auto;
	padding: 0;
}
.note-list li {
	border: 1px solid transparent;
	border-radius: 3px;
	display: block;
	margin: 8px;
	padding: 0 8px;
}
.note-list li:hover {
	background-color: var(--gray1);
}
.note-list li.active {
	background-color: var(--blue1);
	border-color: var(--blue2);
}
.note-list .date {
	color: var(--gray2);
	font-size: 12px;
	text-align: right;
}
.note-list .title {
	line-height: 36px;
	margin-top: -18px;
}

.note-view {
	display: grid;
	flex: 1;
	gap: 8px;
	grid-template-rows: auto 1fr;
}
.note-view textarea {
	border: 1px solid var(--gray2);
	font-size: 14px;
	padding: 8px;
	resize: none;
	width: 100%; height: 100%;
}

@media only screen and (max-width: 960px) {
	.toolbar span {
		font-size: 14px;
	}
	
	.browser {
		flex-direction: column;
	}
	
	.dir-list,
	.note-list {
		width: unset;
	}
	
	.file-list > div {
		gap: unset;
		grid-template-columns: 1fr 1fr;
		margin: 8px 0;
	}
	.file-list > div > div:first-child {
		grid-column: span 2;
	}
	
	.note-view {
		min-height: 480px;
	}
}
