:root {
  --chat-style: row;

  --message-gap: 15px;
  --message-gap-bottom: 0;
  --message-background-color: transparent;

  --badge-size: 15px;
  --badge-spacing: 2px;

  --avatar-size: 80px;
  --avatar-gap: 16px;

  --emote-size: 16px;
  --emote-only-size: 32px;
  --emote-spacing: 2px;

  --font-size: 16px;
  --font-color: #fff;
  --font-family: 'Roboto', sans-serif;

  --roleBoradcaster: #ff0000;
  --roleModerator: #4dd200;
  --roleVip: #f100ed;
  --roleSubscriber: #aaa;
  --roleMe: #0012d5;
  --roleHighlight: #aaa;
  --roleReward: #535353;

  --time-size: 12px;
  --time-align: right;

  --animate-duration: .3s;
  --animate-delay: 0;
}


body {
  font-family: var(--font-family);
  margin: 0;
  padding: 0;
}

#settings_json {
  display: none;
}

#chat {
  --_message-gap: var(--message-gap);
  position: absolute;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: var(--_message-gap);
  margin: 0;
  padding: 0;
}

#chat.reverse {
  justify-content: flex-start;
}

#chat li {
  --_background-color: var(--message-background-color);
  --_font-color: var(--font-color);
  --_message-layout: var(--chat-style);
  --_avatar-gap: var(--avatar-gap, 0);
  display: flex;
  background-color: var(--_background-color);
  flex-direction: var(--_message-layout);
  justify-content: left;
  align-items: center;
  height: fit-content;
  width: fit-content;
  max-width: 100%;
  position: relative;
  gap: var(--_avatar-gap);
}

#chat.ticker {
  flex-direction: row;
  width: 100vw;
  right: 0;
}

#chat.ticker li {}



.avatar {
  aspect-ratio: 1/1;
}

.avatar img {
  --_avatar-size: var(--avatar-size);
  width: var(--avatar-size);
}

.badges>img,
.badges .platform {
  width: var(--badge-size);
  height: var(--badge-size);
  margin-left: var(--badge-spacing);
  display: inline-block;
  background-size: contain;
  background-repeat: no-repeat;
  padding: 0;
}

.badges .twitch {
  background-image: url("../images/platform/twitch.png");
}

.badges .youtube {
  background-image: url("../images/platform/youtube.png");
}

#chat .content {
  display: flex;
  text-overflow: ellipsis;
  overflow: hidden;
  line-height: 1em;
  align-items: start;
  gap: 5px;
  width: 100%;
}

#chat.ticker .content {
  width: max-content;
  max-width: 100vw;
  max-height: 2em;
}



/* User types */

.broadcaster {}

.moderator {}

.subcriber {}

.vip {}

.reply {}

.reward {}

.highlight {}

.me {}



/* Dev / Settings Page */

body.dev {
  background-color: #333333;
  color: #fff;
  display: flex;
  flex-direction: row;
  position: absolute;
  width: 100%;
}

.dev:has(ul.ticker) {
  flex-direction: column;
}

.dev .settings,
.dev #chat {}

/* Chat Styles */
.dev #chat {
  position: relative;
  padding: 1%;
  box-sizing: border-box;
  background-color: darkslategray;
  flex-basis: 100%;
}

.dev #chat.ticker {
  height: 200px;
  align-items: center;
}

/* Forms */

.settings {
  padding: 1%;
  flex-basis: 10%;
}

.settings form {
  display: flex;
  flex-direction: column;
  gap: 1rem;

}

.setting {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex-wrap: wrap;
  align-content: flex-start;
}

.setting h4 {
  width: 100%;
  margin: 0 0 10px 0;
}


.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
  margin-right: 1rem;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}


label.description {
  margin-top: 5px;
  color: gray;
  font-size: small;
}

/* The slider */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: .4s;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
}

input:checked+.slider {
  background-color: #2196F3;
}

input:focus+.slider {
  box-shadow: 0 0 1px #2196F3;
}

input:checked+.slider:before {
  -webkit-transform: translateX(26px);
  -ms-transform: translateX(26px);
  transform: translateX(26px);
}
