@font-face {
	font-family: Barlow;
	src: url("music.txt.woff") format("woff");
}

@font-face {
	font-family: BarlowSC;
	src: url("music.txtsc.woff") format("woff");
}

@font-face {
	font-family: Foundation;
	src: url("music.woff") format("woff");
}

:root {
	--bg: #fefeff;
	--bg-body: #fefeff;
	--bg-button-hv: #ebf2f7;
	--bg-menu: #fcfcfd;
	--bg-player-fix: #fcfcfd;
	--bg-splash: #eee;
	--bg-thumb: #eee;
	--bg-thumb-hv: #ddd;
	--bg-toast: #fcfcfd;
	--bg-toast-error: #911d1d;
	--bg-trash: #fefeffaa;
	--border: #eee;
	--border-cover: #fafafa;
	--box-shadow: #fefeff;
	--focus: #ef6c00;
	--focus-dim: #f3934d;
	--text: #444;
	--text-dim: #999;
	--text-li-parent: #ccc;
	--text-locked: #aaa;
	--text-shadow: #ddd;
	--text-shadow-button: #eee;
}

* {
	max-width: 100%;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}
	*:active, *:focus, *:hover { outline: none }

html.touch body {
	font-family: BarlowSC, "Segoe UI", sans-serif;
	font-size: 1.1em;
	word-spacing: 1px;
}
	html.touch button, html.touch input, html.touch li {
		padding: .4em;
		user-select: none;
		-moz-user-select: none;
		-ms-user-select: none;
		-webkit-user-select: none;
		-webkit-touch-callout: none;
		-webkit-tap-highlight-color: transparent;
	}
	html.touch u { text-decoration: none }
	html.touch ul { margin-left: .5em }
	html.touch input[type=range] { width: 18em }
	html.touch #current { line-height: 1.25em }
	html.touch #playlist {
		overflow-x: auto;
		white-space: nowrap;
	}
	html.touch #unfold { display: block }

html:not(.show) > body > div,
html:not(.show) > body > div:before { opacity: 0 }

html.dim > body { background: black }
html.dim > body > div,
html.dim > body > div:before { opacity: .25 }

body, button, input {
	font-family: Barlow, "Segoe UI", sans-serif;
	line-height: 1.25em;
	word-spacing: .1em;
	letter-spacing: -.04em;
	font-variant-numeric: tabular-nums;
	color: var(--text);
}

body {
	background: var(--bg-body);
	transition: background .4s ease-out;
}

body > div {
	margin: .5em 2em;
	padding: .25em;
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: 2px;
	cursor: default;
	transition: opacity .2s ease-in;
}
	body > div:before {
		position: absolute;
		left: .75em;
		margin-top: -.25em;
		text-shadow: .5px .5px var(--text-shadow);
	}

body.locked #stop, body.locked #previous, body.locked #next,
body.locked #enqueue, body.locked #random, body.locked #crossfade, body.locked #playlistbtn {
	color: var(--text-locked);
	pointer-events: none;
}
	body.locked #seek { pointer-events: none }
	body.locked #enqueue:before { content: "\f126" }
	body.locked #playlistdiv #trash { display: none !important }
body:not(.locked) #playlistdiv:hover #trash,
body:not(.locked) #library:hover #unfold { display: block }

button {
	display: inline-block;
	padding: .5em;
	font-size: .95em;
	text-shadow: .5px .5px var(--text-shadow-button);
	background: none;
	border: none;
	border-radius: 3px;
	cursor: pointer;
	transition: background .1s ease-in;
}
	button:before { font-size: 1.05em }
	button:hover, .menu > button:focus { background: var(--bg-button-hv) }
	button::-moz-focus-inner { border: none }

input, select {
	width: 29.5em;
	max-width: calc(100% - 7.5em);
	padding: .1em;
	background: var(--bg);
	font-size: .8em;
	border: none;
	border-bottom: 1px solid var(--text);
}

