.terminal {
	font-family: monospace, monospace;
	cursor: text;
	line-height: initial;
}

tty-player {
	border: 2px solid #285577;
	border-top: 1px solid #4c7899;
}

tty-player .title {
	background: #285577;
	border-bottom: 1px solid #4c7899;
	color: #fff;
	font-family: sans-serif;
	font-weight: bold;
	padding: 0.2em;
	line-height: 1;
	height: 1em;
	cursor: default;
}

tty-player menu {
	display: none;
}

tty-player {
	display: inline-block;
	position: relative;
}

tty-player:not([controls]) tty-player-controls {
	display: none;
}

tty-player-poster {
	/* XXX: <video> has an overlay with play button if [controls] over the poster *image*, but here we have an overlay with play button regardless. Perhaps specifying a poster currentTime or script might work? */
	background-repeat: no-repeat;
	background-position: center;
	background-size: cover;
	background-image: url("../img/renick-poster.png");
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
}

tty-player[controls] tty-player-poster {
	bottom: 28px;
}

tty-player:hover tty-player-poster {
	opacity: 1;
}

tty-player-controls {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(53, 47, 47, 0.5);
	opacity: 0;
	display: flex;
	flex-direction: row;
	transition: opacity 0.2s linear;
	cursor: default;
}

/* Browsers tend to show the controls when a <video> ends, too; I, however, am not doing this for now at least as the controls will overlap with what is often the most important part of the terminal (the bottom). For this reason, I haven’t hooked up any support for that either, only showing controls persistently when the poster is up. */
tty-player-controls.poster,
tty-player:hover tty-player-controls {
	opacity: 1;
}

tty-player-controls input[type=range], tty-player-controls button {
	margin: 0;
	padding: 0;
	border: none;
	background: none;
	font: inherit;
	line-height: inherit;
	-moz-appearance: none;
	-webkit-appearance: none;
}

tty-player-controls button {
	padding: 0;
	background: none;
	opacity: 0.75;
	flex: 0 1 auto;
	line-height: 1;
	width: 28px;
	height: 28px;
}

tty-player-controls button:hover {
	color: #777;
	opacity: 1;
}

tty-player-controls input[type=range] {
	flex: 1;
	height: 8px;
	margin: 10px 5px;
}

tty-player-controls button {
	background-repeat: no-repeat;
	background-position: center;
}

tty-player-controls button.play {
	background-image: url("data:image/svg+xml,%3C?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3E%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='14'%20height='16'%3E%3Cpath%20fill='%23ccc'%20d='M0,0%200,16%2014,8Z'/%3E%3C/svg%3E");
}

tty-player-controls button.pause {
	background-image: url("data:image/svg+xml,%3C?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3E%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='14'%20height='16'%3E%3Cpath%20fill='%23ccc'%20d='M1,0L1,16L5,16L5,0L0,0zM9,0L9,16L13,16L13,0L9,0z'/%3E%3C/svg%3E");
}

tty-player-controls input[type=range]:focus {
	box-shadow: none;
	outline: none;
}

tty-player-controls input[type=range]::-moz-range-track,
tty-player-controls input[type=range]::-moz-range-thumb,
tty-player-controls input[type=range]::-moz-range-progress {
	border-radius: 4px;
	height: 8px;
}

tty-player-controls input[type=range]::-moz-range-track {
	background: rgba(255, 255, 255, 0.5);
}

tty-player-controls input[type=range]::-moz-range-thumb {
	-moz-appearance: none;
	width: 0;
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: 0;
	position: relative;
}

tty-player-controls input[type=range]::-moz-range-progress {
	background: #fff;
}

input[type=range] {
	overflow: hidden;
}

tty-player-controls input[type=range]::-webkit-slider-runnable-track {
	-webkit-appearance: none;
	height: 8px;
	background: rgba(255, 255, 255, 0.5);
	border-radius: 4px;
}

tty-player-controls input[type=range]::-webkit-slider-thumb:before {
	position: absolute;
	top: 0;
	right: 50%;
	left: -9999px;
	background: #fff;
	content: '';
	height: 8px;
	pointer-events: none;
}

tty-player-controls input[type=range]::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 0;
	height: 0;
	position: relative;
}

/* I have not altered IE’s styles because I feel them already satisfactory */

tty-player-controls .current-time {
	position: absolute;
	color: #ddd;
	background: #888;
	font-family: sans-serif;
	font-size: 12px;
	display: block;
	box-shadow: 0 1px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.5), inset 0 1px rgba(255, 255, 255, 0.2);
	padding: 0 5px;
	line-height: 16px;
	border-radius: 4px;
	top: -7px;
}

tty-player-controls .current-time::after {
	content: "";
	position: absolute;
	width: 8px;
	height: 8px;
	background: linear-gradient(-45deg, #888 50%, transparent 50%);
	box-shadow: 1px 1px rgba(0, 0, 0, 0.5), 1px 1px 1px rgba(0, 0, 0, 0.5);
	bottom: -3px;
	left: 50%;
	margin-left: -5px;
	transform: rotate(45deg);
}

tty-player-controls .duration {
	font-family: sans-serif;
	font-size: 12px;
	color: #999;
	line-height: 18px;
	padding: 5px;
}
