:root {
  /* basic colors */
  --keyer-bg-color: transparent;
  --comment-color: #fff;
  --comment-bg-color: #222;
  --comment-border-radius: 0px;
  --comment-font-size: 40px;
  --author-color: #222;
  --author-bg-color: #09e6c1;
  --author-avatar-border-color: #09e6c1;
  --author-border-radius: 0px;
  --author-avatar-border-size: 3px;
  --author-avatar-size: 128px;
  --author-font-size: 30px;
  /* donation/superchat specific */
  --donation-color: #5a4211;
  --donation-bg-color: #fff;
  --donation-gradient-stop0: #BF953F;
  --donation-gradient-stop1: #ede599;
  --donation-gradient-stop2: #B38728;
  --donation-label-color: #fff;
  --donation-label-text: 'SUPERCHAT';
  --donation-shadow-color: #fff;

  --shown-comment-bg-color: #555555;
  --highlighted-comment-bg-color: #f0f07d;

  /*
  LAYOUT
  */
  --comment-width: auto; /* go 100% for a full screen lower third style*/
  --comment-padding: 20px 40px 20px 70px;
  --comment-area-height: 30vh;
  --comment-scale: 1;
  --comment-area-size-offset: 0;
  --comment-area-bottom: 10px;
  /*
  STYLE
  */
  --font-family: Avenir Next, Helvetica, Geneva, Verdana, Arial, sans-serif;
  --highlight-chat-font-weight: 600;
  --author-font-weight: 700;
  --comment-font-weight: 600;
}

body {
  background-color: var(--keyer-bg-color);
}
yt-live-chat-app {
  margin-bottom: var(--comment-area-height);
  height: 100vh !important;
}
.btn-clear {
  position: absolute;
  z-index: 99999;
  bottom: calc(var(--comment-area-height) + 60px);
  right: 20px;
  font-size: 30px;
  border: 1px #bbb solid;
  border-radius: 4px;
  color: #fff;
  background: #444;
}
.highlighted-comment {
  background-color: var(--highlighted-comment-bg-color) !important;
}
html[dark] .highlighted-comment #message.yt-live-chat-text-message-renderer {
  color: black;
}
html[dark] .highlighted-comment:hover #message.yt-live-chat-text-message-renderer {
  color: white;
}
html[dark] .highlighted-comment #author-name.yt-live-chat-author-chip {
  color: #444;
}
html[dark] .highlighted-comment:hover #author-name.yt-live-chat-author-chip {
  color: #DDD;
}
yt-live-chat-text-message-renderer:hover {
  background-color: #eee !important;
}
html[dark] yt-live-chat-text-message-renderer:hover {
  background-color: #444 !important;
}
yt-live-chat-text-message-renderer.shown-comment {
  background-color: var(--shown-comment-bg-color) !important;
  opacity: 0.4;
}
.shown-comment:hover {
  opacity: 0.5;
}
highlight-chat {
  font-family: var(--font-family);
  font-weight: var(--highlight-chat-font-weight);
  box-sizing: border-box;
  display: block;
  position: absolute;
  bottom: var(--comment-area-bottom);
  left: calc(var(--comment-area-size-offset) * -1px);
  right: calc(var(--comment-area-size-offset) * -1px);
  width: auto;
  height: var(--comment-area-height);
  z-index:99999999999;
  overflow: hidden;
  margin: 0px;
  padding: 40px 50px 40px 220px;
  background-color: var(--keyer-bg-color);
  color: #fff;
  font-size: 30px;
  transform: scale(var(--comment-scale));
}
highlight-chat.preview {
  border: 1px #ccc solid;
}
.hl-c-cont {
  position: relative;
  padding: 20px;
  width: 100%;
  margin: 0 auto;
  transition: .5s all cubic-bezier(0.250, 0.250, 0.105, 1.2);
}
.hl-c-cont.fadeout {
  transform: translateY(600px);
}