input[type=range] {
	width: 14em;
	max-width: 90%;
	height: 15px;
	margin-top: -1px;
	padding: 0 0 0 .2em;
	background: transparent;
	vertical-align: text-top;
	opacity: .5;
	border: none;
	outline: none !important;
	cursor: pointer;
	-moz-appearance: none;
	-webkit-appearance: none;
}
	input[type=range]::-moz-focus-outer { border: none }
	input[type=range]::-moz-range-track {
		height: 1px;
		background: var(--text);
	}
	input[type=range]::-moz-range-thumb {
		width: 13px;
		height: 13px;
		background: var(--bg-thumb);
		border: 1px solid var(--text);
		border-radius: 50%;
		-moz-appearance: none;
	}
		input[type=range]:hover::-moz-range-thumb { background: var(--bg-thumb-hv) }
	input[type=range]::-webkit-slider-runnable-track {
		height: 1px;
		margin-top: -1px;
		background: var(--text);
	}
	input[type=range]::-webkit-slider-thumb {
		width: 13px;
		height: 13px;
		margin-top: -6px;
		background: var(--bg-thumb);
		border: 1px solid var(--text);
		border-radius: 50%;
		-webkit-appearance: none;
	}
		input[type=range]:hover::-webkit-slider-thumb { background: var(--bg-thumb-hv) }
	input[type=range]::-ms-thumb { margin: 0 }
	input[type=range]::-ms-tooltip { display: none }
	input[type=range]::-ms-track {
		height: 1px;
		background: var(--text);
		border: none;
	}
	input#volumeslider {
		display: none;
		width: unset;
		margin: 3px 0 0 -3px;
	}
		input#volumeslider::-webkit-slider-runnable-track { margin-top: 0px }

ul {
	display: none;
	margin-left: 1.25em;
	list-style: none;
}

li.dim { color: var(--text-dim) !important }

li.dim:hover, li.dim:hover:before,
li.dim:focus, li.dim:focus:before,
li.parent:hover, li.parent:hover:before,
li.parent:focus, li.parent:focus:before,
li:hover .artist, li:focus .artist { color: var(--focus-dim) !important }

li:hover, li:hover:before,
li:focus, li:focus:before,
li.filtered:hover, li.filtered:hover:before,
li.filtered:focus, li.filtered:focus:before { color: var(--focus) !important }

li:hover, li:hover:before,
li.parent:hover, li.parent:hover:before { transition: color .05s ease-in }

li#last:before { visibility: hidden }

li.over { border-top: 1px dotted var(--focus) }

#splash {
	position: absolute;
	top: calc(50vh - .75em);
	left: calc(50% - .5em);
	font-size: 7.25em;
	color: var(--bg-splash);
	opacity: 0;
	border: none;
	z-index: -1;
}
	#splash.show {
		opacity: 1;
		transition: opacity 4s;
	}

#player {
	white-space: nowrap;
	overflow: hidden;
}
	#player > * {
		display: inline-block;
		vertical-align: middle;
		transition: max-width .4s, max-height .4s, min-width .4s, min-height .4s, opacity .4s;
	}

#cover {
	min-width: 7em;
	max-width: 7em;
	min-height: 7em;
	max-height: 7em;
	border: 1px solid var(--border-cover);
	border-radius: 3px;
	cursor: zoom-in;
}
	#player.big:not(.fix) > #cover {
		min-width: 300px;
		min-height: 300px;
		max-width: 300px;
		max-height: 300px;
	}
#player.big:not(.fix) #current { width: calc(100% - 300px) }
#player.full:not(.fix) #cover, #player.full:not(.fix) #current, #player.full:not(.fix) #current > * {
	display: block;
	min-width: 0;
	min-height: 0;
	max-width: 100%;
	max-height: 100%;
	margin: 0 auto;
	text-align: center;
}
	#player.full #cover { cursor: zoom-out }
	#player.full:not(.fix) #current {
		width: unset;
		margin-top: .25em;
	}
	#player.full #seek { margin-bottom: .25em }

