* {
	box-sizing: border-box;
}

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

#pageBar {
	position: fixed; 
	top: 0; 
	left: 0; 
	width: 15em; 
	height: 100vh;
	padding-top: 0.5em;
	border-right: 1px solid #333;
	display: flex; 
	flex-direction: column;
	align-items: center;
	background-color: white;
	z-index: 1;
}

#pageBar img {
	width: 10em;
	margin-bottom: 1em;
}

#pageBar a {
	cursor: pointer;
}

#pageBar .mainMenuItem {
	color: black;
	font-size: 125%;
	width: 100%;
	font-family: Arial, Helvetica, sans-serif;
	font-weight: bold;
	text-decoration: none;
	border: none; 
	text-align: center;
	padding: 0.5em;
}

#pageBar .mainMenuItem:hover {
	background-color: #EEE;
}

#pageBar .mainMenuItem:before {
	font-size: 150%;
	font-weight: bold;
	margin-right: 0.25em;
	font-family: mono;
	line-height: 66%;
}

#pageBar #videoPageButton:before {
	content: "⌂";
}

#pageBar #subscriptionPageButton:before {
	content: "⇶";
	font-weight: normal;
}

#pageBar #animesPageButton:before {
	content: "㊠";
	font-size: 100%;
}

#pageBar #channelShortcuts {
	width: 100%; 
	height: 15em;
	padding: 0 1.5em;
	text-align: center;
	overflow-y: scroll;
	scrollbar-color: #555 white;

	/* Trick to display gradients at the top or bottom only when scrolling is available */
	background:
		/* Shadow covers */
		linear-gradient(white 33%, rgba(255, 255, 255, 0)),
		linear-gradient(rgba(255, 255, 255, 0), white 66%) 0 100%,
		/* Shadows */
		linear-gradient(rgba(0, 0, 0, .2), rgba(0, 0, 0, 0)),
		linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, .2)) 0 100%;

	background-repeat: no-repeat;
	background-color: white;
	background-size: 100% 6em, 100% 6em, 100% 2em, 100% 2em;
	background-attachment: local, local, scroll, scroll;
}

#channelShortcuts img {
	width: 2.5em;
	height: 2.5em;
	border-radius: 50%;
	margin: 0.5em;
	object-fit: cover;
}

#channelShortcuts img:hover {
	filter: brightness(50%);
}

#addChannelButton {
	position: absolute;
	top: 0em;
	right: calc(max(5em, 25%));
	padding: 0.2em;
	border: none; 
	background-color: transparent;
	cursor: pointer;
	text-decoration: underline;
	font-size: 115%;
	text-align: right;
}

#addChannelButton:after {
	content: "";
	display: inline-block;
	width: 2em;
	height: 2em;
	background-image: url(img/add.svg);
	background-position: center;
	background-repeat: no-repeat;
	background-size: contain;
	vertical-align: middle;
}

#addChannelButton:hover {
	font-weight: bold;
	filter: brightness(80%);
}

#addChannelOverlay {
	display: none;
	position: fixed; 
	top: 0; 
	left: 0;
	width: 100vw; 
	height: 100vh; 
	z-index: 2;
	background-color: #E1E1E175;
}

#addChannelPopup {
	margin-top: calc(50vh - 10em);
	margin-left: calc(50vw - 10em);
	width: 20em; 
	height: 10em; 
	border-radius: 1em;
	padding: 1em;
	box-shadow: 0.2em 0.2em #00000077; 
	border: 1px solid black;
	background-color: white;
	text-align: center;
}

#addChannelURL {
	width: calc(100% - 5em);
}

#addChannelAddButton,
#addChannelCancelButton {
	padding: 0.5em; 
	margin-top:1em;
	margin-right: 1.5em;
	margin-left: 1.5em;
	border: none; 
	border-radius: 1em;
	cursor: pointer;
	border: 1px solid black;
	width: 7em;
}

#addChannelAddButton {
	background-color: #7cff71;
}

#addChannelCancelButton {
	background-color: #ff5e5e;
}

#addChannelAddButton:hover,
#addChannelCancelButton:hover {
	filter: brightness(80%);
}

#addChannelAddButton:before,
#addChannelCancelButton:before {
	content: "";
	display: inline-block;
	margin-right: 0.5em;
	width: 1.5em;
	height: 1.5em;
	background-position: center;
	background-repeat: no-repeat;
	background-size: contain;
	vertical-align: -0.4em;
}

#addChannelAddButton:before {
	background-image: url(img/add.svg);
}

#addChannelCancelButton:before {
	background-image: url(img/cancel.svg);
}

#settingsButton {
	position: absolute;
	top: 0em;
	height: 2.5em;
	right: calc(max(5em, 25%) - 3em);
	padding: 0.5em;
	border: 1px solid black;
	border-top: none; 
	background-color: #ffc457;
	border-radius: 0 0 0.5em 0.5em;
	cursor: pointer;
	font-size: 115%;
	font-weight: bold;
}

#settingsButton:hover {
	background-color: #cc9d46;
}