.hl-name {
  position: absolute;
  top: -20px;
  left: 50px;
  font-weight: var(--author-font-weight);
  background: var(--author-bg-color);
  color: var(--author-color);
  padding: 10px;
  transform: rotate(-0deg);
  z-index: 1;
  border-radius: var(--author-border-radius);
  font-size: var(--author-font-size);
}
.hl-message {
  position: absolute;
  width: var(--comment-width);
  font-weight: var(--comment-font-weight);
  padding: var(--comment-padding);
  color: var(--comment-color);
  background-color: var(--comment-bg-color);
  border-radius: var(--comment-border-radius);
  font-size: var(--comment-font-size);
}
.hl-message img {
  width: 50px;
  vertical-align: middle;
}
.hl-message a {
  color: white;
}
.hl-img {
  position: absolute;
  top: 0;
  z-index: 1;
  left: -60px;
  width: var(--author-avatar-size);
  height: var(--author-avatar-size);
  background-color: var(--author-avatar-border-color);
  border-radius: 50%;
  border: 0;
  padding: var(--author-avatar-border-size);
}
.hl-img img {
  display: block;
  width: 100%;
  border-radius: 50%;
  z-index: 1;
}
/* overlay a very faint white layer to bump the blacks above the luma key cutoff */
.hl-img:after {
  content: '';
  display: block;
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
  border-radius: 50%;
  position:absolute;
  pointer-events: none;
  z-index: 3;
}
.hl-img::after {
  background: rgba(255,255,255,.04);
  mix-blend-mode: lighten;
}

.hl-badges {
display: inline-block;
margin-left: 10px;
}
.hl-badges img.yt-live-chat-author-badge-renderer {
width: 24px;
height: 24px;
}

.donation {
  position: absolute;
  display: block;
  text-align: center;
  left: 10px;
  top: 108px;
  z-index: 3;
  min-width: 128px;
  border-radius: 10px;
  padding: 30px 5px 0;
  overflow: hidden;
  background: linear-gradient(to right, var(--donation-gradient-stop0), var(--donation-gradient-stop1), var(--donation-gradient-stop2));
  color: var(--donation-color);
  transform: rotate(-5deg) translateX(-50%);
}
.membership {
  padding: 10px 10px 5px 10px;
}
.donation::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  font-size: 18px;
  text-align: center;
  background-color: rgba(0, 0, 0, 0.23);
  border-radius: 10px 10px 0 0;
  padding: 5px 0 0;
  display: block;
  content: var(--donation-label-text);
  color: var(--donation-label-color);
}
.membership::before {
  content: '';
}
.donation::after {
  content: '';
  position: absolute;
  top: -50%;
  left: 0;
  height: 200%;
  width: 1px;
  background-color: var(--donation-bg-color);
  box-shadow: 0 0 20px 20px var(--donation-shadow-color);
  opacity: 0.7;
  transform: rotate(9deg) translate3D(250px, 0, 0);
  animation: superchat 3s ease-in-out infinite;
}
@keyframes superchat {
  from {
      transform: rotate(9deg) translate3D(-250px, 0, 0);
  }
}

#tooltip.tp-yt-paper-tooltip {
  display: none;
}


/* hide chat input to give more space to the chat */
/*
#input-panel, yt-live-chat-viewer-engagement-message-renderer {
display: none !important;
}
*/

yt-live-chat-item-list-renderer {
margin-bottom: 20px;
}

yt-live-chat-text-message-renderer {
  font-size: 24px !important;
  line-height: 32px;
}


yt-live-chat-text-message-renderer,
yt-live-chat-paid-message-renderer,
yt-live-chat-membership-item-renderer {
  cursor: pointer;
}

yt-live-chat-text-message-renderer[is-deleted],
yt-live-chat-paid-message-renderer[is-deleted],
yt-live-chat-membership-item-renderer[is-deleted] {
  cursor: default;
}
