/* Global */

html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }

body {
  font: 0.8125em/1.3077em Roboto, arial, sans-serif;
  background: #fff;
}

h1 {
  margin: 0 0 0.4167em;
  font-weight: normal;
  font-size: 1.8462em;
  line-height: 1em;
}

h2 {
  margin: 0;
  font-size: 1em;
}

h3 {
  margin-top: 0;
  font-size: 1em;
  font-weight: 500;
}

h4 {
  margin: 0;
  font-weight: 500;
}

a {
  color: #167ac6;
  text-decoration: none;
}

a:hover { text-decoration: underline; }

p { margin-top: 0; }

ul {
  padding: 0;
  margin: 0;
}

input[type="text"] {
  height: 1.75em;
  padding: 0.125em 0.375em;
  font-size: 1.2308em;
  border: 1px solid #d3d3d3;
}

textarea {
  width: calc(100% - 60px - 0.7692em);
  min-height: 4.6154em;
  padding: 0.4615em;
  margin: 0 0 0.3846em 0.7692em;
  border: 1px solid #ddd;
  border-radius: 2px;
  resize: vertical;
}

.sprite,
.sprite::before,
.sprite::after {
  background-image: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/38273/yt-sprite-01.webp);
  background-repeat: no-repeat;
}

.sprite-alt,
.sprite-alt::before,
.sprite-alt::after {
  background-image: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/38273/yt-sprite-02.webp);
  background-repeat: no-repeat;
}

.text-replace {
  overflow: hidden;
  color: transparent;
  text-indent: 100%;
  font-size: 0;
}

.button {
  display: inline-block;
  height: 2.5455em;
  padding: 0 10px;
  color: #333;
  font-weight: 500;
  font-size: 0.8462em;
  line-height: 2.5455em;
  background: #fff;
  border: 1px solid #d3d3d3;
  border-radius: 2px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.05);
  cursor: pointer;
}

.button:hover {
  text-decoration: none;
  background: #f0f0f0;
  border-color: #c6c6c6;
  box-shadow: 0 1px 0 rgba(0,0,0,0.10);
}

.avatar,
.vid-thumb {
  float: left;
  margin-right: 0.7692em;
}

.more {
  display: block;
  margin-top: 2em;
  color: #767676;
  font-size: 0.8462em;
  line-height: 2.5455em;
  text-align: center;
  text-transform: uppercase;
  border-top: 1px solid #e2e2e2;
}

.more:hover {
  color: #222;
  text-decoration: none;
}


/* Header */

.main-header {
  position: fixed;
  z-index: 100;
  display: flex;
  width: 100%;
  padding: 0.6923em 2.3077em;
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
}

.main-header > * {
  display: flex;
  align-items: center;
}

.menu-toggle {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin: 0 10px;
  background-position: -471px -437px;
}

.menu {
  width: calc(200px - 2em);
  margin-right: 2em;
}

.menu-toggle:hover { background-position: -413px -411px; }

.logo {
  display: inline-block;
  width: 72px;
  height: 30px;
  background-position: -414px -233px;
}

.search { flex-grow: 2; }

.search input {
  width: calc(100% - 6em);
  max-width: 585px;
  min-width: 200px;
}

.search .button {
  width: 6em;
  border-left: none;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.search .button::before {
  content: '';
  display: block;
  width: 14px;
  height: 14px;
  margin: 0.5455em auto;
  background-position: -263px -79px;
  box-shadow: none;
  opacity: 0.6;
}

.search:hover .button::before { opacity: 1; }

.main-header .actions { margin-left: 3.8462em; }

.upload { margin-right: 1em; }

.notifications {
  position: relative;
  top: -2px;
  display: inline-block;
  width: 30px;
  height: 30px;
  margin: 0 0.6154em;
  background-position: -200px -209px;
  opacity: 0.55;  
}

.notifications:hover { opacity: 1; }

.main-header .user {
  display: inline-block;
  width: 27px;
  height: 27px;
  background-image: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/38273/yt-avatar-01.jpg);
  background-size: cover;
  border-radius: 50%;
}


/* Footer */

.main-footer {
  clear: left;
  padding: 0 2.3077em;
  background: #fff;
  border-top: 1px solid #e2e2e2;
}

.main-footer li {
  list-style: none;
  display: inline-block;
}

.footer-nav .main {
  display: flex;
  padding-bottom: 1.1538em;
  margin: 1.1538em 0;
  border-bottom: 1px solid #e2e2e2;
}

.footer-nav ul { margin: 0.6154em 0; }

.footer-nav li { margin-right: 1.1538em; }

