body {
	font-family: 'Helvetica Neue', 'Roboto', 'Helvetica', sans-serif;
	background: #aaa;
	color: black;
}

h1, h2, h3, h4, h5, h6 {
	font-weight: normal;
	color: #888;
}

#media-chooser-stub,
#media-chooser {
	display: none;
}
#media-chooser-stub.active,
#media-chooser.active {
	display: block;
}

html, body {
	padding: 0;
	margin: 0;
}

#wrapper {
	position: relative;
	max-width: 864px;
	margin-left: auto;
	margin-right: auto;
	background: #eee;
	color: black;
}

#header {
	height: 5em;

	padding-left: 24px;

	overflow: hidden;
}
#header h1 {
	display: inline-block;
}
#header h2 {
	display: inline-block;
}

#source-info {
	padding: 8px;
	background-color: white;
}

#source-select-line {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}
#media-chooser-stub {
	background: rgba(0, 0, 0, 0.5);
	position: absolute;
	left: 0;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: 999;
}
#media-chooser {
	background: white;
	
	position: absolute;

	left: 0;
	max-width: 100%;
	width: 500px;

	top: 5em;
	bottom: 0;

	overflow-y: scroll;
	z-index: 9999;
}

#player-aspect {
	width: 100%;
	padding-bottom: 56.25%; /* force 16:9 aspect ratio */
	position: relative;
}
#player {
	background-color: #222;
	color: white;
	position: absolute;
	
	left: 0px;
	top: 0px;
	width: 100%;
	height: 100%;
}

#player:-webkit-full-screen {
	position: absolute;
	top: 0 !important;
	bottom: 0 !important;
	left: 0;
	right: 0;
}

#player:-ms-fullscreen {
	position: absolute;
	top: 0 !important;
	bottom: 0 !important;
	left: 0;
	right: 0;
}

#player > video,
#player > audio,
#player > ogvjs,
#player > applet,
#player > object {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

#metadata {
	overflow-x: hidden;
}

#media-source-block,
#searchform {
	margin: 16px;
}
#filter {
}

.media-item {
	position: relative;
	width: 100%;
	height: 72px;

	background: white;
	border-top: solid 1px #eee;

	cursor: pointer;
}
.media-item > img.thumb {
	position: absolute;
	top: 0;
	height: 72px;
	left: 0;
	width: 128px;

	object-fit: cover;
}
.media-item > div.title,
.media-item > div.desc {
	position: absolute;
	left: 140px;
	right: 0;
	height: 50%;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	padding-top: 8px;
}
.media-item > div.title {
	top: 0;
}
.media-item > div.desc {
	bottom: 0;
	color: #222;
	font-size: 80%;
}
.media-item > div.desc > span.format {
	color: #666;
	padding-right: 16px;
}

#info {
}

#info td {
	white-space: nowrap;
	text-overflow: ellipsis;
	overflow: hidden;
}

#benchmark-container {
	background: white;
	position: relative;
}
#benchmark {
	width: 100%;
	height: 10em;
}
#benchmark-legend {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	
	text-align: right;
	font-size: 12px;
}
#benchmark-legend > ul {
	position: absolute;
	left: 0;
	right: 0;
}
#benchmark-upper {
	top: 0;
}
#benchmark-lower {
	bottom: 0;
}
#benchmark-legend li {
	list-style: none;
}

#status-view {
	display: none;
}
#status-view.status-visible {
	display: block;
	color: red;
}

#decode-rate-table td {
	text-align: right;
}
.bench-target {
	color: red;
}
.bench-clock {
	color: blue;
}
.bench-total {
	color: black;
}
.bench-demux {
	color: brown;
}
.bench-video {
	color: darkcyan;
}
.bench-audio {
	color: green;
}
.bench-buffer {
	color: orange;
}
.bench-draw {
	color: purple;
}


#spinner-panel {
	display: none;

	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	bottom: 0;

	background-color: rgba(0, 0, 0, 0.5);
	background-image: url('ajax-loader.gif');
	background-repeat: no-repeat;
	background-position: center;
}
#spinner-panel.seeking,
#spinner-panel.loading,
#spinner-panel.error {
	display: block;
}
#spinner-panel.error {
	background-image: none;
	text-align: center;
	vertical-align: middle;
	color: red;
}
#control-panel {
	position: absolute;
	
	left: 0;
	right: 0;
	bottom: 0;
	height: 44px;
	
	background: rgba(255, 255, 255, 0.5);
	color: rgb(64, 64, 64);
	text-align: center;
	
	opacity: 1.0;
	transition: opacity 1.0s;
}

#controls {
	display: -webkit-flex;
	display: -ms-flexbox;
	display: flex;
	
	height: 44px;

	-webkit-align-items: center;
	-ms-flex-align: center;
	align-items: center;

	-webkit-user-select: none;
	-ms-user-select: none;
	user-select: none;

	touch-action: none;
}
#controls button {
	appearance: none;
	-moz-appearance: none;
	-webkit-appearance: none;
	
	/* reset some more styles from iOS */
	padding: 0;
	margin: 0;
	border: none;

	color: inherit;
	background: none;
	border: none;
	
	width: 44px;
	height: 44px;

	line-height: 44px;
	font-size: 22px;
	cursor: pointer;

	-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
#controls button:hover {
	color: black;
}
#controls button:active,
#controls button.active {
	color: white;
}
#controls button {
	/* shrink to fit */
	-webkit-flex: 0 1 auto;
	-ms-flex: 0 1 auto;
	flex: 0 1 auto;
}
#controls .progress {
	/* fill space */
	-webkit-flex: 1 1 auto;
	-ms-flex: 1 1 auto;
	flex: 1 1 auto;
	height: 4px;

	-webkit-user-select: none;
	-ms-user-select: none;
	user-select: none;
}
#controls .time-elapsed,
#controls .time-remaining {
	font-size: 10px;
	margin: 0 8px;
}

.progress {
	position: relative;
	margin-left: 8px;
	margin-right: 8px;
}

#progress-total {
	position: relative;
	height: 4px;
}

#progress-buffered,
#progress-processed {
	position: absolute;
	left: 0;
	top: 0;
	right: 0;
	bottom: 0;
}

#progress-total {
	background: gray;
}
#progress-buffered {
	background: white;
}
#progress-processed {
	background: green;
}

#progress-thumb {
	position: absolute;
	top: 0;
	left: 0;

	margin-top: -10px;
	margin-left: -10px;

	width: 24px;
	height: 24px;

	border: solid 1px #aaa;
	border-radius: 12px;

	background: #ccc;
}
#progress-thumb:hover {
	border-color: #888;
}
#progress-thumb:active {
	border-color: #666;
	background: #aaa;
}