#current {
	width: calc(100% - 7em);
	padding: .2em .25em;
}
	#current > div {
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

#title {
	font-weight: bold;
	letter-spacing: -.02em;
}

#time {
	display: inline-block;
	color: var(--text-dim);
}

#controls { margin-bottom: 1px }
	#controls > button:before { margin: .25em }

#toast {
	display: none;
	position: fixed;
	top: 0;
	right: 0;
	padding: 1em;
	background: var(--bg-toast) !important;
	box-shadow: 0 0 2px 2px var(--bg-toast);
	cursor: default;
	z-index: 3;
}
	#toast.error { background: var(--bg-toast-error) !important }

html:not(.dim) #player.fix {
	position: fixed;
	top: -1px;
	left: 0;
	right: 0;
	margin: 0;
	box-shadow: 0 0 2px 1px var(--box-shadow);
	animation: fix;
	animation-duration: .4s;
	z-index: 2;
}
	@keyframes fix { from { transform: translateY(-100%) }}
	#player.fix #cover {
		min-width: 5.25em;
		max-width: 5.25em;
		min-height: 5.25em;
		max-height: 5.25em;
		cursor: row-resize;
		transition: opacity 4s;
	}
	#player.fix #current {
		width: calc(100% - 5.5em);
		padding: 0 0 0 .25em;
	}
	#player.fix #cover { transition: none }
	#player.fix:before, #player.fix #time, #player.fix #seek { display: none }
	#player.fix, #player.fix button:not(:hover) { background: var(--bg-player-fix) }

#options.whatsapp button.whatsapp { display: inline-block }
#options.whatsapp input.uri { max-width: calc(100% - 10em) }

#playlistoptions, #shares {
		max-height: 0;
		overflow-y: hidden;
		transition: margin-top .2s, padding-top .2s, max-height .2s ease-out;
}
	#options.playlistbtn #playlistoptions, #options.share #shares {
		max-height: 11em;
		margin-top: .25em;
		padding-top: .25em;
		border-top: 1px solid var(--border);
		transition: max-height .2s ease-in;
	}

#playlistsdiv, #afterdiv { display: inline-block }

#shares button:before { margin-right: 0 }
#shares input { direction: rtl }
#shares > .sharediv {
	white-space: nowrap;
	overflow: hidden;
}

#playlistdiv > div,
#library > div { position: relative }

#trash {
	display: none;
	position: absolute;
	top: 0;
	right: 0;
	background: var(--bg-trash);
	box-shadow: -1px 1px 2px 1px var(--bg-trash);
	z-index: 1;
}
	#trash:before {
		padding: .4em;
		font-size: 1.1em;
	}
		#trash.over:before, #trash:hover:before { display: none }
	#trash:not(:hover) button { display: none }
	#trash:hover { background: var(--bg) }
	#trash.drag {
		height: 100%;
		padding: .5em;
		border-left: 1px solid var(--border);
	}
	#trash.drop, #trash.on, #trash.over { display: block}
	#trash.drop, #trash.on { color: var(--focus) }

#playlist {
	min-height: 2.25em;
	max-height: 10.25em;
	overflow-y: auto;
	list-style: none;
}
	#playlist.resize {
		min-height: 4.5em;
		max-height: initial;
		resize: vertical;
	}

#playlist li {
	margin-left: 1.25em;
	cursor: alias;
}
#playlist li:before { margin-left: -1.25em }
#playlist li[error="1"] { color: red }

#filterdiv {
	margin-right: 2em;
	white-space: nowrap;
}

#filter {
	width: 21.5em;
	max-width: calc(100% - 5.5em);
	padding-top: .75em;
}

#unfold {
	display: none;
	position: absolute;
	top: 0;
	right: 0;
	background: none;
	z-index: 1;
}

#tree {
	display: none;
	margin-left: 1.25em;
	list-style: none;
}
	#library.unfold #tree { display: block }