.footer-nav a:not(.button) {
  color: #666;
  font-weight: 500;
  text-decoration: none;
}

.footer-nav a:not(.button):hover {
  color: #167ac6;
  text-decoration: underline;
}

.button.language::before,
.button.history::before,
.button.help::before {
  content: '';
  position: relative;
  top: -1px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.5455em;
  opacity: 0.5;
}

.button.language::before {
  width: 25px;
  height: 15px;
  background-position: -277px -175px;
}

.button.history::before {
  width: 12px;
  height: 15px;
  background-position: -547px 0;
}

.button.help::before {
  width: 15px;
  height: 16px;
  background-position: -234px -209px;
}

.button.drop-down::after {
  content: '';
  display: inline-block;
  vertical-align: middle;
  margin-top: -3px;
  margin-left: 0.7273em;
  border: 4px solid transparent;
  border-bottom: none;
  border-top-color: #333;
}

.footer-nav .primary a {
  color: #333;
  text-decoration: none;
}

.footer-nav .secondary a { font-size: 0.8462em; }


/* Content */

.content-wrap {
  padding: calc(3.7692em + 480px) 0 0.01em;
  overflow: auto;
  background: #f1f1f1;
  transition: 300ms;
}

.content-wrap.PiP { padding: calc(4.25em + 236px) 0 0.01em; }


/* Video */

.video {
  position: fixed;
  z-index: 10;
  top: 3.7692em;
  right: 0;
  width: 100%;
  height: 480px;
  overflow: hidden;
  text-align: center;
  background: #000;
  transition: 300ms;
}

.PiP .video {
  right: 0.7692em;
  width: 420px;
  height: 236px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.video iframe {
  width: 854px;
  height: 480px;
  transition: 300ms;
}

.PiP iframe {
  width: 420px;
  height: 236px;
}


/* Details */

.details {
  float: left;
  width: calc(100% - 430px);
  padding: 0.7692em 0.7692em 0;
  background: #f1f1f1;
}

.details > * {
  position: relative;
  padding: 1.1538em;
  margin-bottom: 0.7692em;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.1);
}

.details-description,
.details-sidebar { padding-bottom: 0; }

.details li {
  list-style: none;
  display: inline-block;
}

.channel-info {
  overflow: auto;
  margin-bottom: 0.7692em;
}

.channel-name {
  color: #333;
  font-weight: 500;
}

.subscription-container {
  margin: 0.7272em 0;
  color: #767676;
  font-size: 0.8462em;
}

.subscription-container li { float: left; }

.subscription-container a {
  display: block;
  padding: 0.3333em 0.6154em 0.2727em;
  color: #fff;
  font-size: 1.0909em;
  background: #e62117;
  border-radius: 2px 0 0 2px;
}

.subscription-container a:hover {
  text-decoration: none;
  background: #cc181e;
}

.subscription-container a::before {
  content: '';
  position: relative;
  top: 2px;
  display: block;
  float: left;
  width: 16px;
  height: 12px;
  margin-right: 0.6154em;
  background-position: -390px -421px;
}

.subscribers {
  padding: 0.25em 0.6154em;
  border: 1px solid #ccc;
  border-left: none;
  border-radius: 0 2px 2px 0;
}

.details-header .actions {
  clear: left;
  border-top: 1px solid #e2e2e2;
}

.details-header .actions ul { padding-top: 0.9231em; }

.details-header .actions a {
  margin-right: 1.8181em;
  color: #000;
  font-size: 0.8462em;
  text-decoration: none;
  background: none;
  opacity: 0.5;
}

.details-header .actions a:hover { opacity: 0.6; }

.details-header .actions .more {
  margin: 0;
  line-height: inherit; 
  border: none;;
}

.details-header .actions a::before {
  content: '';
  display: inline-block;
  vertical-align: middle;
  width: 20px;
  height: 20px;
  margin-right: 0.5455em;
}

.add-to::before { background-position: -273px 0; }

.share::before { background-position: -274px -237px; }

.more::before { background-position: -366px -421px; }

.sentiment {
  position: absolute;
  bottom: 1.1538em;
  right: 1.1538em;
}

.sentiment .views {
  position: absolute;
  bottom: 100%;
  right: 0;
  width: 160px;
  color: #666;
  font-size: 1.4615em;
  line-height: 2em;
  text-align: right;
}

.sentiment .views::after {
  content: '';
  position: absolute;
  bottom: 0;
  display: block;
  width: 100%;
  height: 2px;
  background-color: #167ac6;
}

.details .sentiment a { margin-right: 0.9091em; }