#settingsMenu {
	position: absolute; 
	top: 100%;
	right: -1px;
	background-color: #ffc457;
	width: 8em;
	border: 1px solid black;
	border-radius: 0.5em 0 0.5em 0.5em;
	z-index: 3;
}

#settingsMenu a {
	display: block; 
	padding: 0.4em 0 0.4em 0.7em;
	text-align: left;
	color: black; 
	text-decoration: none;
	font-weight: normal;
	border-radius: 0.5em;
}

#settingsMenu a:first-child {
	border-top-right-radius: 0em;
}

#settingsMenu a:hover {
	filter: brightness(80%);
	background-color: #ffc457;
}

.page {
	position: relative;
	margin-left: 15em;
	padding: 0.01em 1em; /* The small padding is to make sure the div contains its children margins*/
	font-family: Arial, Helvetica, sans-serif;
	min-width: 30em;
}

/* Video style */

.vid {
	position: relative;
	flex-grow: 0; 
	flex-shrink: 0;
	padding: 0em 1em 1em 1em; 
	margin: 0 0.5em;
	width: 12em;
}

.vid.hidden {
	display: none;
}

.vid .vidIcon {
	width: 10em;
	cursor: pointer;
	border-radius: 0.5em;
	border: 1px solid black;
}

.vid.vidSeen h3,
.vid.vidSeen h2
 {
	color: #555;
}

.vid.vidSeen .vidIcon,
.vid.vidSeen h3 img {
	filter: grayscale(70%) contrast(30%) brightness(125%) sepia(25%) hue-rotate(87deg);
	border-color: #555;
}

.vid.vidSeen .timeLabel {
	background-color: #555;
}

.vid.vidNotInterested h3,
.vid.vidNotInterested h2
 {
	color: #888;
}

.vid.vidNotInterested .vidIcon,
.vid.vidNotInterested h3 img {
	filter: grayscale(100%) contrast(30%) brightness(160%) sepia(25%) hue-rotate(-87deg);
	border-color: #888;
}

.vid.vidNotInterested .timeLabel {
	background-color: #888;
}

.vid .vidIcon:hover {
	filter: brightness(50%);
}

.vid h2 {
	font-size: small;
	font-weight: normal;
	overflow: hidden;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	width: 100%;
	margin: 0; 
}

#channelPage .vid h3 {
	/*Don't display the name of the channel on the video card if you are already on the page 
	  of a specific channel*/
	display: none;
}

.vid h3 {
	font-size: smaller;
	margin-bottom: 0;
	position: relative; 
	padding-left: 2em;
	height: 2.5em;
  	line-height: 1.25em;
	display: flex;
  	align-items: center;
}

.vid h3 img {
	float: left;
	margin-right: 0.25em;
	position: absolute;
	top: 0.3em;
	left: -1.3em;
	width: 3em;
	height: 3em;
	object-fit: cover;
	border: 1px solid black;
	border-radius: 50%;
	box-shadow: 0.2em 0.2em #00000077;
	z-index: 2;
}

.timeLabel {
	color: white; 
	font-size: small;
	font-family: monospace;
	background-color: black;
	float: right;
	position: relative; 
	top:-1.9em;
	padding: 0.1em 0.25em;
	margin-bottom: -1.9em;
	border-bottom-right-radius: 0.5em;
}

.buttonsDiv {
	text-align: center;
	height: 2em;
}

.toggleSeen {
	background-image: url(img/seen-unchecked.svg);
	position: absolute;
	top: 8.7em;
	left: 0.7em;
	font-size: smaller;
	background-color: transparent;
	background-position: center left;
	background-repeat: no-repeat;
	background-size: contain;
	border: none;
	cursor: pointer;
	height: 2em;
	width: 2em;
	margin: 0 auto;
	filter: grayscale(0%) contrast(100%) brightness(100%);
	opacity: 0;
}

#channelPage .toggleSeen {
	top: 5.3em;
	left: 0.7em;
}

.vid:hover .toggleSeen {
	opacity: 1;
}

.vid .toggleSeen:hover {
	background-image: url(img/seen-checked.svg);
}

.vid.vidSeen .toggleSeen {
	background-image: url(img/seen-checked.svg);
	opacity: 1;
}

.toggleNotInterested {
	background-image: url(img/not-interested-unchecked.svg);
	position: absolute;
	top: 8.7em;
	left: 2.7em;
	font-size: smaller;
	background-color: transparent;
	background-position: center left;
	background-repeat: no-repeat;
	background-size: contain;
	border: none;
	cursor: pointer;
	height: 2em;
	width: 2em;
	margin: 0 auto;
	filter: grayscale(0%) contrast(100%) brightness(100%);
	opacity: 0;
}

#channelPage .toggleNotInterested {
	top: 5.3em;
	left: 2.7em;
}

.vid:hover .toggleNotInterested {
	opacity: 1;
}

.vid .toggleNotInterested:hover {
	background-image: url(img/not-interested-checked.svg);
}

.vid.vidNotInterested .toggleNotInterested {
	background-image: url(img/not-interested-checked.svg);
	opacity: 1;
}