#tree li { cursor: pointer }
#tree li:before { margin-left: -1.25em }
#tree li:focus { text-decoration: underline solid var(--focus) }
#tree li:focus * { text-decoration: underline solid var(--bg) }
#tree li.dim:focus, #tree li.parent:focus { text-decoration: underline solid var(--focus-dim) !important }
#tree li.open > ul { display: block }
#tree li.parent { color: var(--text-li-parent) }
#tree li.parent .song, #tree li.filtered,
#tree li:hover > ul, #tree li:focus > ul { color: var(--text) }

.title {
	height: 1.25em;
	cursor: alias;
}

.artist, .dim { color: var(--text-dim) }

.hide { display: none }

.menu {
	display: none;
	position: absolute;
	background: var(--bg-menu);
	border: 1px solid var(--border);
	border-radius: 3px;
	box-shadow: 0 1px 2px 2px var(--box-shadow);
	z-index: 2;
}
	.menu button {
		display: block;
		width: 100%;
		background: var(--bg-menu);
		text-align: left;
		border-radius: 0;
	}
	.menu p { padding: .5em }

@media (max-width: 480px) {
	body > div { margin: 2px }
	body > div:before { display: none }
}

@media (max-width: 670px) {
	body { font-family: BarlowSC, "Segoe UI", sans-serif }

	#player:not(.fix) #cover, #player:not(.fix) #current, #player:not(.fix) #current > *:not(#seek) {
		display: block;
		min-width: 0;
		min-height: 0;
		max-width: 100%;
		max-height: 100%;
		width: unset !important;
		height: unset;
		margin: 0 auto;
		padding: 0;
		text-align: center;
	}
		#player:not(.fix) #cover { max-height: 10em }
		#current:not(.fix) { margin-top: .25em }
		#player:not(.fix) #seek {
			margin-bottom: .5em;
			padding: .5em;
		}

	#options { text-align: center }
}

*:before {
	display: inline-block;
	width: 1em;
	font-family: Foundation;
	text-align: center;
}
	#options button:before, #trash button:before, #toast:before, li:before { margin-right: .25em }

#after:before { content: "\f182" }
#trash:before { content: "\f204" }
#crossfade:before { content: "\f1b2" }
#enqueue:before, .add:before { content: "\f199" }
#export:before { content: "\f188" }
#import:before { content: "\f17f" }
#load:before { content: "\f180" }
#splash:before { content: "\f1ed" }
#library:before { content: "\f17b" }
#lock:before { content: "\f16a" !important }
	#lock.on:before { content: "\f20a" !important }
#next:before { content: "\f17c" }
#options:before { content: "\f214" }
#player:before { content: "\f153" }
#playlistbtn:before { content: "\f18e" }
#playlistdiv:before { content: "\f103" }
#playpause:before, #playlibrary:before { content: "\f198" }
	#playpause.playing:before { content: "\f191" }
#previous:before { content: "\f19c" }
#random:before, #randomlibrary:before { content: "\f13a" }
#randomfiltered:before { content: "\f14b" }
#remove:before { content: "\f204" }
#repeatplaylist:not(.on):before { content: "\f1a5"; margin-left: 1px; margin-right: calc(.25em - 1px); transform: scale(-1, 1) }
#save:before { content: "\f184" }
#share:before { content: "\f1ad" }
#stop:before, #stopplayback:before { content: "\f1ef" }
#toast:before { content: "\f217" }
#unfold:before { content: "\f10e" }
	#library.unfold #unfold:before { content: '\f10d' }
#volume:before { content: "\f211" }
#volume.muted:before { content: "\f210" }

.clear:before { content: "\f217" }
.download:before { content: "\f143" }
.filter:before { content: "\f14b" }
.folder:before { content: "\f150" }
.folder.open:before { content: "\f14e" }
.playing:before { content: "\f198" }
.playlist:before { content: "\f18e" }
.link:before { content: "\f165" }
.link.copied:before { content: "\f129" }
.song:not(.playing):before { content: "\f17b"; color: var(--text-dim) }
button.on:before { content: "\f126" !important }
button.whatsapp:before { content: "\f1a6" }