.sentiment .like::before { background-position: -58px -28px; }

.sentiment .dislike::before { background-position: -187px 0; }

.details-comments h3 a {
  color: #666;
  text-transform: uppercase;
}

.user-comment { margin-bottom: 1em; }

.user-comment .avatar { position: relative; }

.user-comment .avatar::before,
.user-comment .avatar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 100%;
  display: block;
  margin-left: 7px;
  border: 7px solid transparent;
  border-top-color: #ddd;
  border-right-color: #ddd;
}

.user-comment .avatar::after {
  top: 1px;
  margin-left: 9px;
  border-top-color: #fff;
  border-right-color: #fff;
}

.user-comment textarea:focus { outline: none; }

.user-comment .button-group { text-align: right; }

.user-comment .button-group a { margin-left: 0.7692em; }

.post,
.post:hover {
  color: #fff;
  background-color: #167ac6;
  border-color: #167ac6;
  opacity: 0.5;
  cursor: default;
}

.top-comments { margin-bottom: 1em; }

.comments > li {
  display: block;
  margin-bottom: 2em;
}

.comments .avatar { float: left; }

.comments .user { font-weight: 500; }

.comments .time {
  vertical-align: top;
  margin-left: 0.5455em;
  color: #767676;
  font-size: 0.8462em;
}

.comments p {
  margin-bottom: 0.3846em;
  overflow: hidden;
}

.comments .actions {
  margin-left: calc(50px + 0.7692em);
  font-size: 0.8462em;
}

.comments .actions li { margin-right: 1.0909em; }

.comments .actions li:first-child { margin: 0; }

.comments .actions a {
  color: #555;
  opacity: 0.75;
}
.comments .actions a:hover {
  text-decoration: none;
  opacity: 1;
}

.comments .actions .reply::after {
  content: '•';
  margin: 0 0.6364em;
}

.comments .actions .text-replace {
  display: inline-block;
  width: 14px;
  height: 14px;
  opacity: 0.2;
}

.comments .actions .text-replace:hover {
  opacity: 0.6;
}

.comments .actions .like { background-position: 0 0; }

.comments .actions .dislike { background-position: 0 -71px; }

.details-comments .more {
  padding: 0.8333em;
  margin: 1.25em 2.0833em;
  color: #333;
  font-weight: 500;
  font-size: 0.9231em;
  line-height: normal;
  text-transform: none;
  border: 1px solid #d3d3d3;
}

.details-comments .more:hover { background-image: linear-gradient(to top,#f0f0f0 0,#f8f8f8 100%); }


/* Sidebar */

.sidebar {
  position: relative;
  float: left;
  padding: 1.1538em;
  margin: 0.7692em 0.7692em 0.7692em 0;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.1);
}

.autoplay {
  position: absolute;
  top: 1.1538em;
  right: 1.1538em;
  color: #767676;
}

.autoplay h4 {
  display: inline-block;
  background: none;
  cursor: pointer;
}

.autoplay h4::after {
  content: '';
  display: inline-block;
  vertical-align: middle;
  width: 16px;
  height: 16px;
  margin: 0 0.3077em;
  background-position: -535px -366px;
  opacity: 0.5;
}

.autoplay h4:hover::after { opacity: 0.6; }

.toggle-switch {
  display: inline-block;
  vertical-align: middle;
  height: 15px;
  width: 35px;
  background: #b8b8b8;
  border-radius: 15px;
  cursor: pointer;
}

.toggle-switch::before {
  content: '';
  display: block;
  width: 15px;
  height: 15px;
  background: #fff;
  border-radius: 50%;
  border: 1px solid #b8b8b8;
}

.sidebar { width: 420px; }

.sidebar li {
  position: relative;
  display: block;
  margin-bottom: 1.1538em;
  overflow: auto;
}

.sidebar li:nth-child(2) {
  padding-top: 1em;
  border-top: 1px solid #e2e2e2;
}

.sidebar a {
  display: block;
  color: #333;
}

.sidebar a::before {
  content: attr(data-time);
  position: absolute;
  bottom: 2px;
  right: calc(100% - 118px);
  padding: 0 0.3636em;
  color: #fff;
  font-weight: 500;
  font-size: 0.8462em;
  background: #000;
  opacity: 0.75;
}

.sidebar a:hover { text-decoration: none; }

.sidebar a:hover h4 { color: #167ac6; }

.sidebar .vid-thumb {
  width: 120px;
  height: 68px;
  background-color: #000;
  background-position: center;
  background-size: cover;
}

.sidebar p {
  margin: 0;
  font-size: 0.8462em;
}

