/* fonts */
$main-font: 'IBM Plex Sans', sans-serif;
$second-font: 'Helvetica Neue', Helvetica, Arial, sans-serif;
$mono-font: Consolas, 'Andale Mono WT', 'Andale Mono', 'Lucida Console',
  'Lucida Sans Typewriter', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono',
  'Liberation Mono', 'Nimbus Mono L', Monaco, 'Courier New', Courier, monospace;

$base-font-weight: 400;
$heavy-font-weight: 700;

/* colors */
$primary-color: magenta;
$secondary-color: #006cff;
$secondary-faded: #bcd8ff;

$dt-bg-team: #1d1f22;

$border-color: rgba(0, 0, 0, 0.08);

$black: black;
$white: white;
$grey: #f0f0f0;

/* miscellaneous */
$border-radius: 16px;
@import url('https://fonts.googleapis.com/css?family=IBM+Plex+Sans:400,400i,700,700i');

.str-chat {
  box-sizing: border-box;

  *,
  *::after,
  *::before {
    box-sizing: inherit;
    font-family: $second-font;
  }
}

.clearfix {
  clear: both;
}

.messenger-chat {
  &.str-chat {
    height: 100vh;
    font-family: $second-font;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    margin: 0;
    flex: 1 0 100%;

    .str-chat {
      &__container {
        flex: 1;
        height: 100%;
        display: flex;
        flex-direction: row;
      }

      &__main-panel {
        width: 100%;
        flex: 1;
        height: 100%;
        display: flex;
        flex-direction: column;
        padding: 20px 20px 0 10px;
      }
    }
  }
}

.str-chat {
  height: 100vh;
  font-family: $second-font;
  &.messaging,
  &.commerce {
    background-color: #f1f1f3;
    &.dark {
      background-color: #212326;
    }
  }
  &.team {
    &.dark {
      background: #212326;
    }
  }
  &.livestream {
    &.dark {
      background: #1a1a1a;
    }
  }
}

.str-chat-channel-list {
  float: left;
}

.str-chat-channel {
  max-height: 100vh;
  .str-chat__container {
    height: 100%;
    display: flex;
    .str-chat__main-panel {
      height: 100%;
      display: flex;
      flex-direction: column;
      flex: 1;
    }
  }
  &.messaging {
    .str-chat__main-panel {
      padding: 20px 10px 0 0px;
    }
    @media screen and (max-width: 960px) {
      .str-chat__main-panel {
        padding: 5px 5px 0;
      }
    }
  }
  &.team {
    .str-chat {
      &__container {
        display: flex;
      }
    }
  }
  &.commerce {
    .str-chat {
      &__main-panel {
        width: 100%;
      }
      &__container {
        background: rgba(255, 255, 255, 0.97);
      }
    }
    &.dark {
      .str-chat__container {
        background: rgba(29, 32, 36, 0.9);
        box-shadow: 0 10px 31px 0 rgba(0, 0, 0, 0.5);
      }
    }
  }
}

.str-chat.dark {
  .emoji-mart {
    background: #1a1a1a;
    border: lighten(#1a1a1a, 10%);
  }
  .emoji-mart-category-label span {
    background: lighten(#1a1a1a, 2%);
    color: white;
  }
  .emoji-mart-search {
    input {
      background: lighten(#1a1a1a, 2%);
      color: white;
    }
    button svg {
      fill: white;
    }
  }
}
../../../node_modules/react-file-utils/dist/index.css../../../node_modules/emoji-mart/css/emoji-mart.css.str-chat__actions-box {
  background: #fff;
  background-image: linear-gradient(
    -180deg,
    rgba(255, 255, 255, 0.02) 0%,
    rgba(0, 0, 0, 0.02) 100%
  );
  box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.22), 0 1px 0 0 rgba(0, 0, 0, 0.08),
    0 1px 8px 0 rgba(0, 0, 0, 0.05);
  border-radius: 7px;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  position: absolute;
  min-width: 150px;

  &--right {
    right: 0;
    top: calc(100% + 2px);
  }

  &--left {
    left: 0;
    top: calc(100% + 2px);
  }

  > button {
    text-align: left;
    width: 100%;
    border: none;
    margin: 0;
    padding: 10px;
    font-size: 12px;
    background: none;
    cursor: pointer;

    &:not(:last-of-type) {
      box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.08);
    }

    &:hover {
      color: #006cff;
    }
  }
}

.dark.str-chat {
  .str-chat__message-actions-box {
    background: #67686a;
    background-image: linear-gradient(
      -180deg,
      rgba(255, 255, 255, 0.02) 0%,
      rgba(0, 0, 0, 0.02) 100%
    );
    box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.22), 0 1px 0 0 rgba(0, 0, 0, 0.08),
      0 1px 8px 0 rgba(0, 0, 0, 0.05);
    button {
      color: white;
      &:hover {
        color: $secondary-color;
      }
    }
  }
}
.str-chat__message-attachment-actions {
  &-form {
    width: 100%;
    margin: 8px 0;
    padding: 0;
    display: flex;
  }

  &-button {
    flex: 1;
    border: none;
    background: none;
    margin: 0 4px;
    padding: 8px 8px;
    border-radius: 100px;
    outline: none;

    &:focus {
      border: 1px solid $secondary-color;
      box-shadow: 0 0 0 2px rgba(0, 108, 255, 0.36);
    }

    &--primary {
      background-color: $secondary-color;
      color: $white;
    }

    &--default {
      border: 2px solid $border-color;
    }
  }
}

.dark.str-chat {
  .str-chat__message-attachment-actions {
    &-button {
      color: white;
      &--default {
        border-color: rgba(white, 0.1);
      }
    }
  }
}
.str-chat__player-wrapper {
  position: relative;
  padding-top: 56.25%; /* Player ratio: 100 / (1280 / 720) */
  .react-player {
    position: absolute;
    top: 0;
    left: 0;
  }
}

/* border radius for attachments */
.str-chat__message .str-chat__player-wrapper .react-player {
  border-radius: 16px 16px 16px 0;
  overflow: hidden;
}

.str-chat__message--me .str-chat__player-wrapper .react-player {
  border-radius: 16px 16px 0 16px;
  overflow: hidden;
}

.str-chat__message {
  &-attachment {
    width: 100%;
    max-width: 375px;
    border-radius: 16px;
    margin: 8px auto 8px 0;
    padding: 0;
  }

  &--me {
    .str-chat__message-attachment {
      padding-left: 0;
      margin: 8px 0 8px auto;
    }
  }
}

.str-chat__message-team.thread-list {
  .str-chat__message-attachment {
    max-width: 200px;
  }
}

.str-chat__message-attachment {
  &:hover {
    background: transparent;
  }

  &--card {
    &--no-image {
      height: 60px;
    }

    &--actions {
      height: auto;
    }
  }

  &-file {
    width: 100%;

    &--item {
      /* border: 3px solid #f7f7f7; */

      /* border-radius: 4px; */
      position: relative;
      height: 50px;
      display: flex;
      align-items: center;
      font-size: 14px;
      line-height: 22px;
      border-left: 1px solid rgba(0, 0, 0, 0.1);
      width: auto;
      padding-left: 5px;

      &:hover {
        background: #f7f7f7;
      }

      img,
      svg {
        margin-right: 10px;
      }

      &-text {
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      a {
        font-weight: 700;
        color: rgb(0, 0, 0);
        opacity: 0.8;

        text-decoration: none;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 100%;

        &::after {
          content: '';
          position: absolute;
          top: 0;
          right: 0;
          bottom: 0;
          left: 0;
        }
      }

      span {
        line-height: 14px;
        font-size: 12px;
        font-weight: bold;
        text-transform: uppercase;
        display: block;
        color: rgb(0, 0, 0);
        opacity: 0.5;
      }
    }
  }

  &--image {
    height: auto;
    max-height: 300px;
    max-width: 100%;
    border-radius: 0;

    &:hover {
      background: transparent;
    }

    img {
      height: inherit;
      width: auto;
      max-height: inherit;
      max-width: 100%;
      display: block;
      object-fit: cover;
      overflow: hidden;

      &:hover {
        background: transparent;
      }
    }

    &--actions {
      height: 320px;

      img {
        height: calc(320px - 40px);
      }
    }
  }

  &--media {
  }

  &-card {
    min-height: 60px;
  }
}

.str-chat__message-attachment-card__giphy-logo {
  height: 20px;
  width: auto;
}

.messaging {
  &.str-chat {
    .str-chat {
      &__message-attachment {
        &.str-chat__message-attachment--image--actions {
          .str-chat__message-attachment--img {
            max-height: 254px;
          }
        }
      }
    }
  }
}

.livestream.str-chat {
  .str-chat {
    &__message-attachment {
      &.str-chat__message-attachment--file {
        max-width: 100%;
        .str-chat__message-attachment-file--item {
          border-left: none;
          &:hover {
            background: rgba(255, 255, 255, 0.29);
          }
        }
      }
    }
  }
  &.dark {
    .str-chat {
      &__message-attachment-file--item {
        a,
        span {
          color: white;
        }
        &:hover {
          background: transparent;
        }
      }
    }
  }
}
.str-chat__avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  margin-right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-transform: uppercase;
  overflow: hidden;

  &--circle {
    border-radius: 50%;
  }

  &--rounded {
    border-radius: 6px;
  }

  &--square {
    border-radius: 0;
  }

  &-image,
  &-fallback {
    display: block;
    width: inherit;
    height: inherit;
    object-fit: cover;
    text-align: center;
  }
  &-image--loaded {
    background-color: none;
  }
  &-fallback {
    background-color: $secondary-color;
  }
}

.str-chat__message {
  &--me {
    > .str-chat__avatar {
      order: 1;
      margin: 0;
      margin-left: 10px;
    }
  }
}

.str-chat__li {
  &--top,
  &--middle {
    .str-chat__message {
      > .str-chat__avatar {
        visibility: hidden;
      }
    }
  }
}
.str-chat__audio {
  &__wrapper {
    height: 80px;
    overflow: hidden;
    position: relative;
    border-radius: 6px;
    margin: 8px 0 0;
    display: flex;
    background: #f1f1f1;
  }

  &__image {
    height: 80px;
    width: 80px;
    position: relative;
    z-index: 20;

    &--overlay {
      width: inherit;
      height: inherit;
      position: absolute;
      top: 0;
      left: 0;
      background: rgba(black, 0.4);
      z-index: 30;
      font-size: 3em;
      color: rgba(white, 0.69);
      display: flex;
      align-items: center;
      justify-content: center;
      user-select: none;
    }

    &--button {
      margin: 0;
      padding: 0;
      display: flex;
      align-items: center;
      width: 40px;
      height: 40px;
      svg {
        fill: rgba(white, 0.69);
      }
    }

    img {
      z-index: 20;
      position: absolute;
      top: 0;
      left: 0;
      width: inherit;
      height: inherit;
      object-fit: cover;
    }
  }

  &__content {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    padding: 8px 16px;
    margin-left: 16px;
    width: 100%;

    &--title {
      // color: $fontColor;
      margin: 0;
      padding: 0;
      line-height: 1;
    }

    &--subtitle {
      margin: 0;
      padding: 0;
      line-height: 1;
      font-size: 12px;
      opacity: 0.49;
      // color: rgba($secondary-color, 0.69);
    }

    &--progress {
      height: 6px;
      width: 100%;
      border-radius: 4px;
      background: rgba(black, 0.1);
      padding: 1px;
      margin: 2px 0;

      > div {
        height: 4px;
        border-radius: 4px;
        width: 0%;
        background: $secondary-color;
        transition: width 0.5s linear;
      }
    }
  }
}

.str-chat.dark {
  .str-chat__audio {
    &__wrapper {
      background: #1a1a1a;
      color: white;
    }
    &__content {
      &--progress {
        background: rgba(white, 0.1);
      }
    }
  }
}
.str-chat__message-attachment-card {
  position: relative;
  background: $white;
  border-radius: $border-radius $border-radius $border-radius 0;
  overflow: hidden;
  font-size: 13px;
  border: 1px solid $border-color;
  margin: 32px 0 0 0;
  &--header {
    width: 100%;
    height: 175px;

    img {
      width: inherit;
      height: inherit;
      object-fit: cover;
    }
  }

  &--title {
    font-weight: 700;
    flex: 1;
  }

  &--flex {
    min-width: 0px;
    &,
    & > * {
      overflow: hidden;
      text-overflow: ellipsis;
    }
  }

  &--content {
    padding: 8px 16px;
    margin: -8px 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    > * {
      margin: 8px 0;
    }
  }

  &--url {
    text-decoration: none;
    display: block;
    color: $black;
    text-transform: uppercase;
    opacity: 0.5;

    &::after {
      content: '';
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
    }
  }
  &--giphy &--header {
    height: unset;
  }
}

.str-chat.commerce {
  .str-chat__message-attachment-card {
    max-width: 375px;
    width: 100%;
  }
}

.str-chat__message--me {
  .str-chat__message-attachment-card {
    background: $border-color;
    border: 1px solid transparent;
    border-radius: $border-radius $border-radius 0 $border-radius;
  }
}

.dark.str-chat {
  .str-chat__message-attachment-card__giphy-logo {
    filter: invert(100%);
  }
}
.str-chat__header {
  display: flex;
  padding: 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);

  &-thread {
    display: flex;
    padding: 10px;
    min-height: 70px;
    align-items: center;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: #fff;
    box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.07);
    font-size: 14px;

    &__back-button {
      padding: 10px 10px 10px 10px;
      border: 0;
      background: none;
      transform: rotate(180deg);
    }
  }

  &-livestream {
    padding: 10px 40px;
    min-height: 70px;
    display: flex;
    align-items: center;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: #fff;

    /* box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.07); */
    box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.14);

    &-left {
      font-size: 14px;

      &--title {
        font-weight: 700;
        margin: 0;
      }

      &--members {
        font-weight: 400;
        margin: 0;
      }

      &--livelabel {
        position: relative;
        left: 5px;
        font-size: 13px;
        text-transform: uppercase;
        color: red;
        display: inline-block;
        animation: pulse 2s infinite;

        &::before {
          content: '';
          position: relative;
          top: -2px;
          left: -4px;
          display: inline-block;
          width: 5px;
          height: 5px;
          border-radius: 100%;
          background-color: red;
        }

        @keyframes pulse {
          0% {
            opacity: 0.5;
          }

          50% {
            opacity: 1;
          }

          100% {
            opacity: 0.5;
          }
        }
      }

      flex: 1;
    }

    &-right {
      display: flex;
      margin: 0 -5px;

      &-button-wrapper {
        position: relative;
      }
    }
  }
}

.str-chat__header .str-chat__avatar {
  margin: 0 16px 0 0;
}

.str-chat__image {
}

.str-chat__title {
  font-weight: 600;
}

.str-chat__meta {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.str-chat__info {
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.4);
}

.str-chat__square-button {
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 3px;
  width: 30px;
  height: 30px;
  margin: 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  svg {
    fill: rgba(0, 0, 0, 0.8);
  }
  &:active {
    background-color: rgba(0, 0, 0, 0.1);
  }
}

.dark.str-chat {
  .str-chat__square-button {
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.69);
    border-radius: 3px;
    svg {
      fill: rgba(255, 255, 255, 0.7);
    }
  }
}

.messaging {
  &.str-chat {
    .str-chat {
      &__header-livestream {
        position: relative;
        z-index: 1;
        border-radius: 10px 10px 0 0;
        background: rgba(255, 255, 255, 0.9);
        box-shadow: none;
        box-shadow: 0 7px 9px 0 rgba(0, 0, 0, 0.03),
          0 1px 0 0 rgba(0, 0, 0, 0.03);
      }
      @media screen and (max-width: 960px) {
        &__header-livestream {
          padding-left: 20px;
          padding-right: 20px;
        }
      }
    }
    &.dark {
      .str-chat__header-livestream {
        background: rgba(46, 48, 51, 0.98);
        box-shadow: 0 7px 9px 0 rgba(0, 0, 0, 0.03),
          0 1px 0 0 rgba(0, 0, 0, 0.03);
        border-radius: 10px 10px 0 0;
        color: white;
      }
    }
  }
}

.livestream {
  &.str-chat {
    .str-chat {
      &__header-livestream {
        position: relative;
        z-index: 1;
        background: rgba(255, 255, 255, 0.29);
        box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1);
      }
    }
    &.dark {
      .str-chat__header-livestream {
        background: rgba(255, 255, 255, 0.03);
        box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.34);
        &-left {
          &--title,
          &--members {
            color: white;
          }
          &--title {
            font-size: 15px;
          }
        }
      }
    }
  }
}

.commerce {
  &.str-chat {
    .str-chat {
      &__header-livestream {
        background: rgba(255, 255, 255, 0.81);
        box-shadow: 0 7px 9px 0 rgba(0, 0, 0, 0.03),
          0 1px 0 0 rgba(0, 0, 0, 0.03);
        border-radius: 10px 10px 0 0;
        padding: 25px;
        &-left {
          &--title {
            font-size: 25px;
            margin: 0;
            line-height: 1;
            font-weight: 400;
          }
          &--subtitle {
            margin: 8px 0;
            font-size: 15px;
          }
          &--members {
            display: none;
          }
        }
        &-right {
          &-button {
            &--info {
              display: none;
            }
          }
        }
      }
    }
    &.dark {
      .str-chat__header-livestream {
        background: rgba(44, 47, 51, 0.81);
        box-shadow: 0 7px 9px 0 rgba(0, 0, 0, 0.03),
          0 1px 0 0 rgba(0, 0, 0, 0.03);
        border-radius: 10px 10px 0 0;
        color: rgba(#ffffff, 1);
      }
    }
  }
}

.team {
  &.str-chat {
    &.dark {
      .str-chat__header-livestream {
        background: rgba(38, 40, 43, 0.9);
        box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.26);
        &-left {
          color: white;
          &--title {
            font-size: 18px;
          }
          &--members {
            font-size: 13px;
          }
        }
      }
    }
  }
}
.str-chat__channel-list {
  /* min-height: 667px; */
  flex: 1;
  overflow-y: auto;
  max-width: 300px;
  background: #f2f3f5;
  box-shadow: 1px 0 0 0 rgba(0, 0, 0, 0.07);
  display: flex;
  flex-direction: column;

  &--channels {
    flex: 1;
  }

  .channel_preview {
    padding: 8px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }
}

.str-chat__button {
  background: #fff;
  box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.12), 0 1px 4px 0 rgba(0, 0, 0, 0.09);
  font-size: 14px;
  padding: 14px 70px;
  color: #006cff;
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100% - 10px);
  margin: 5px;
  border: 1px solid transparent;

  &:active,
  &:focus {
    outline: none;
    box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.12), 0 1px 4px 0 rgba(0, 0, 0, 0.09),
      0 0 0 2px rgba(0, 108, 255, 0.36);
    border: 1px solid $secondary-color;
  }

  > * {
    margin: 0 5px;
  }

  &--round {
    border-radius: 100px;
  }
}

.str-chat-channel-checkbox {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 100001;
  display: none;
}
.str-chat-channel-list-burger {
  width: 10px;
  height: 50px;
  background: white;
  border-radius: 0 4px 4px 0;
  padding: 3px;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.09);
  position: fixed;
  top: 10px;
  left: 0;
  z-index: 10000;

  justify-content: center;
  cursor: pointer;
  div {
    width: 4px;
    height: 100%;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.08);
  }
  display: none;
}

@media screen and (max-width: 960px) {
  .str-chat-channel-list-burger {
    display: flex;
  }

  .str-chat-channel-list {
    &.messaging,
    &.team,
    &.commerce {
      position: fixed;
      left: -380px;
      top: 0;
      z-index: 1001;
      min-height: 100vh;
      overflow-y: auto;
      box-shadow: 7px 0 9px 0 rgba(0, 0, 0, 0.03), 1px 0 0 0 rgba(0, 0, 0, 0.03);
      transition: left 200ms ease-in-out;
    }
  }

  .str-chat-channel-checkbox:checked {
    & ~ .str-chat-channel-list {
      &.messaging,
      &.team,
      &.commerce {
        left: 0px;
      }
    }
  }
}

.str-chat-channel-list {
  .str-chat__channel-list-messenger {
    padding: 0;
    &__main {
      padding: 20px 10px 0 10px;
      height: 100%;
      overflow-y: auto;
    }
  }
}
.str-chat__channel-list-messenger {
  padding: 20px 10px 0 10px;
  min-width: 300px;
  height: 100%;
}
.str-chat__channel-list-team {
  font-family: $second-font;
  display: flex;
  height: 100%;
  overflow-y: auto;
  &__sidebar {
    display: flex;
    flex-direction: column;
    width: 70px;
    padding: 45px 10px 10px;
    background: #dedfe2;

    &--top {
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      margin: -10px 0;

      > * {
        margin: 10px 0;
      }
    }

    &--bottom {
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: center;
    }
  }

  &__send-button,
  &__search-button {
    background: none;
    margin: none;
    border: none;
  }

  &__main {
    min-width: 230px;
    background: #f1f1f3;
  }

  &__header {
    padding: 15px 15px 15px 20px;
    max-height: 70px;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.01);
    box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.14);
    font-size: 14px;
    color: #000;
    letter-spacing: 0;
    position: relative;

    &--title {
      font-weight: 700;
      text-transform: capitalize;
    }

    &--status {
      position: relative;
      padding: 0 0 0 10px;

      &::before {
        position: absolute;
        top: 5px;
        left: 0;
        content: ' ';
        width: 6px;
        height: 6px;
        border-radius: 10px;
      }

      &.watcher_count::before {
        background: #28ca42;
      }

      &.busy::before {
        background: #28ca42;
      }

      &.away::before {
        background: #28ca42;
      }
    }

    &--left {
      width: 40px;
    }

    &--middle {
      flex: 1;
      margin-left: 15px;
    }

    &--button {
      margin: 0;
      padding: 15px 5px;
      border: 0;
      background: none;
    }
  }
}

.messenger-chat {
  &.str-chat {
    .str-chat {
      &__channel-list-team {
        padding: 0 0 0 10px;

        &__header {
          background: none;
          box-shadow: none;
        }

        &__main {
          background: none;
        }
      }
    }
  }
}

.dark.str-chat {
  .str-chat__channel-list-team {
    background: $dt-bg-team;

    &__header {
      &--title {
        color: white;
      }
    }
    &__sidebar {
      background: rgba(0, 0, 0, 0.2);
    }
    &__main {
      background: none;
    }
  }
}
.str-chat__channel-preview {
  button {
    position: relative;
    border: none;
    background: none;
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    padding: 10px 40px 10px 10px;
    font-size: 13px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    outline: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;

    &:focus {
      background: white;
      box-shadow: inset 0 0 0 1px $secondary-color,
        inset 0 0 0 2px rgba(0, 108, 255, 0.36);
    }
  }

  &-info {
    display: flex;
    flex-direction: column;
    text-align: left;
    padding: 0 10px;
    max-width: 250px;
  }

  &-avatar {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 18px;
  }

  &-title {
    color: black;
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  &-unread-count {
    position: absolute;
    right: 10px;
    width: 22px;
    height: 22px;
    color: black;
    font-size: 12px;
    background: lightgray;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
  }

  &-last-message {
    color: lighten($black, 50%);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
  }

  &--active {
    background: #006cff;
    color: white;

    .str-chat__channel-preview-title {
      color: $white;
    }

    .str-chat__channel-preview-last-message {
      color: rgba(255, 255, 255, 0.69);
    }
  }

  &--unread {
    position: relative;

    .str-chat__channel-preview-last-message {
      font-weight: 700;
      color: $black;
    }
  }

  &--dot {
    width: 5px;
    height: 5px;
    position: absolute;
    border-radius: 50%;
    left: 2px;
    background-color: $primary-color;
  }
}

.str-chat__channel-preview-compact {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  display: flex;
  font-size: 14px;
  letter-spacing: 0;
  line-height: 40px;
  color: black;
  position: relative;
  border: none;
  background: none;
  flex-direction: row;
  align-items: center;
  width: 100%;
  padding: 0 40px 0 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  text-align: left;
  outline: 0;

  &:focus {
    background: white;
    box-shadow: inset 0 0 0 1px $secondary-color,
      inset 0 0 0 2px rgba(0, 108, 255, 0.36);
  }

  &--left {
    width: 22px;
    height: 22px;
  }

  &--right {
    flex: 1;
    margin-left: 11px;
  }

  &--unread {
    font-weight: 700;
  }
}

.str-chat__channel-preview-compact--active {
  color: white;
  background: #004ab3;
}

.str-chat__channel-preview-messenger {
  display: flex;
  width: 100%;
  border: none;
  padding: 10px;
  align-items: center;
  background: rgba(255, 255, 255, 0);
  box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.07);
  text-align: left;
  margin: 5px 0;

  &--active {
    border: none;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: none;
    box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.07);
  }

  &--last-message {
    font-size: 13px;
    line-height: 14px;
    opacity: 0.5;
  }

  &--name {
    font-size: 14px;
    line-height: 17px;
    font-weight: 600;
    margin-bottom: 2px;
    max-width: 250px;
    span {
      display: block;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
    }
  }

  &--unread {
    .str-chat__channel-preview-messenger--last-message {
      opacity: 1;
      font-weight: 600;
    }
  }
}

.dark.str-chat {
  .str-chat__channel-preview {
    &--active {
      background: #132d50;
    }
    &-title {
      color: white;
    }
    button {
      &:focus {
        background: #132d50;
        box-shadow: inset 0 0 0 1px $secondary-color,
          inset 0 0 0 2px rgba(0, 108, 255, 0.36);
      }
    }
  }
  .str-chat__channel-preview-messenger {
    &--active {
      background: rgba(255, 255, 255, 0.06);
      box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.07);
    }
    &--last-message {
      color: rgba(white, 0.5);
    }
    &--name {
      color: rgba(white, 1);
    }
  }
}
.str-chat__channel-search {
  margin: 10px;
  margin-bottom: 30px;
  display: flex;
  align-items: center;

  input {
    flex: 1;
    background: rgba(0, 0, 0, 0.05);
    margin-right: 20px;
    border: 1px solid transparent;
    outline: none;
    $height: 30;

    height: $height + px;
    border-radius: $height/2 + px;
    color: $black;
    font-size: 14px;
    padding: 0 10px;

    &::placeholder {
      color: lighten($black, 50%);
    }

    &:focus {
      background: white;
      border: 1px solid $secondary-color;
      box-shadow: 0 0 0 2px rgba(0, 108, 255, 0.36);
    }
  }

  button {
    margin: 0;
    padding: 0 0 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 100%;
    box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.12), 0 1px 4px 0 rgba(0, 0, 0, 0.09);
    cursor: pointer;
    outline: 0;

    &:focus {
      background: white;
      border: 1px solid $secondary-color;
      box-shadow: 0 0 0 2px rgba(0, 108, 255, 0.36);
    }

    svg {
      fill: $secondary-color;
      transform: translateX(2px);
    }
  }
}

.dark.str-chat {
  .str-chat__channel-search {
    input {
      background: rgba(255, 255, 255, 0.04);
      color: white;
    }
    button {
      background: $secondary-color;
      svg {
        fill: white;
      }
    }
  }
}
.str-chat__down {
  display: flex;
  height: 100%;
  &-main {
    flex: 1;
    padding: 30px;
  }
}

.dark.str-chat {
  .str-chat__down {
    color: rgba(white, 0.87);
  }
}
.str-chat.messaging {
  .str-chat__event-component__channel-event {
    display: flex;
    margin-top: 20px;

    &__content {
      margin-right: 10px;
      color: rgba(0, 0, 0, 0.5);
      font-size: 15px;
    }
    &__sentence {
    }
    &__date {
      font-size: 11px;
      margin-top: 4px;
    }
  }
}

.str-chat.team {
  .str-chat__event-component__channel-event {
    display: flex;
    margin: 20px 40px;

    &__content {
      margin-right: 10px;
      color: rgba(0, 0, 0, 0.5);
      font-size: 15px;
    }
    &__sentence {
    }
    &__date {
      font-size: 11px;
      margin-top: 4px;
    }
  }
}

.str-chat.commerce,
.str-chat.livestream {
  .str-chat__event-component__channel-event {
    display: none;
  }
}
.str-chat__date-separator {
  display: flex;
  margin: 40px;
  align-items: center;

  &-date {
    font-size: 14px;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.7);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  }

  &-line {
    flex: 1;
    background-color: rgba(0, 0, 0, 0.1);
    height: 1px;
    border: none;
  }
  > * {
    &:not(:last-child) {
      margin-right: 20px;
    }
  }
}

.commerce.str-chat {
  .str-chat__date-separator {
    margin: 40px 0;
  }
}

.dark.str-chat {
  .str-chat__date-separator {
    &-line {
      background-color: rgba(255, 255, 255, 0.1);
    }
    &-date {
      color: rgba(255, 255, 255, 0.7);
    }
  }
  &.team {
    .str-chat__date-separator {
      &-line {
        background-color: rgba(0, 0, 0, 0.4);
      }
    }
  }
}
.str-chat__edit-message-form {
  width: 100%;

  form {
    position: relative;
    width: 100%;
  }

  textarea {
    padding: 7px;
    background: #fff;
    box-shadow: inset 0 0 0 1px #006cff;
    border: 1px solid transparent;
    resize: none;
    border-radius: 5px;
    width: 100%;
    font-size: 15px;
    line-height: 22px;

    /* color: $fontColor; */
    &:focus {
      box-shadow: inset 0 0 0 1px #006cff, 0 0 0 2px rgba(0, 108, 255, 0.36);
      outline: 0;
    }
  }

  button {
    background: none;
    border: none;

    /* font-size: $fontSize; */
    font-weight: 700;
    color: rgba(0, 0, 0, 0.4);

    &[type='submit'] {
      color: $secondary-color;
    }
  }

  .rfu-dropzone {
    width: 100%;
  }

  .rfu-file-upload-button,
  .str-chat__input-emojiselect,
  .str-chat__input-fileupload {
    position: unset;
    top: unset;
    right: unset;
    left: unset;
    svg {
      fill: black;
      opacity: 0.5;
    }
    &:hover {
      svg {
        opacity: 1;
      }
    }
  }
}

.str-chat__edit-message-form-options {
  display: flex;
}

.str-chat.dark {
  .str-chat__edit-message-form {
    .rfu-file-upload-button,
    .str-chat__input-emojiselect {
      svg {
        fill: white;
      }
    }
    button {
      color: rgba(255, 255, 255, 0.4);
      &[type='submit'] {
        color: $secondary-color;
      }
    }

    textarea {
      background: rgba(255, 255, 255, 0.05);
      box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.21);
      border: 2px solid transparent;
      border-radius: 6px;
      color: white;
      &:focus {
        box-shadow: inset 0 0 0 1px #006cff;
        border: 2px solid rgba(0, 108, 255, 0.36);
        border-radius: 6px;
      }
    }
  }
}
.str-chat__gallery {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  max-width: 304px;
  overflow: hidden;

  &-image {
    /* flex: 1; x */
    width: 150px;
    height: 150px;
    background: white;
    margin-bottom: 1px;
    margin-right: 1px;

    &:hover {
      cursor: -moz-zoom-in;
      cursor: -webkit-zoom-in;
      cursor: zoom-in;
    }

    img {
      width: inherit;
      height: inherit;
      object-fit: cover;
    }
  }
}

.livestream.str-chat,
.messaging.str-chat,
.commerce.str-chat,
.team.str-chat {
  .str-chat {
    &__gallery {
      margin: 5px 0;
      &-image {
        width: 150px;
        height: 150px;
      }
      &-placeholder {
        position: relative;
        width: 150px;
        height: 150px;
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: -moz-zoom-in;
        cursor: -webkit-zoom-in;
        cursor: zoom-in;
        p {
          position: relative;
          z-index: 1;
        }
        &:after {
          content: '';
          position: absolute;
          top: 0;
          left: 0;
          width: 100%;
          height: 100%;
          background-color: rgba(0, 0, 0, 0.69);
          z-index: 0;
        }
      }
    }
  }
}

.commerce.str-chat {
  .str-chat__gallery {
    width: calc(100% - 30px);
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 100px;

    &-image,
    &-placeholder {
      width: 100%;
      height: 100%;
    }
  }
  .str-chat__message-commerce {
    .str-chat__gallery {
      border-radius: $border-radius $border-radius $border-radius 2px;
    }
    &--right {
      .str-chat__gallery {
        border-radius: $border-radius $border-radius 2px $border-radius;
      }
    }
  }
}
.str-chat__loading-channels {
  width: 300px;
  height: 100%;
  padding: 20px;
  background: #fafafa;

  &-meta {
    flex: 1;
  }

  &-avatar,
  &-username,
  &-status {
    background-image: linear-gradient(-90deg, #f2f2f2 0%, #e5e5e5 100%);
  }

  &-username,
  &-status {
    border-radius: 2px;
    height: 14px;
  }

  &-avatar {
    width: 40px;
    height: 40px;
    border-radius: 100%;
    margin-right: 10px;
  }

  &-username {
    width: 40%;
    margin-bottom: 6px;
  }

  &-status {
    width: 80%;
  }

  &-item {
    display: flex;
    align-items: center;
    width: 100%;
    height: 40px;
    border-radius: 3px;
    margin-bottom: 10px;
    animation: pulsate 1s linear 0s infinite alternate;

    &:nth-of-type(2) {
      animation: pulsate 1s linear 0.3334 infinite alternate;
    }

    &:last-of-type {
      animation: pulsate 1s linear 0.6667s infinite alternate;
    }
  }
}

@keyframes pulsate {
  from {
    opacity: 0.5;
  }

  to {
    opacity: 1;
  }
}
.str-chat__loading-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: rotate 1s linear infinite;

  @-webkit-keyframes rotate {
    from {
      -webkit-transform: rotate(0deg);
      -o-transform: rotate(0deg);
      transform: rotate(0deg);
    }

    to {
      -webkit-transform: rotate(360deg);
      -o-transform: rotate(360deg);
      transform: rotate(360deg);
    }
  }

  @keyframes rotate {
    from {
      -ms-transform: rotate(0deg);
      -moz-transform: rotate(0deg);
      -webkit-transform: rotate(0deg);
      -o-transform: rotate(0deg);
      transform: rotate(0deg);
    }

    to {
      -ms-transform: rotate(360deg);
      -moz-transform: rotate(360deg);
      -webkit-transform: rotate(360deg);
      -o-transform: rotate(360deg);
      transform: rotate(360deg);
    }
  }
}
.str-chat {
  &.messaging {
    .str-chat__load-more-button {
      &__button {
        border: 0;
        width: 100%;
        height: 40px;
        border-radius: 9px;
        background: rgba(255, 255, 255, 0.9);
        box-shadow: none;
        box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.07);
        padding: 10px;
        font-size: 14px;
      }
    }
  }
  &.team {
    .str-chat__load-more-button {
      &__button {
        border: 0;
        background: transparent;
        width: 100%;
        height: 40px;
        padding: 10px;
        font-size: 14px;
      }
    }
  }
}
.str-chat__li {
  display: block;
  position: relative;

  /* group styling */
  &--top,
  &--single {
    margin: 20px 0 0;
    .str-chat__message {
      &-attachment--img,
      &-attachment-card,
      .str-chat__gallery {
        border-radius: $border-radius $border-radius $border-radius 2px;
      }

      &.str-chat__message--has-text.str-chat__message--has-attachment {
        .str-chat__message-attachment--img,
        .str-chat__message-attachment-card,
        .str-chat__gallery {
          border-radius: $border-radius $border-radius $border-radius 2px;
        }
      }

      &--me {
        .str-chat__message {
          &-attachment--img,
          &-attachment-card {
            border-radius: $border-radius $border-radius 2px $border-radius;
          }
        }
        &.str-chat__message--has-text.str-chat__message--has-attachment {
          .str-chat__message-attachment--img,
          .str-chat__message-attachment-card {
            border-radius: $border-radius $border-radius 2px $border-radius;
          }
        }
        .str-chat__gallery {
          border-radius: $border-radius $border-radius 2px $border-radius;
        }
        &.str-chat__message--has-text {
          .str-chat__gallery {
            border-radius: $border-radius $border-radius 2px $border-radius;
          }
        }
      }
    }
  }

  &--middle {
    margin: 0;

    .str-chat__message {
      &-attachment--img,
      &-attachment-card,
      .str-chat__gallery {
        border-radius: 2px $border-radius $border-radius 2px;
      }

      &.str-chat__message--has-text.str-chat__message--has-attachment {
        .str-chat__message-attachment--img,
        .str-chat__message-attachment-card,
        .str-chat__gallery {
          border-radius: 2px $border-radius $border-radius 2px;
        }
      }

      &--me {
        .str-chat__message {
          &-attachment--img,
          &-attachment-card,
          .str-chat__gallery {
            border-radius: $border-radius 2px 2px $border-radius;
          }
        }
        &.str-chat__message--has-text.str-chat__message--has-attachment {
          .str-chat__message-attachment--img,
          .str-chat__message-attachment-card,
          .str-chat__gallery {
            border-top-left-radius: 2px;
          }
        }
      }
    }
  }

  &--bottom {
    margin: 0 0 20px;
    .str-chat__message {
      &-attachment--img,
      &-attachment-card,
      .str-chat__gallery {
        border-radius: 2px $border-radius $border-radius 2px;
      }

      &.str-chat__message--has-text.str-chat__message--has-attachment {
        .str-chat__message-attachment--img,
        .str-chat__message-attachment-card,
        .str-chat__gallery {
          border-radius: 2px $border-radius $border-radius 2px;
        }
      }

      &--me {
        .str-chat__message {
          &-attachment--img,
          &-attachment-card,
          .str-chat__gallery {
            border-radius: $border-radius 2px 2px $border-radius;
          }
        }
        &.str-chat__message--has-text.str-chat__message--has-attachment {
          .str-chat__message-attachment--img,
          .str-chat__message-attachment-card,
          .str-chat__gallery {
            border-top-left-radius: 2px;
          }
        }
      }
    }
  }

  &--single {
    margin-bottom: 20px;
  }

  &--top,
  &--middle {
    .str-chat__message {
      &-data {
        display: none;
      }
    }
  }

  &--top {
    .str-chat__message {
      &-text {
        &-inner {
          border-radius: $border-radius $border-radius $border-radius 2px;
        }
      }

      &--me {
        .str-chat__message-text {
          &-inner {
            border-radius: $border-radius $border-radius 2px $border-radius;
          }
        }
      }
    }
  }

  &--single {
    .str-chat__message {
      &-text {
        &-inner {
          border-radius: $border-radius $border-radius $border-radius 2px;

          &--has-attachment {
            border-radius: 2px $border-radius $border-radius 2px;
          }
        }
      }

      &--me {
        .str-chat__message-text {
          &-inner {
            border-radius: $border-radius $border-radius 2px $border-radius;

            &--has-attachment {
              border-radius: $border-radius 2px 2px $border-radius;
            }
          }
        }
      }
    }
  }

  &--bottom,
  &--middle {
    .str-chat__message {
      &-text {
        &-inner {
          border-radius: 2px $border-radius $border-radius 2px;
        }
      }

      &--me {
        .str-chat__message-text {
          &-inner {
            border-radius: $border-radius 2px 2px $border-radius;
            &--has-attachment {
              margin: 0;
            }
          }
        }
        .str-chat__message-attachment-card {
          margin: 0;
          padding: 0;
          border-radius: $border-radius 2px 2px $border-radius;
        }
      }
    }
  }
}

.str-chat__message,
.str-chat__message-simple {
  display: inline-flex;
  justify-content: flex-start;
  align-items: flex-end;
  padding: 0 0 0 0;
  position: relative;
  margin: 1px 0;
  &--system {
    text-align: center;
    align-items: center;
    width: 100%;
    flex-direction: column;
    padding: 0 40px;
    margin: 40px 0;
    font-size: 10px;

    &__text {
      display: flex;
      align-items: center;
      width: 100%;
      p {
        margin: 0 25px;
        color: rgba(0, 0, 0, 0.5);
        text-transform: uppercase;
        font-weight: bold;
      }
    }
    &__line {
      flex: 1;
      height: 1px;
      width: 100%;
      background-color: rgba(0, 0, 0, 0.1);
    }
    &__date {
      margin-top: 3px;
      text-transform: uppercase;
      color: rgba(0, 0, 0, 0.5);
    }
  }
  &-inner {
    position: relative;

    @media screen and (min-width: 420px) {
      margin-right: 90px;
      margin-left: unset;
    }
    > .str-chat__message-simple__actions {
      position: absolute;
      top: 5px;
      left: 100%;
    }
  }
  &-attachment-container {
    display: flex;
    flex-direction: column;
  }
  &-text {
    display: inline-flex;
    justify-content: flex-start;
    padding: 0 0 0 0;
    position: relative;

    &-inner {
      position: relative;
      flex: 1;
      display: block;
      min-height: 32px;
      padding: 5px 10px;
      font-size: 15px; /* variables */
      color: black; /* variables */
      border-radius: $border-radius $border-radius $border-radius 0;
      background: #fff;
      border: 1px solid $border-color;

      margin-left: 0; /* set spacing when unfocused */

      p {
        /* Make sure really long urls and words don't break out.
        ** https://css-tricks.com/snippets/css/prevent-long-urls-from-breaking-out-of-container/ */
        overflow-wrap: break-word;
        word-wrap: break-word;

        /* Adds a hyphen where the word breaks, if supported (No Blink) */
        -ms-hyphens: auto;
        -moz-hyphens: auto;
        -webkit-hyphens: auto;
        hyphens: auto;
      }

      /* if text consists is focused */
      &--focused {
        background: $secondary-faded;
        border: 1px solid $secondary-color;
        margin-right: 0;
        margin-left: 0; /* set spacing when focused */
      }

      &--has-attachment {
        border-radius: 2px $border-radius $border-radius 2px;
      }

      /* if text consists of just one emoji */
      &--is-emoji {
        background: transparent;
        border: 1px solid transparent;
        font-size: 32px;

        padding-left: 0;
        padding-right: 0;
      }
    }
  }

  &-attachment {
    &--img {
      width: 100%;
      max-width: 480px;
      display: block;
      height: inherit;
      cursor: -moz-zoom-in;
      cursor: -webkit-zoom-in;
      cursor: zoom-in;
    }
  }

  &-data {
    margin-top: 5px;
    width: 100%;
    font-size: 11px;
    color: rgba(0, 0, 0, 0.5);
  }

  &-name {
    font-weight: $heavy-font-weight;
    margin-right: 5px;
  }

  p {
    margin: 0;
    white-space: pre-line;
    line-height: 20px;
    &:not(:first-of-type) {
      margin: 16px 0 0;
    }
  }

  /* me */
  &--me {
    display: flex;
    margin: 4px 0;
    justify-content: flex-end;

    .str-chat__message {
      &-text {
        display: flex;
        justify-content: flex-end;
      }

      &-attachment-container {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
      }

      &-inner {
        justify-content: flex-end;
        align-items: flex-end;
        @media screen and (min-width: 420px) {
          margin-right: unset;
          margin-left: 90px;
        }
        > .str-chat__message-simple__actions {
          position: absolute;
          top: 5px;
          left: unset;
          right: 100%;
        }
      }

      &-text-inner {
        flex: initial;
        background: #ebebeb;
        border-color: transparent;
        text-align: right;
        border-radius: $border-radius $border-radius 2px $border-radius;
        margin-right: 0; /* set spacing when unfocused */
        &--focused {
          background: $secondary-faded;
          border: 1px solid $secondary-color;
          margin-left: 0;
          margin-right: 0; /* set spacing when focused */
        }

        &--has-attachment {
          border-radius: $border-radius 2px 2px $border-radius;
        }

        &--is-emoji {
          background: transparent;
          border: 1px solid transparent;
          font-size: 32px;
          padding-left: 0;
          padding-right: 0;

          p {
            line-height: 48px;
          }
        }
      }

      &-attachment {
        &--img {
          width: 100%;
          max-width: 480px;
          display: block;
          height: inherit;
          object-fit: cover;
          border: none;
        }
      }

      &-data {
        text-align: right;
      }
    }
  }

  &--with-reactions {
    margin-top: 30px;
  }

  &-link {
    color: $primary-color;
    font-weight: $heavy-font-weight;
    text-decoration: none;
  }

  &-mention {
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    font-size: 16px;
    color: $primary-color;
    font-weight: $heavy-font-weight;
  }

  &--inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  /* deleted messages */
  &--deleted {
    margin: 0 0 0 42px;
    flex-direction: column;
    align-items: flex-start;
    &-inner {
      background: rgba(#fff, 0.1);
      padding: 8px 16px;
      border-radius: $border-radius;
      font-size: 12px;
      color: darken($grey, 30%);
    }
  }

  &--me {
    &.str-chat__message--deleted {
      margin: 0 42px 0 0;
      align-items: flex-end;
      &-inner {
        background: rgba(#fff, 0.1);
        padding: 8px 16px;
        border-radius: $border-radius;
        font-size: 12px;
        color: darken($grey, 30%);
      }
    }
  }

  /* error messages */
  &--error,
  &--failed {
    margin: 0 0 32px 42px;
    font-size: 12px;
    padding: 4px 0;

    .str-chat__message-text-inner {
      background: rgba(208, 2, 27, 0.1);
      border: 1px solid rgba(208, 2, 27, 0.1);
    }
  }

  &--me {
    &.str-chat__message--error,
    &.str-chat__message--failed {
      border-left: initial;
      margin-right: 42px;
    }
  }

  .str-chat__message-attachment-file--item:hover {
    background: transparent;
  }
}

.messaging {
  &.str-chat {
    .str-chat {
      &__message,
      &__message--me {
        margin: 1px 0;
        &--with-reactions {
          margin-top: 30px;
        }
      }

      &__message-attachment--image {
        margin: 1px 0;

        max-width: 480px;
      }
      &__message-attachment--card {
        margin: 1px 0;
        line-height: normal;
      }
      &__message-attachment-card {
        margin: 1px auto;
        line-height: normal;
        &--title {
          color: $secondary-color;
        }
        &--text {
          display: none;
        }
        &--url {
          text-transform: lowercase;
        }
      }
      &__message--deleted {
        margin: 0 42px;
      }

      &__li {
        &--middle {
          .str-chat__message {
            .str-chat__message-attachment--card,
            .str-chat__message-attachment--image {
              border-top-left-radius: 2px;
            }
          }
        }
      } /* __li*/
    }
  }
}

.str-chat {
  &__message-simple {
    font-family: $second-font;
    &__actions {
      display: flex;
      margin-top: 5px;
      align-items: flex-start;
      justify-content: flex-start;
      min-width: 90px;

      &__action {
        margin: 5px;
        display: flex;
        align-items: center;
        height: 10px;
        cursor: pointer;
        svg {
          fill: #000;
          opacity: 0.5;
        }
        &:hover {
          svg {
            opacity: 1;
          }
        }
        &--thread,
        &--reactions {
          display: none;
        }
        &--options {
          position: relative;
          display: none;
        }
      }
    }
    &.str-chat__message--with-reactions {
      .str-chat__message-simple__actions__action--reactions {
        display: flex;
      }
    }
    &:hover {
      .str-chat__message-simple__actions__action--thread {
        display: flex;
      }
      .str-chat__message-simple__actions__action--reactions {
        display: flex;
      }
    }

    &-text {
      display: flex;
      justify-content: flex-end;
      padding: 0 0 0 0;
      position: relative;
    }

    &-text-inner {
      text-align: left;
      max-width: 460px;

      &.str-chat__message-simple-text-inner--is-emoji {
        margin: 5px 0;
        background: transparent;
        p {
          line-height: 48px;
        }
      }

      p {
        text-align: left;
      }
      a {
        color: $secondary-color;
        font-weight: 700;
        text-decoration: none;
      }
      blockquote {
        margin: 0 0 0 5px;
        font-style: italic;
        padding-left: 20px;
        position: relative;

        &::before {
          font-size: 25px;
          content: '\201C';
          font-style: italic;
          position: absolute;
          opacity: 0.5;
          top: 2px;
          left: -5px;
        }
      }
    }

    &--me {
      .str-chat__message-simple-reply-button {
        display: flex;
        justify-content: flex-end;
        .str-chat__message-replies-count-button {
          display: flex;
          flex-direction: row-reverse;
          svg {
            transform: scaleX(-1);
            margin-left: 5px;
            margin-bottom: 4px;
            margin-right: 0;
          }
        }
      }

      .str-chat__message-simple__actions {
        justify-content: flex-end;
      }

      .str-chat__message-attachment--image {
        max-width: 460px;
      }

      &-text-inner {
        &--is-emoji {
          background-color: transparent;
          line-height: 32px;
        }
      }
      .str-chat__message-simple__actions {
        order: -1;
      }
    }
    &:hover {
      .str-chat__message-simple__actions__action--options {
        display: flex;
      }
      .str-chat__message-simple__actions__action--reactions {
        display: flex;
      }
      .str-chat__message-simple__actions__action--thread {
        display: flex;
      }
    }
  }
}

.str-chat__simple-message--error-message {
  text-align: left;
  text-transform: uppercase;
  font-size: 11px;
  opacity: 0.5;
}

.str-chat__message-simple-status {
  margin: 10px 0px 10px 10px;
  order: 3;
  position: absolute;
  left: 100%;
  bottom: 0;
  line-height: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  z-index: 1;
  &-number {
    font-size: 10px;
    margin-left: 4px;
    position: absolute;
    left: 100%;
    color: rgba(0, 0, 0, 0.6);
  }

  > .str-chat__avatar {
    align-self: flex-end;
    margin-right: 0;
  }

  > .str-chat__tooltip {
    display: none;
    max-width: 300px;
    min-width: 100px;
    text-align: center;
  }

  &:hover {
    > .str-chat__tooltip {
      display: block;
    }
  }

  &::after {
    position: absolute;
    bottom: 100%;
    right: 0;
    content: ' ';
    width: 15px;
    height: 15px;
  }
}

.str-chat__message-simple {
  .str-chat__message-attachment-card {
    margin: 0;
    border-radius: 4px $border-radius 4px 4px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);

    &--content {
      background: #ebebeb;
    }

    &--text {
      display: none;
    }
  }
  .str-chat__message-attachment--file {
    margin: 0;
    background: white;
    border-color: transparent;
    border: 1px solid #ebebeb;
    border-radius: 0;
    .str-chat__message-attachment-file--item {
      border-color: transparent;
      padding: 0 10px;
    }
    &:first-of-type {
      border-radius: $border-radius $border-radius 0 0;
      border-bottom: transparent;
    }
    &:last-of-type {
      border-top-color: transparent;
      border-radius: 0 0 $border-radius 2px;
      &:first-of-type {
        border-bottom: 1px solid #ebebeb;
        border-top: 1px solid #ebebeb;
        border-radius: $border-radius $border-radius $border-radius 2px;
      }
    }
  }
  .str-chat__message-attachment-file--item {
    border-radius: 0;
  }
  &--me {
    .str-chat__message-attachment-card {
      border-radius: $border-radius 4px 4px 4px;
    }
    .str-chat__message-attachment--file {
      background: #ebebeb;
      &:last-of-type {
        border-radius: 0 0 2px $border-radius;

        &:first-of-type {
          border-radius: $border-radius $border-radius 2px $border-radius;
        }
      }
    }
  }
}

.str-chat__list--thread {
  .str-chat__message-simple {
    &__actions {
      width: 30px;
    }
    &__actions__action--options {
      .str-chat__message-actions-box {
        right: unset;
        left: 100%;
        border-radius: $border-radius $border-radius $border-radius 2px;
      }
    }
  }
}

.livestream.str-chat {
  .str-chat {
    &__li {
      &--single {
        margin: 0px 0;
      }
    }
  }
}

@media screen and (max-width: 960px) {
  .str-chat__message-simple-text-inner {
    max-width: 218px;
  }
  .str-chat__message-simple-status {
    left: unset;
    right: 8px;
    bottom: 30px;
  }
}

.dark.str-chat {
  .str-chat__message-simple {
    &-text-inner {
      background: rgba(white, 0.05);
      color: white;
      &--is-emoji {
        background: transparent;
      }
    }
    &__actions {
      svg {
        fill: white;
      }
    }
    &-data {
      color: white;
      opacity: 0.5;
    }

    .str-chat__message-attachment-card {
      background: transparent;
      &--content {
        background: rgba(white, 0.05);
      }
      &--url {
        color: rgba(white, 0.5);
      }
    }

    .str-chat__message-attachment--file {
      border-color: transparent;
      background: rgba(white, 0.05);

      a,
      span {
        color: white;
      }
      span {
        opacity: 0.5;
      }
    }

    .str-chat__message-simple-status {
      &-number {
        color: rgba(255, 255, 255, 0.6);
      }
    }

    &--me {
      .str-chat__message-simple {
        &-text-inner {
          background: rgba(black, 0.2);
          &--is-emoji {
            background: transparent;
          }
        }
        .str-chat__message-attachment-card {
          &--content {
            background: rgba(black, 0.2);
          }
        }
        .str-chat__message-attachment--file {
          background: rgba(0, 0, 0, 0.2);
        }
      }
    }
  }
}

.dark.str-chat {
  .str-chat__message-simple__actions__action--options .str-chat__actions-box {
    background: #67686a;
    box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.22), 0 1px 0 0 rgba(0, 0, 0, 0.08),
      0 1px 8px 0 rgba(0, 0, 0, 0.05);
  }
  .str-chat__message {
    &--error,
    &--failed {
      .str-chat__message-simple-text-inner {
        background: rgba(208, 2, 27, 0.1);
        border: 1px solid rgba(208, 2, 27, 0.1);
      }
    }
  }
}

.str-chat__message {
  .str-chat__message-simple__actions__action--options {
    .str-chat__message-actions-box {
      left: 100%;
      right: unset;
      &--reverse {
        right: 100%;
        left: unset;
        border-radius: $border-radius $border-radius 2px $border-radius;
      }
    }
    .str-chat__message-actions-box--mine {
      right: 100%;
      left: unset;
      border-radius: $border-radius $border-radius 2px $border-radius;
      &.str-chat__message-actions-box--reverse {
        left: 100%;
        right: unset;
        border-radius: $border-radius $border-radius $border-radius 2px;
      }
    }
  }
}

@media screen and (max-width: 375px) {
  .str-chat__message .str-chat__message-attachment--img {
    max-width: 235px;
  }
}

@media screen and (max-width: 414px) {
  .str-chat__message .str-chat__message-attachment--img {
    max-width: 274px;
  }
}
@media only screen and (device-width: 375px) and (-webkit-device-pixel-ratio: 3) {
  .str-chat__message .str-chat__message-attachment--img {
    max-width: 240px;
  }
}
.str-chat__message-actions-box {
  position: absolute;
  display: none;
  bottom: 20px;
  left: 40px;
  width: 120px;
  border-radius: 16px 16px 16px 0;
  background: #fff;
  background-image: linear-gradient(
    -180deg,
    rgba(255, 255, 255, 0.02) 0%,
    rgba(0, 0, 0, 0.02) 100%
  );
  box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.22), 0 1px 0 0 rgba(0, 0, 0, 0.08),
    0 1px 8px 0 rgba(0, 0, 0, 0.05);
  z-index: 999;
}

.str-chat__message-actions-box--open {
  display: block;
}

.str-chat__message-actions-list {
  height: 100%;
  margin: 0;
  padding: 0;
  list-style-type: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.str-chat__message-actions-list-item {
  padding: 8px 10px;
  width: 100%;
  margin: 0;
}

.str-chat__message-actions-list button {
  background: none;
  text-align: left;
  outline: none;
  border: none;
  cursor: pointer;
  display: block;
  width: 100%;
  font-size: 12px;
  color: black;
  text-decoration: none;
}

.str-chat__message-actions-list button:hover {
  color: $secondary-color;
}

.str-chat__message-actions-list button:not(:last-of-type) {
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.str-chat__message-actions {
  position: relative;
  align-self: flex-start;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin: 5px 10px;
  cursor: pointer;
}

.str-chat__message-actions {
  order: 2;
}

.str-chat__message--me .str-chat__message-actions {
  order: -1;
}

.str-chat__message-actions-reactions,
.str-chat__message-actions-options {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
}

.str-chat__message-actions-reactions,
.str-chat__message-actions-options svg {
  fill: grey;
  position: relative;
}

.str-chat__message-actions-reactions:hover,
.str-chat__message-actions-options:hover svg {
  fill: $primary-color;
}

.str-chat__message-reactions-box {
  position: absolute;
  visibility: hidden;
  bottom: 30px;
  left: -20px;
  background: rgba(0, 0, 0, 0.81);
  background-image: linear-gradient(
    -180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.5) 100%
  );
  border-radius: 50px;
  padding: 16px;
  z-index: 100;
}

.str-chat__message-reactions-box--open {
  visibility: visible;
}

.str-chat__message-reactions-box::after {
  top: 97%;
  left: 30px;
  content: url('data:image/svg+xml; utf8, <svg width="36" height="19" viewBox="0 0 36 19" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="b"><stop stop-opacity="0" offset="0%"/><stop stop-opacity=".5" offset="100%"/></linearGradient><path d="M35.284.378A15.125 15.125 0 0 0 22.81 6.946L14.55 19a14.422 14.422 0 0 0-2.223-12.786A14.456 14.456 0 0 0 .723.378h34.561z" id="a"/></defs><g fill-rule="nonzero" fill="none"><use fill="%231E1E1E" xlink:href="%23a"/><use fill="url(%23b)" xlink:href="%23a"/></g></svg>');
  position: absolute;
  z-index: 99;
}
.str-chat__message-commerce {
  display: flex; /* inline-flex if you don't want the  */
  justify-content: flex-start;
  align-items: flex-end;
  padding: 0 0 0 0;
  position: relative;
  margin: 1px 0;
  &-inner {
    position: relative;
    /* flex: 1 if you want the messagebubbles to be the same width- */
    > .str-chat__message-commerce__actions {
      min-height: 10px;
      min-width: 30px;
      float: right;
      .str-chat__reaction-list {
        left: unset;
        right: 46px;
      }
    }
  }

  .str-chat__avatar {
    margin-right: 8px;
  }

  .str-chat__message-attachment {
    &-card {
      &--content {
        margin: 0;
        padding: 6px 8px;
      }
    }
  }

  &--top,
  &--middle {
    margin-left: 40px;

    .str-chat__message-commerce {
      &-data {
        display: none;
      }
    }
  }

  &--top {
    .str-chat__message-commerce {
      &-text {
        &-inner {
          border-radius: 16px 16px 4px 4px;
        }
      }
    }
  }

  &--bottom {
    .str-chat__message-commerce {
      &-text {
        &-inner {
          border-radius: 4px 4px 16px 0;
        }
      }
    }
  }

  &--single {
    .str-chat__message-commerce {
      &-text {
        &-inner {
          border-radius: 16px 16px 16px 0;
          &--has-attachment {
            border-radius: 4px 4px 16px 0;
          }
        }
      }
    }
  }

  &--middle {
    .str-chat__message-commerce {
      &-text {
        &-inner {
          border-radius: 4px 4px 4px 4px;
        }
      }
    }
  }

  &-text {
    display: flex;

    padding: 0 0 0 0;
    position: relative;

    &-inner {
      position: relative;
      display: block;
      min-height: 32px;
      padding: 5px 10px;
      font-size: 15px; /* variables */
      color: black; /* variables */
      border-radius: $border-radius $border-radius $border-radius 0;
      background: #fff;
      border: 1px solid $border-color;

      margin-left: 0;
      max-width: 345px;
      p {
        margin: 0;
        white-space: pre-line;
        &:not(:first-of-type) {
          margin: 16px 0 0;
        }

        /* These are technically the same, but use both */
        overflow-wrap: break-word;
        word-wrap: break-word;
        -ms-word-break: break-all;
        /* Instead use this non-standard one: */
        word-break: break-word;

        /* Adds a hyphen where the word breaks, if supported (No Blink) */
        -ms-hyphens: auto;
        -moz-hyphens: auto;
        -webkit-hyphens: auto;
        hyphens: auto;
      }

      &--has-attachment {
        border-radius: 2px $border-radius $border-radius 2px;
      }

      &--is-emoji {
        background: transparent;
        border: 1px solid transparent;
        font-size: 32px;
        line-height: 48px;
        padding-left: 0;
        padding-right: 0;
      }
    }
  }

  &-attachment {
    &--img {
      width: 100%;
      max-width: 480px;
      display: block;
      height: inherit;
      cursor: -moz-zoom-in;
      cursor: -webkit-zoom-in;
      cursor: zoom-in;
    }
  }

  &-data {
    margin-top: 5px;
    width: 100%;
    font-size: 11px;
    color: rgba(0, 0, 0, 0.5);
  }

  &-name {
    font-weight: $heavy-font-weight;
    margin-right: 5px;
  }

  p {
    margin: 0;
    line-height: 20px;
  }

  &--with-reactions {
    margin-top: 30px;
    .str-chat__message-commerce__actions__action--reactions {
      display: flex;
    }
  }

  &-link {
    color: $primary-color;
    font-weight: $heavy-font-weight;
    text-decoration: none;
  }

  &-mention {
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    font-size: 16px;
    color: $primary-color;
    font-weight: $heavy-font-weight;
  }

  &--inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  /* deleted messages */
  &--deleted {
    background: $grey;
    float: left;
    padding: 8px 16px;
    border-radius: $border-radius;
    font-size: 12px;
    color: darken($grey, 30%);
    margin: 0 0 0 42px;
  }

  /* error messages */
  &--error {
    margin: 0 0 32px 0;
    font-size: 12px;

    .str-chat__message-text-inner {
      background: rgba(208, 2, 27, 0.1);
      border: 1px solid rgba(208, 2, 27, 0.1);
    }
  }

  &--right {
    &.str-chat__message-commerce {
      justify-content: flex-end;
      margin-left: 0;
      .str-chat__message-commerce__actions {
        justify-content: flex-end;
      }
      .str-chat__message-commerce {
        &-inner {
          > .str-chat__message-commerce__actions {
            float: left;
            .str-chat__reaction-list {
              left: 46px;
            }
          }
          > .str-chat__message-commerce-reply-button {
            display: flex;
            justify-content: flex-end;
            .str-chat__message-replies-count-button {
              display: flex;
              flex-direction: row-reverse;
              svg {
                transform: scaleX(-1);
                margin-left: 5px;
                margin-bottom: 4px;
                margin-right: 0;
              }
            }
          }
        }
      }

      .str-chat__message-commerce-text-inner {
        background: #ebebeb;
        border-width: 0px;
        margin-top: 2px;
        border-color: transparent;
        p {
          text-align: right;
        }
      }
      > .str-chat__avatar {
        display: none;
      }

      .str-chat__message-attachment {
        margin: 0 auto 0 30px;
        &--img {
          border-radius: $border-radius $border-radius 2px $border-radius;
        }
      }
      .str-chat__message-attachment-card {
        border-radius: 16px 16px 4px 16px;
      }

      &--bottom,
      &--single {
        margin-right: 0;
      }
      &--single {
        .str-chat__message-commerce {
          &-text {
            &-inner {
              border-radius: 16px 16px 4px 16px;
              &--has-attachment {
                border-radius: 16px 4px 4px 16px;
              }
            }
          }
        }
      }
      &--bottom {
        .str-chat__message-commerce {
          &-text {
            &-inner {
              border-radius: 4px 4px 4px 16px;
            }
          }
        }
      }
      .str-chat__avatar {
        order: 1;
      }
      .str-chat__message-commerce-text {
        flex-direction: row-reverse;
        justify-content: flex-start;
        &-inner {
          flex: unset;
        }
      }
      .str-chat__message-commerce-data {
        text-align: right;
      }
    }
  }

  &--has-text {
    .str-chat__message-commerce {
      &-inner {
        .str-chat__message-attachment {
          width: 100%;
          height: auto;
          margin: 4px auto;
        }
      }
    }
  }
}

.str-chat {
  &__message-commerce {
    font-family: $second-font;
    &__actions {
      display: flex;
      margin-top: 5px;
      align-items: flex-start;
      justify-content: flex-start;
      min-width: 30px;

      &__action {
        margin: 5px;
        display: flex;
        align-items: center;
        height: 10px;
        cursor: pointer;
        svg {
          fill: #000;
          opacity: 0.5;
        }
        &:hover {
          svg {
            opacity: 1;
          }
        }
        &--thread,
        &--reactions {
          display: none;
        }
        &--options {
          position: relative;
          display: none;
          .str-chat__message-actions-box {
            bottom: 10px;
            left: unset;
            right: 100%;
            width: 120px;
            border-radius: 16px 16px 2px 16px;
          }
        }
      }
    }
    &.str-chat__message--with-reactions {
      .str-chat__message-commerce__actions__action--reactions {
        display: flex;
      }
    }
    &:hover {
      .str-chat__message-commerce__actions__action--thread {
        display: flex;
      }
      .str-chat__message-commerce__actions__action--reactions {
        display: flex;
      }
    }

    &-text {
      display: flex;
      padding: 0 0 0 0;
      position: relative;
    }

    &-text-inner {
      text-align: left;

      &.str-chat__message-commerce-text-inner--is-emoji {
        margin: 5px 0;
        background: transparent;
      }

      p {
        text-align: left;
      }
      a {
        color: $secondary-color;
        font-weight: 700;
        text-decoration: none;
      }
      blockquote {
        margin: 0 0 0 5px;
        font-style: italic;
        padding-left: 20px;
        position: relative;

        &::before {
          font-size: 25px;
          content: '\201C';
          font-style: italic;
          position: absolute;
          opacity: 0.5;
          top: 2px;
          left: -5px;
        }
      }
    }

    &:hover {
      .str-chat__message-commerce__actions__action--options {
        display: flex;
      }
      .str-chat__message-commerce__actions__action--reactions {
        display: flex;
      }
      .str-chat__message-commerce__actions__action--thread {
        display: flex;
      }
    }
  }
}

.str-chat__commerce-message--error-message {
  text-align: left;
  text-transform: uppercase;
  font-size: 11px;
  opacity: 0.5;
}

.str-chat__message-commerce-status {
  margin: 10px 0px 10px 10px;
  order: 3;
  position: absolute;
  left: 100%;
  bottom: 0;
  line-height: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  z-index: 11;
  &-number {
    font-size: 10px;
    margin-left: 4px;
    position: absolute;
    left: 100%;
    color: rgba(0, 0, 0, 0.6);
  }

  > .str-chat__avatar {
    align-self: flex-end;
    margin-right: 0;
  }

  > .str-chat__tooltip {
    display: none;
    max-width: 300px;
    min-width: 100px;
    text-align: center;
  }

  &:hover {
    > .str-chat__tooltip {
      display: block;
    }
  }

  &::after {
    position: absolute;
    bottom: 100%;
    right: 0;
    content: ' ';
    width: 15px;
    height: 15px;
  }
}

.str-chat__message-commerce {
  .str-chat__message-attachment {
    width: calc(100% - 30px);
    max-width: unset;
    border-radius: unset;
    margin: 0 auto 0 0;
  }
  .str-chat__message-attachment-card {
    margin: 0;
    border-radius: 4px $border-radius 4px 4px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);

    &--content {
      background: #ebebeb;
    }

    &--text {
      display: none;
    }
  }
}

.str-chat__list--thread {
  .str-chat__message-commerce {
    &__actions {
      width: 30px;
    }
    &__actions__action--options {
      .str-chat__message-actions-box {
        right: unset;
        left: 100%;
        border-radius: $border-radius $border-radius $border-radius 2px;
      }
    }
  }
}

.str-chat.dark {
  .str-chat__message-commerce {
    &-data {
      color: white;
      opacity: 0.5;
    }
    &-text-inner {
      background: rgba(255, 255, 255, 0.05);
      color: white;
    }
    &__actions {
      svg {
        fill: white;
      }
    }

    .str-chat__message-attachment-card {
      background: rgba(0, 0, 0, 0.2);
      &--content {
        background: rgba(0, 0, 0, 0.2);
      }
      &--title {
        color: white;
      }
      &--url {
        color: rgba(255, 255, 255, 0.5);
      }
    }

    &--right {
      .str-chat__message-commerce {
        &-text-inner {
          background: rgba(0, 0, 0, 0.2);
        }
        .str-chat__message-attachment-card {
          background: rgba(0, 0, 0, 0.2);
          &--content {
            background: rgba(0, 0, 0, 0.2);
          }
        }
      }
    }
  }
}
.str-chat__input {
  background: #fff;
  box-shadow: 0 -1px 3px 0 rgba(0, 0, 0, 0.05), 0 -1px 0 0 rgba(0, 0, 0, 0.07);
  padding: 10px;
  position: relative;
  font-family: $second-font;
  padding-bottom: 0;
  // display: flex;

  &--emojipicker {
    position: absolute;
    bottom: 100%;
    right: 0;
  }

  &--textarea-wrapper {
    display: flex;
  }

  &-emojiselect {
    right: 20px;
  }

  .rfu-file-upload-button {
    right: 46px;
  }

  &-emojiselect,
  .rfu-file-upload-button {
    position: absolute;
    cursor: pointer;
    top: calc(100% - 35px);
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-size: 44px 44px;
    fill: rgba(0, 0, 0, 0.6);

    &:hover {
      fill: rgba(0, 0, 0, 1);
    }
  }

  &-footer {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    background: $white;
    padding: 0 10px 10px 10px;
    color: lighten($black, 50%);

    &--typing {
      font-style: italic;
    }

    &--count {
      &--hidden {
        visibility: hidden;
      }
    }
  }
}

.str-chat__textarea {
  height: auto;
  flex: 1;
  textarea {
    width: 100%;
    outline: none;
    padding: 11px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    font-size: 15px;
    min-height: 42px;
    transition: height 100ms ease-in;
    resize: none;

    &:focus {
      background: #fff;
      border: 1px solid $secondary-color;
      box-shadow: 0 0 0 2px rgba(0, 108, 255, 0.36);
    }

    &:placeholder {
      color: rgba(0, 0, 0, 0.5);
    }
  }
}

.str-chat__emojisearch {
  bottom: calc(100%);
  left: 0;
  width: calc(100% - 20px);
  position: absolute;
  background: rgba(240, 240, 240, 0.95);
  box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.31), 0 0 6px 0 rgba(0, 0, 0, 0.12);
  z-index: -1;
  border-radius: 4px 4px 0 0;
  margin: 0 10px;

  &__list {
    margin: 0;
    padding: 0;
    list-style-type: none;
    border-radius: 4px 4px 0 0;
  }
}

.dark.str-chat {
  .str-chat__emojisearch {
    background: #35373a;
    box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.31), 0 0 6px 0 rgba(0, 0, 0, 0.12);
    border-radius: 4px 4px 0 0;
    .rta__list-header {
      background: #1b1d20;
      border: 1px solid rgba(224, 224, 224, 0.03);
      box-shadow: 0 2px 1px 0 rgba(0, 0, 0, 0.07);
      color: white;
    }
    .rta__entity {
      color: white;
    }
  }
  .rfu-file-previewer__file {
    a {
      color: white;
    }
    &:hover {
      background: transparent;
    }
  }
  .rfu-file-previewer__close-button {
    color: white;
  }
}

.rta {
  font-size: 14px;
}

.rta__entity--selected {
  background-color: $secondary-color;
  color: $white;
}

.rta__list {
  border-radius: 4px 4px 0 0;
}

.rta__list-header {
  padding: 15px;
  font-size: 14px;
}

.str-chat__emoji-item {
  padding: 0 20px;
  display: flex;
  align-items: center;
  margin: 0 -8px;

  span {
    display: block;
  }

  &--entity {
    min-width: 24px;
  }

  &--name {
    font-size: 12px;
  }
}

.str-chat__slash-command {
  padding: 10px 15px;
  font-size: 14px;

  &-description {
    font-size: 12px;
  }
}

.str-chat__user-item {
  padding: 10px 15px;
  display: flex;
}

.str-chat {
  .rfu-dropzone .rfu-dropzone__notifier {
    position: absolute;
    height: 100%;
    width: 100%;
    padding: 5px;
    z-index: 1001;
    display: none;
  }

  .rfu-dropzone--accept .rfu-dropzone__notifier {
    background: rgba(#006cff, 0.7);
    display: block;
  }

  .rfu-dropzone--reject .rfu-dropzone__notifier {
    background: rgba(red, 0.7);
    display: block;
  }
}

.rfu-dropzone__inner {
  width: 100%;
  height: 100%;
  padding: 0 30px;
  border: 1px dashed transparent;
  box-sizing: border-box;
  display: flex;
  text-align: center;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: white;
  font-weight: 800;
  font-size: 12px;
  svg {
    display: none;
  }
}

.rfu-dropzone--reject .rfu-dropzone__inner {
  display: none;
}

.team.str-chat,
.livestream.str-chat {
  .str-chat {
    &__input {
      padding: 10px 40px;

      &-emojiselect,
      .rfu-file-upload-button {
        top: calc(100% - 44px);
      }

      &-emojiselect {
        right: 90px;
        @media screen and (min-width: 768px) {
          right: 50px;
        }
      }

      .rfu-file-upload-button {
        right: 116px;
        top: calc(100% - 43px);

        @media screen and (min-width: 768px) {
          right: 76px;
        }
      }

      &-footer {
        padding: 0 40px 10px;
      }
    }
  }
}

.livestream {
  &.str-chat {
    .str-chat {
      &__input {
        position: relative;
        z-index: 1;
        background: rgba(255, 255, 255, 0.29);
        box-shadow: 0 -1px 1px 0 rgba(0, 0, 0, 0.1);
        padding: 10px 20px 5px;

        textarea {
          border-radius: 2px;
          background: rgba(255, 255, 255, 0.26);
          border: 1px solid rgba(0, 0, 0, 0.2);
          font-size: 13px;
          padding: 12px;
        }
        &-emojiselect,
        .rfu-file-upload-button {
          top: calc(100% - 40px);
        }

        &-emojiselect {
          right: 68px;
          @media screen and (min-width: 768px) {
            right: 30px;
          }
        }

        .rfu-file-upload-button {
          right: 90px;
          top: calc(100% - 39px);
          @media screen and (min-width: 768px) {
            right: 56px;
          }
        }
        &-footer {
          padding: 0 20px 10px;

          background: rgba(255, 255, 255, 0.29);
        }
      }
    }
  }
}

.str-chat__file-uploads {
  max-height: 300px;
  overflow-y: auto;
}

.rfu-file-upload-button svg {
  fill: rgba(0, 0, 0, 0.6);
}

.dark.str-chat {
  .str-chat__input {
    background: rgba(255, 255, 255, 0.03);
    box-shadow: 0 -1px 1px 0 rgba(0, 0, 0, 0.34);
    &-footer {
      background: rgba(255, 255, 255, 0.03);
    }
    textarea {
      background: rgba(0, 0, 0, 0.1);
      border: 1px solid rgba(0, 0, 0, 0.4);
      border-radius: 2px;
      color: white;
    }
    .str-chat__input-emojiselect {
      svg {
        fill: white;
      }
    }
    .rfu-file-upload-button {
      svg {
        fill: white;
      }
    }
  }
}
.str-chat__input-flat {
  background: white;
  padding: 10px 40px;
  position: relative;
  .str-chat__textarea {
    flex: 1;
  }
  textarea {
    min-height: 56px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    padding: 20px 69px;
    font-size: 15px;
    line-height: 17px;
    border: none;
    margin: 0;
    &:focus {
      border: none;
      border-radius: 8px;
      box-shadow: 0 0 0 3px rgba(0, 108, 255, 1);
    }
  }

  &-footer {
    padding: 10px 40px;
    background: white;
  }

  &-emojiselect {
    position: absolute;
    top: calc(100% - 45px);
    left: 25px;
    svg {
      fill: #000;
      opacity: 0.5;
      &:hover {
        opacity: 1;
      }
    }
  }

  &--textarea-wrapper {
    display: flex;
  }

  &--emojipicker {
    position: absolute;
    bottom: calc(100%);
  }

  .rfu-file-upload-button {
    position: absolute;
    top: calc(100% - 40px);
    right: 55px;

    svg {
      fill: #000;
      opacity: 0.5;
      &:hover {
        opacity: 1;
      }
    }
    @media screen and (min-width: 768px) {
      right: 25px;
    }
  }
}

.rfu-image-previewer {
  &__image {
    width: 60px !important;
    height: 60px !important;
    .rfu-thumbnail__wrapper {
      width: 60px !important;
      height: 60px !important;
      border-radius: 10px;
      .rfu-thumbnail__overlay,
      .rfu-icon-button {
        padding: 0;
        svg {
          opacity: 0.9;
          height: 25px;
          width: 25px;
        }
      }
    }
  }
  .rfu-thumbnail-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 10px;
  }
}

.commerce.str-chat {
  .str-chat__input-flat {
    padding: 10px 22px;
    background: transparent;
  }
}

.dark.str-chat {
  .str-chat__input-flat {
    background: rgba(white, 0.04);
    textarea {
      background: rgba(255, 255, 255, 0.05);
      border-radius: 10px;
      color: white;
    }
    &-emojiselect,
    .rfu-file-upload-button {
      svg {
        fill: #fff;
      }
    }
  }
  &.commerce {
    .str-chat__input-flat {
      background: none;
    }
  }
}

@media screen and (max-width: 960px) {
  .str-chat.messaging {
    .str-chat__input-flat {
      padding: 10px 10px;
    }
  }
}
.str-chat__message-notification {
  display: block;
  position: absolute;
  align-self: center;
  background: $secondary-color;
  border: none;
  color: $white;
  border-radius: 50px;
  padding: 4px 10px;
  font-size: 12px;
  bottom: -10px;
  z-index: 101;
}
.str-chat__list {
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* enable smooth scrolling on ios */
  padding: 75px 0 0 0;

  &-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
  }

  &--thread {
    padding: 15px 0 0 0;
  }
}

.str-chat__ul {
  display: block;
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.str-chat__reverse-infinite-scroll {
}

.str-chat__custom-notification {
  border-radius: 4px;
  font-size: 12px;
  padding: 8px;
  font-family: $second-font;
  text-align: center;

  &.notification-success {
    background: rgba(2, 208, 2, 0.1);
    border: 1px solid rgba(2, 208, 2, 0.1);
    color: green;
  }

  &.notification-error {
    background: rgba(208, 2, 27, 0.1);
    border: 1px solid rgba(208, 2, 27, 0.1);
    color: #f00;
  }
}

.str-chat__connection-issue {
  background: rgba(208, 2, 27, 0.1);
  border: 1px solid rgba(208, 2, 27, 0.1);
  color: #f00;
  border-radius: 4px;
  font-size: 12px;
  padding: 8px;
  font-family: $second-font;
  text-align: center;
}

.str-chat__list-notifications {
  padding: 0 40px;
  display: flex;
  position: relative;
  flex-direction: column;
  justify-content: center;
}

.messaging {
  &.str-chat {
    .str-chat {
      &__list {
        padding: 55px 40px 0;
        background: white;

        &-notifications {
          background: white;
        }
      }
    }
    @media screen and (max-width: 960px) {
      .str-chat {
        &__list {
          padding: 55px 10px 0;
          &-notifications {
            padding: 0 10px;
          }
        }
      }
    }
    &.dark {
      .str-chat__list {
        background: rgba(white, 0.04);
        &-notifications {
          background: rgba(white, 0.04);
        }
      }
    }
  }
}

.livestream {
  &.str-chat {
    .str-chat {
      &__list {
        padding: 55px 10px;
      }
    }
  }
}

.commerce {
  &.str-chat {
    .str-chat {
      &__list {
        padding: 75px 20px 0;
        &-notifications {
          padding-left: 22px;
          padding-right: 22px;
        }
      }
    }
  }
}
.str-chat {
  &__message {
    &-team {
      $fontColor: #404040;
      $fontSize: 15px;
      $borderColor: rgba(0, 0, 0, 0.1);

      font-family: $second-font;
      position: relative;
      display: flex;
      padding: 5px 40px;

      .str-chat__avatar {
        margin-right: 0;
      }

      &-actions {
        $actionsBorderColor: #e0e0e0;
        $actionsHeight: 24px;
        $actionsOffset: $actionsHeight / 2;

        position: absolute;
        top: -$actionsOffset;
        right: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 88px;
        height: $actionsHeight;
        border-radius: 100px;
        background: $white;
        border: 1px solid $actionsBorderColor;
        box-shadow: 0 2px 1px 0 rgba(0, 0, 0, 0.07);
        z-index: 10;
        visibility: hidden;

        > span {
          position: relative;
          flex: 1;
          display: flex;
          justify-content: center;
          align-items: center;
          height: 100%;
          text-align: center;
          cursor: pointer;

          > span {
            position: relative;
            flex: 1;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100%;
            text-align: center;
          }

          > &:not(:last-of-type) {
            border-right: 1px solid $actionsBorderColor;
          }

          svg {
            fill: #000;
            opacity: 0.5;
          }

          &:hover svg {
            opacity: 1;
          }
        }

        .str-chat__message-actions-box {
          bottom: initial;
          left: initial;
          visibility: hidden;
          right: 100%;
          top: -10px;
          border-radius: 7px;

          &--open {
            visibility: visible;
          }
        }
      }

      &-group {
        position: relative;
        width: 100%;
      }

      &-meta {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        min-width: 50px;
        padding: 0 10px 0 0;
        justify-content: space-between;

        time {
          text-transform: uppercase;
          color: rgba(0, 0, 0, 0.5);
          font-size: 10px;
          margin-bottom: 5px;
          text-align: right;
          visibility: hidden;
        }
      }

      &-author {
        font-size: $fontSize;
        text-transform: capitalize;
        line-height: 40px;
        margin-left: 10px;
        display: flex;
        align-items: center;
        justify-content: space-between;
      }

      &-content {
        width: 100%;
        padding-left: 10px;
        color: $fontColor;
        font-size: $fontSize;
        line-height: 22px;
        font-weight: 400;
        border-left: 1px solid $borderColor;
        position: relative;
        margin: 0 0;

        &--image {
          padding-left: 0;
          border-left-color: transparent;
        }

        p {
          margin: 0;
          white-space: pre-line;
          &:not(:first-of-type) {
            margin: 16px 0 0;
          }

          /* These are technically the same, but use both */
          overflow-wrap: break-word;
          word-wrap: break-word;
          -ms-word-break: break-all;
          /* Instead use this non-standard one: */
          word-break: break-word;

          /* Adds a hyphen where the word breaks, if supported (No Blink) */
          -ms-hyphens: auto;
          -moz-hyphens: auto;
          -webkit-hyphens: auto;
          hyphens: auto;

          a {
            color: $secondary-color;
            font-weight: bold;
            text-decoration: none;
          }

          code {
            background-color: #f8f8f8;
            border: 1px solid rgba(208, 2, 27, 0.1);
            border-radius: 3px;
            padding: 2px;
          }
        }

        pre,
        code {
          font-family: $mono-font;
          line-height: inherit;
          font-size: 12px;
          font-weight: 700;
        }

        pre {
          margin: 0 5px 0 0;
          border-radius: 4px;
          background-color: #f8f8f8;
          border: 1px solid #d3d3d3;
          padding: 10px;
        }

        code {
          width: inherit;
          white-space: pre-wrap;
          word-break: break-all;
        }

        ul {
          margin: 0;
        }

        &--top,
        &--single {
          &:not(.str-chat__message-team-content--image) {
            &::before {
              content: '';
              position: absolute;
              top: 0;
              left: 0;
              transform: rotate(-135deg) translateX(1px);
              transform-origin: 0;
              width: 5px;
              height: 1px;
              background-color: $borderColor;
            }
          }
        }

        &--top {
          margin: 5px 0 0;
        }

        &--single {
          margin: 5px 0 0;
        }

        &--middle {
          margin: 0 0 0;
        }

        &--bottom {
          margin: 0 0 0;
        }
      }

      &-text {
        &--is-emoji {
          font-size: 33px;
          line-height: 42px;
        }
      }

      &-status {
        position: absolute;
        left: 100%;
        bottom: 1px;
        line-height: 1;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        z-index: 11;

        &-number {
          font-size: 10px;
          margin-left: 4px;
          position: absolute;
          left: 100%;
          color: rgba(0, 0, 0, 0.6);
        }

        > .str-chat__avatar {
          align-self: flex-end;
          margin-right: 0;
        }

        > .str-chat__tooltip {
          display: none;
          max-width: 300px;
          min-width: 100px;
          text-align: center;
        }

        &:hover {
          > .str-chat__tooltip {
            display: block;
          }
        }

        &::after {
          position: absolute;
          bottom: 100%;
          right: 0;
          content: ' ';
          width: 15px;
          height: 15px;
        }
      }

      &-failed {
        border: 0;
        background: none;
        display: flex;
        align-items: center;
        color: #ea152f;
        cursor: pointer;
        margin: 5px 0;
        font-size: 12px;
        padding: 0;

        svg {
          margin-right: 7px;
        }
      }

      &-form-footer {
        display: flex;
        justify-content: space-between;
        padding: 10px 0 5px;
      }

      &--bottom,
      &--single {
        .str-chat__message-team-meta {
          time {
            visibility: visible;
          }
        }
      }

      &--editing {
        padding: 10px;
        background: #edf4ff;
        box-shadow: 0 0 11px 0 rgba(0, 0, 0, 0.06), inset 0 1px 0 0 #006cff,
          inset 0 -1px 0 0 #006cff;
        z-index: 1;
      }

      &:hover {
        /* .-team:hover */
        &:not(.str-chat__message-team--editing, .str-chat__message-team--error) {
          /* .str-chat__message-attachment, */
          .str-chat__message-team-content {
            background: rgba(0, 0, 0, 0.03);
          }
        }

        .str-chat__message-team-meta {
          time {
            visibility: visible;
          }
        }

        .str-chat__message-team-actions {
          visibility: visible;
        }
      }

      &--error {
        /* .str-chat__message-team--error */
        padding-top: 20px;
        padding-bottom: 20px;

        .str-chat__message-team {
          &-status {
            display: none;
          }

          &-content {
            background: transparent;
            border-width: 2px;
            border-color: #d0021b; /* error */
            p {
              opacity: 0.5;
            }

            &::before {
              content: '';
              position: absolute;
              top: 0;
              left: 0;
              transform: rotate(-135deg) translateX(1px);
              transform-origin: 0;
              width: 5px;
              height: 2px;
              background-color: #d0021b; /* error */
            }
          }
        }
      }

      &--ephemeral {
        .str-chat__message-team {
          &-status {
            display: none;
          }
        }
      }

      &--failed {
        .str-chat__message-team-content--text {
          border-color: #d0021b;
          p {
            opacity: 0.5;
          }
        }
      }

      .str-chat__message-attachment--img {
        border-radius: 0;
        padding-left: 5px;
        border-left: 1px solid rgba(0, 0, 0, 0.1);
      }

      .str-chat__message-attachment-card {
        margin: 0;
        border-radius: 4px 4px 4px 4px;
        background: #fff;
        border: 1px solid rgba(0, 0, 0, 0.08);

        &--content {
          background: #ebebeb;
        }

        &--text {
          display: none;
        }
      }

      .str-chat__input-emojiselect,
      .str-chat__input-fileupload {
        position: static;
        top: initial;
      }
    } /* .str-chat__message-team */
  } /* .str-chat__message */
} /* .str-chat */

.str-chat__message-team-error-header {
  font-size: 11px;
  color: rgba(0, 0, 0, 0.4);
  font-style: italic;
  text-transform: none;
}

.str-chat__thread-list {
  .str-chat__message-simple__actions {
    min-width: 30px;
  }
  .str-chat__message-team {
    padding: 5px 10px;

    &-actions {
      width: 60px;
      min-width: unset;

      .str-chat__message-actions-box {
        top: initial;
        bottom: initial;
        bottom: -10px;
      }
    }
  }
}

.str-chat {
  blockquote {
    margin: 0 0 0 5px;
    font-style: italic;
    padding-left: 20px;
    position: relative;

    &::before {
      font-size: 25px;
      content: '\201C';
      font-style: italic;
      position: absolute;
      opacity: 0.5;
      top: 2px;
      left: -5px;
    }
  }
}

.str-chat.dark {
  .str-chat__message-team-error-header {
    color: rgba(255, 255, 255, 0.5);
    opacity: 1;
  }
  .str-chat__message-team {
    $borderColor: rgba(0, 0, 0, 0.4);
    $fontColor: white;
    &-author {
      color: $fontColor;
    }
    &-meta {
      time {
        color: rgba($fontColor, 0.3);
      }
    }
    &-content,
    .str-chat__message-attachment {
      border-color: $borderColor;
      color: $fontColor;
      &--top,
      &--single {
        &:not(.str-chat__message-team-content--image) {
          &::before {
            background-color: $borderColor;
          }
        }
      }
      &--image {
        border-color: transparent;
      }

      p {
        code {
          background-color: rgba(255, 255, 255, 0.05);
          border: 1px solid rgba(255, 255, 255, 0.1);
        }
      }

      pre {
        background-color: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
      }
      .str-chat__message-attachment-file--item {
        border-color: rgba(black, 0.4);
        a,
        span {
          color: white;
        }
        span {
          opacity: 0.4;
        }
        &:hover {
          background: transparent;
        }
      }
      .str-chat__message-attachment--file {
        a,
        span {
          color: white;
        }
        span {
          opacity: 0.4;
        }
      }
    }
    &-content,
    .str-chat__message-attachment {
      .str-chat__message-attachment-card {
        background: transparent;
        &--content {
          background: rgba(0, 0, 0, 0.1);
          min-height: 58px;
          margin: 0;
          padding: 0px 16px;
        }
        &--title {
          color: $fontColor;
        }
        &--url {
          color: rgba($fontColor, 0.4);
        }
      }
    }
    &-actions {
      background: #1b1d20;

      border: 1px solid rgba(224, 224, 224, 0.03);
      box-shadow: 0 2px 1px 0 rgba(0, 0, 0, 0.07);
      border-radius: 12px;
      .str-chat__message-actions-box {
        background: #6a6b6d;
      }
      > span {
        border-color: rgba(0, 0, 0, 0.04);
        svg {
          fill: #fff;
        }
      }
    }
    &--error {
      .str-chat__message-team {
        &-content {
          border-color: red;
          border-width: 1px;
          p {
            color: rgba(255, 255, 255, 0.5);
            opacity: 1;
          }
          &--top,
          &--single {
            &:not(.str-chat__message-team-content--image) {
              &::before {
                background-color: red;
                height: 1px;
              }
            }
          }
        }
      }
    }
    &--editing {
      padding: 10px;
      background: rgba(0, 0, 0, 0.1);
      box-shadow: 0 0 11px 0 rgba(0, 0, 0, 0.06),
        inset 0 1px 0 0 rgba(#006cff, 0.1), inset 0 -1px 0 0 rgba(#006cff, 0.1);
      z-index: 1;
    }
  }
}
.str-chat__message-livestream {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  display: flex;
  width: 100%;
  margin: 0 0;
  padding: 10px 10px;
  border: 1px solid rgba(0, 0, 0, 0);
  position: relative;

  &-left {
    width: 30px;
    .str-chat__avatar {
      margin-right: 0;
    }
  }

  &-right {
    flex: 1;
  }

  &-content {
    position: relative;
    padding: 5px 10px;
    border: 1px solid transparent;

    > * {
      font-size: 13px;
      line-height: 20px;
      margin: 0;
    }

    .str-chat__message-mention {
      font-size: 13px;
      line-height: 20px;
      margin: 0;

      &:focus {
        outline: 1;
      }
    }

    p {
      margin: 0;
      white-space: pre-line;
      &:not(:first-of-type) {
        margin: 16px 0 0;
      }
      /* These are technically the same, but use both */
      overflow-wrap: break-word;
      word-wrap: break-word;

      -ms-word-break: break-all;

      /* Instead use this non-standard one: */
      word-break: break-word;

      /* Adds a hyphen where the word breaks, if supported (No Blink) */
      -ms-hyphens: auto;
      -moz-hyphens: auto;
      -webkit-hyphens: auto;
      hyphens: auto;

      code {
        background-color: rgba(white, 0.2);
        border: 1px solid rgba($secondary-color, 0.1);
        border-radius: 3px;
        padding: 2px 4px;
      }

      a {
        color: $secondary-color;
        font-weight: bold;
        text-decoration: none;
      }
    }

    pre,
    code {
      font-family: Consolas, 'Andale Mono WT', 'Andale Mono', 'Lucida Console',
        'Lucida Sans Typewriter', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono',
        'Liberation Mono', 'Nimbus Mono L', Monaco, 'Courier New', Courier,
        monospace;
      line-height: inherit;
      padding: 10px;
      font-size: 12px;
      font-weight: 700;
    }

    pre {
      margin: 0 5px 0 0;
      border-radius: 4px;
      background-color: rgba($secondary-color, 0.1);
      border: 1px solid rgba($secondary-color, 0.2);
    }

    code {
      width: inherit;
      word-break: break-all;
    }
  }
  &:hover {
    .str-chat__message-livestream-actions {
      display: flex;
    }
  }

  &-actions {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.23);
    box-shadow: 0 2px 1px 0 rgba(0, 0, 0, 0.07);

    width: 141px;
    height: 24px;
    padding: 0 4px;
    position: absolute;
    top: -12px;
    right: 0;
    border-radius: 24px;
    display: none; /* FFS display: none */
    align-items: center;
    justify-content: space-between;

    > span {
      position: relative;
      flex: 1;
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100%;
      text-align: center;

      &:not(:last-of-type) {
        border-right: 1px solid #e0e0e0;
      }

      > span {
        position: relative;
        flex: 1;
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100%;
        text-align: center;
      }

      cursor: pointer;

      svg {
        fill: #000;
        opacity: 0.5;
      }

      &:hover svg {
        opacity: 1;
      }
    }

    .str-chat__message-actions-box {
      bottom: initial;
      left: initial;
      visibility: hidden;
      right: 100%;
      top: 50%;
      transform: translateY(-50%);
      border-radius: 7px;

      &--open {
        visibility: visible;
      }
    }
  }

  &-time {
    font-size: 10px;
    line-height: 20px;
    color: rgba(0, 0, 0, 0.5);
    flex: 2;
    padding: 0 4px;
  }

  &-text {
    &--is-emoji {
      font-size: 33px;
      line-height: 42px;
    }
  }

  &-author {
    margin-bottom: 8px;
    text-transform: capitalize;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    strong {
      margin-right: 8px;
    }
  }

  &:hover {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 0 6px 0 rgba(0, 0, 0, 0.06);
    border-radius: 6px;
  }

  .str-chat__message-attachment--img {
    border-radius: 0;
  }

  .str-chat__message-attachment-card {
    margin: 0;
    border-radius: 0;
    background: rgba(white, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.08);

    &--content {
      background: rgba(white, 0.2);
    }

    &--text {
      display: none;
    }

    &--url {
      text-transform: lowercase;
    }
  }

  &__thread-banner {
    text-align: center;
    font-size: 12px;
    padding: 8px;
    margin: 8px 10px 0 10px;
    background: rgba(0, 108, 255, 0.1);
    border-radius: 2px;
    color: #404040;
  }

  &--error,
  &--failed {
    .str-chat__message-livestream {
      &-content {
        p {
          svg {
            position: relative;
            top: 2px;
            margin-right: 4px;
          }
          color: red;
        }
      }
    }
  }
  &--failed {
    .str-chat__message-livestream {
      &-content {
        p {
          cursor: pointer;
        }
      }
    }
  }
  &--initial-message {
    margin: 20px 10px 0;
    width: auto;
  }
}

.str-chat__list--thread {
  .str-chat__message-livestream__actions {
    min-width: 30px;
  }
  .str-chat__message-livestream {
    &-actions {
      width: 110px;
      min-width: unset;

      .str-chat__message-actions-box {
        top: initial;
        bottom: initial;
        bottom: -10px;
      }
    }
  }
}

.livestream.dark.str-chat {
  .str-chat__message-livestream {
    color: #e6e6e6;

    &:hover {
      background: rgba(255, 255, 255, 0.07);
      border: 1px solid rgba(0, 0, 0, 0.06);
      box-shadow: 0 0 6px 0 rgba(0, 0, 0, 0.06);
      border-radius: 6px;
    }
    .str-chat__message-attachment-card {
      background: rgba(0, 0, 0, 0.1);
      border: 1px solid rgba(white, 0.08);
      &--content {
        background: rgba(0, 0, 0, 0.1);
      }
      &--url {
        color: rgba(white, 0.79);
      }
    }
  }

  .str-chat__message-livestream-actions {
    background: #1b1d20;
    border: 1px solid rgba(224, 224, 224, 0.03);
    box-shadow: 0 2px 1px 0 rgba(0, 0, 0, 0.07);
    > span:not(:last-of-type) {
      border-color: rgba(255, 255, 255, 0.04);
    }
    svg {
      fill: #fff;
    }
  }
  .str-chat__message-livestream-time {
    color: #fff;
    opacity: 0.5;
  }
}
.str-chat__message-replies-count-button {
  display: block;
  border: none;
  background: none;
  padding: 0;
  margin-top: 8px;
  font-size: 12px;
  line-height: 15px;
  font-weight: 700;
  color: #006cff;
  cursor: pointer;

  svg {
    fill: rgba(0, 0, 0, 0.1);
    margin-right: 5px;
  }
}

.dark.str-chat {
  .str-chat__message-replies-count-button {
    svg {
      fill: rgba(255, 255, 255, 0.1);
    }
  }
  &.team {
    .str-chat__message-replies-count-button {
      svg {
        fill: rgba(0, 0, 0, 0.4);
      }
    }
  }
}
.str-chat__modal {
  background: black;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  opacity: 0.89;
  display: none;
  align-items: center;
  justify-content: center;
  &--open {
    display: flex;
  }

  &__inner {
    max-width: 667px;
    background: white;
    padding: 20px;
    border-radius: 10px;
  }

  &__close-button {
    position: absolute;
    top: 0;
    right: 0;
    padding: 20px;
    font-size: 14px;
    line-height: 10px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    svg {
      position: relative;
      top: 1px;
      margin-left: 10px;
      fill: white;
    }
    &:hover {
      opacity: 0.79;
    }
  }

  .str-chat__edit-message-form {
    min-width: 300px;
  }

  .str-chat__input-emojiselect,
  .str-chat__input-fileupload {
    position: relative;
    top: unset;
    right: unset;
  }
}

.str-chat.dark.messaging {
  .str-chat__modal {
    &__inner {
      border: 2px solid white;
      background: black;
    }
  }
}
.str-chat__new-channel {
  &--header {
    padding: 10px;
    display: flex;
    align-items: center;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);

    &__title {
      flex: 1;
      text-align: center;
      color: #006cff;
      font-weight: 700;
      margin-right: 45px;
    }
  }

  &--name {
    padding: 0 0 0 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;

    label {
      font-size: 14px;
      margin-right: 5px;
    }

    input {
      font-size: 14px;
      font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
      flex: 1;
      width: 100%;
      padding: 15px 0 15px 5px;
      background: #fff;
      border: none;
      outline: none;

      &:focus {
        background: white;
        box-shadow:
          inset 0 0 0 1px $secondary-color,
          inset 0 0 0 2px rgba(0, 108, 255, 0.36);
      }
    }
  }
}
%background-reaction-list {
  background: url('../assets/str-chat__reaction-list-sprite@1x.png') no-repeat;
  background-size: 59px 101px;

  @media only screen and (-webkit-min-device-pixel-ratio: 2),
    only screen and (min-resolution: 2dppx) {
    background-image: url('../assets/str-chat__reaction-list-sprite@2x.png');
  }

  @media only screen and (-webkit-min-device-pixel-ratio: 3),
    only screen and (min-resolution: 3dppx) {
    background-image: url('../assets/str-chat__reaction-list-sprite@3x.png');
  }
}

.str-chat__message,
.str-chat__message-commerce {
  .str-chat__reaction-list {
    ul {
      position: relative;
      list-style-type: none;
      padding: 0;
      font-size: 15px;
      line-height: 26px;
      display: flex;
      justify-content: center;
      margin: -1px -15px 0 0;
      z-index: 888;
    }

    position: absolute;
    right: 15px;
    top: -28px;
    z-index: 99;

    @extend %background-reaction-list;

    height: 33px;
    width: initial;
    background-position: 0 -66px;
    background-repeat: repeat-x;

    .emoji-mart-emoji {
      display: flex;
    }

    &::after,
    &::before {
      position: absolute;

      @extend %background-reaction-list;

      content: '';
      top: 0;
      height: 33px;
    }

    &::after {
      right: -26px;
      width: 26px;
      background-position: -33px -33px;
    }

    &::before {
      left: -13px;
      width: 13px;
      background-position: -0 -33px;
    }

    &--reverse {
      ul {
        margin: -1px -5px 0 -15px;
      }

      right: initial;
      left: 15px;
      position: absolute;

      &::after {
        right: -13px;
        width: 13px;
        background-position: -46px 0;
      }

      &::before {
        left: -26px;
        width: 26px;
        background-position: -0 0;
      }
    }

    li {
      display: flex;
      align-items: center;

      button {
        padding: 0;
      }
    }

    &--counter {
      color: $white;
      font-size: 12px;
    }
  }

  &--me,
  &--right {
    .str-chat__message-commerce-inner {
      > .str-chat__reaction-list {
        left: 46px;
      }
    }
    .str-chat__reaction-list {
      right: initial;
      left: 16px;

      ul {
        margin: -1px 0 0 -15px;
      }

      &::after {
        right: -13px;
        width: 13px;
        background-position: -46px 0;
      }

      &::before {
        left: -26px;
        width: 26px;
        background-position: -0 0;
      }

      &--reverse {
        right: 15px;
        left: initial;

        ul {
          margin: -1px -15px 0 0;
        }

        &::after {
          right: -26px;
          width: 26px;
          background-position: -33px -33px;
        }

        &::before {
          left: -13px;
          width: 13px;
          background-position: -0 -33px;
        }
      }
    }
  }
}

.str-chat__message-commerce {
  &-inner {
    > .str-chat__reaction-list {
      left: unset;
      right: 46px;
    }
  }
  &--right {
    .str-chat__message-commerce {
      &-inner {
        > .str-chat__reaction-list {
          right: unset;
          left: 46px;
        }
      }
    }
  }
}
.str-chat__message-reactions-list {
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex;
}

.str-chat__message-reactions-list-item {
  font-size: 20px;
  margin: 0 5px;
  position: relative;
  line-height: 0;
  button {
    padding: 0;
  }

  span[role='img'] {
    position: relative;
    display: block;
    top: -2px;
    transform: scalce(1);
    transition: transform 100ms ease;

    &:hover {
      transform: scale(1.4);
    }
  }

  &__count {
    position: absolute;
    top: 28px;
    font-size: 10px;
    color: #fff;
    font-weight: 700;
    left: 6px;
  }

  .str-chat__avarar {
    margin: 0;
    visibility: visible;
  }

  .latest-user {
    width: 20px;
    height: 20px;
    position: absolute;
    top: -24px;
    left: 0;

    &-tooltip {
      display: none;
      text-align: center;
      position: absolute;
      bottom: calc(100% + 5px);
      left: 50%;
      transform: translate(-50%, 0);
      background: rgba(0, 0, 0, 0.81);
      border-radius: 5px;
      background-image: linear-gradient(
        -180deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.5) 100%
      );
      max-width: 237px;
      padding: 4px 8px;
      font-size: 13px;
      color: white;

      &::after {
        content: '';
        position: absolute;
        top: calc(100% - 4px);
        left: 50%;
        transform: translate(-50%, 0) rotate(45deg);
        width: 7px;
        height: 7px;
        background-color: #1a1a1a;
      }
    }

    &-not-found {
      border: 1.5px solid #fff;
      border-radius: 50%;
      background-color: $primary-color;
      width: inherit;
      height: inherit;
    }

    img {
      border: 1.5px solid #fff;
      border-radius: 50%;
      object-fit: cover;
      width: inherit;
      height: inherit;
    }

    &:hover {
      .latest-user-tooltip {
        display: block;
      }
    }
  }
}

.str-chat__reaction-selector {
  z-index: 999;
  height: 60px;
  position: absolute;
  width: initial;
  background: rgba(24, 25, 28, 0.98);
  background-image: linear-gradient(
    -180deg,
    rgba(0, 0, 0, 0) 50%,
    rgba(0, 0, 0, 0.05) 100%
  );
  border: 1px solid rgba(224, 224, 224, 0.03);
  box-shadow: 0 3px 1px 0 rgba(0, 0, 0, 0.07), 0 11px 8px 0 rgba(0, 0, 0, 0.15);
  border-radius: 30px;
  display: flex;
  align-items: center;

  ul {
    position: relative;
    z-index: 1000;
    margin: 0 16px;
  }

  &-tooltip {
    position: absolute;
    bottom: calc(100% + 15px);
    background: rgba(0, 0, 0, 0.81);
    border-radius: 5px;
    background-image: linear-gradient(
      -180deg,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 0.5) 100%
    );
    min-width: 85px;
    min-height: 24px;
    max-width: 100%;
    padding: 4px 8px;
    font-size: 13px;
    color: white;
    text-align: center;

    .arrow {
      position: absolute;
      top: calc(100% - 4px);
      left: 50%;
      transform: translate(-50%, 0) rotate(45deg);
      width: 7px;
      height: 7px;
      background-color: #1a1a1a;
    }
  }

  .emoji-mart-emoji:hover {
    transition: 0.1s;
    transform: scale(1.2);
    cursor: pointer;
  }
}

.str-chat__message,
.str-chat__message-team,
.str-chat__message-simple,
.str-chat__message-commerce,
.str-chat__message-livestream {
  .str-chat__reaction-selector {
    top: -65px;
    left: 0;
  }
}

.str-chat__message-commerce {
  &--right {
    .str-chat__reaction-selector {
      left: unset;
      right: 0;
    }
  }
}

.str-chat__message-livestream {
  .str-chat__reaction-selector {
    left: unset;
    top: -70px;
    right: 0;
  }
}

.str-chat__message-team {
  .str-chat__reaction-selector {
    left: unset;
    top: -60px;
    right: 0;
  }
}

.str-chat__message-simple {
  .str-chat__reaction-selector {
    right: unset;
    left: 0;
    &--reverse {
      right: 0;
      left: unset;
    }
  }
  &--me {
    .str-chat__reaction-selector {
      left: unset;
      right: 0;
      &--reverse {
        right: unset;
        left: 0;
      }
    }
  }
}
.str-chat__read-state {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  position: absolute;
  right: 0;
  top: 100%;
  margin: -56px 10px 0 40px;
}
.str-chat__send-button {
  margin-left: 10px;
  border: 0;
  background: 0;
  outline: 0;
  @media screen and (min-width: 768px) {
    display: none;
  }
}
.str-chat__simple-reactions-list {
  $margin: 2px;

  list-style-type: none;
  padding: 4px 4px 2px 4px;
  display: inline-flex;
  margin: 8px 0 0 0;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  line-height: 1;
  position: relative;

  &-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translate(-50%, 0);
    background: rgba(0, 0, 0, 0.81);
    border-radius: 5px;
    background-image: linear-gradient(
      -180deg,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 0.5) 100%
    );
    min-height: 24px;
    width: auto;
    max-width: 275px;
    padding: 4px 8px;
    font-size: 13px;
    color: white;
    text-align: center;

    > .arrow {
      position: absolute;
      top: calc(100%);
      left: 50%;
      transform: translate(-50%, 0);
      width: 0;
      height: 0;
      border-left: 4px solid transparent;
      border-right: 4px solid transparent;
      border-top: 4px solid rgba(0, 0, 0, 0.81);
    }
  }

  &-item {
    margin: 0 0;
    cursor: pointer;

    > span {
      line-height: 1;
    }

    .emoji-mart-emoji {
      &:hover {
        transition: transform 0.2s ease-in-out;
        transform: scale(1.2);
      }
    }

    &--last-number {
      font-size: 11px;
      display: flex;
      align-items: center;
      color: black;
    }
  }
}

.dark.str-chat {
  .str-chat__simple-reactions-list {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    &-item {
      &--last-number {
        color: #fff;
      }
    }
  }
}
.str-chat__small-message-input {
  margin: 10px;
  position: relative;
  z-index: 1000;

  .str-chat__textarea {
    flex: 1;
  }

  &-emojiselect {
    right: 6px;
  }
  .rfu-file-upload-button {
    right: 26px;
  }

  &--textarea-wrapper {
    display: flex;
  }

  &-emojiselect,
  .rfu-file-upload-button {
    position: absolute;
    cursor: pointer;
    bottom: 10px;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-size: 44px 44px;
    fill: rgba(0, 0, 0, 0.6);

    &:hover {
      fill: rgba(0, 0, 0, 1);
    }
  }

  &-emojipicker {
    position: absolute;
    bottom: 100%;
    right: 0;
    transform: scale(0.8);
    transform-origin: 100% 100%;
  }

  &--send-button {
    background: none;
    border: none;
    cursor: pointer;
    outline: 0;
    &:hover {
      opacity: 0.69;
    }
    @media screen and (min-width: 768px) {
      display: none;
    }
  }

  textarea {
    background: transparent;
    min-height: 36px;
    font-size: 13px;
    padding: 10px 44px 8px 8px;

    &:focus {
      height: 36px;
    }
  }

  .str-chat__emojisearch {
    bottom: 100%;
  }

  .str-chat__user-item {
    font-size: 14px;
  }

  .rfu-file-upload-button {
    position: absolute;
    cursor: pointer;
    right: 28px;
  }

  &--send-button-active {
    .rfu-file-upload-button {
      right: 70px;
    }
    .str-chat__small-message-input-emojiselect {
      right: 50px;
    }
  }

  .rfu-dropzone .rfu-dropzone__notifier {
    z-index: 1000;
  }
}

.dark.str-chat {
  .str-chat__small-message-input {
    textarea {
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(0, 0, 0, 0.21);
      border-radius: 6px;
      color: white;
    }
    .rfu-file-upload-button,
    .str-chat__small-message-input-emojiselect {
      svg {
        fill: white;
      }
    }
  }
}

.livestream.str-chat {
  .str-chat__small-message-input {
    &-emojiselect {
      @media screen and(min-width: 768px) {
        right: 16px;
      }
    }
    .rfu-file-upload-button {
      @media screen and(min-width: 768px) {
        right: 36px;
      }
    }
  }
}

.team.str-chat,
.messaging.str-chat {
  .str-chat__small-message-input {
    &-emojiselect {
      right: 50px;
      @media screen and(min-width: 768px) {
        right: 10px;
      }
    }
    .rfu-file-upload-button {
      right: 70px;
      @media screen and(min-width: 768px) {
        right: 35px;
      }
    }
  }
}
.str-chat__thread {
  background: #f1f1f3;
  flex: 1 0 300px;
  min-width: 300px;
  max-width: 300px;
  overflow-y: hidden;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  overflow: hidden;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  padding-top: 0px;

  &--full {
    max-width: 100%;
  }

  &-header {
    position: relative;
    width: 100%;
    background: #f1f1f3;
    box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.14);
    height: 70px;
    margin-bottom: 20px;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;

    &-details {
      font-size: 14px;

      small {
        display: block;
        font-size: 12px;
      }
    }
  }

  &-start {
    border-radius: 4px;
    margin: 10px;
    padding: 8px;
    background: rgba(153, 196, 255, 0.1);
    text-align: center;
    font-size: 12px;
  }

  &-list {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;

    .str-chat__list {
      overflow-x: hidden;
      overflow-y: auto;
      padding: 40px 0;
      &--thread {
        overflow-y: auto;
      }
    }
  }
}

.messaging {
  &.str-chat {
    .str-chat {
      &__thread {
        margin-right: 10px;
        margin-top: 20px;
        border-radius: 8px 8px 0 0;

        overflow: hidden;
        background: white;
        max-height: 100%;
        display: flex;
        flex-direction: column;
        padding-top: 0px;

        &.str-chat__thread--full {
          margin: 0;
        }
        .str-chat__gallery {
          justify-content: flex-end;
          border-radius: 0;
          &-image,
          &-placeholder {
            width: 100px;
            height: 100px;
          }
        }
      }
      &__thread-list {
        padding: 0 10px;

        > .str-chat__list {
          background: transparent;
          overflow-y: auto;
          padding: 40px 0 0;
          .str-chat__list--thread {
            padding: 0;
            overflow-y: hidden;
          }
        }
      }
      &__thread-header {
        border: none;
        box-shadow: none;
        background: white;
      }
      @media screen and (max-width: 960px) {
        &__thread {
          position: fixed;
          top: 0;
          right: 0;
          height: 100vh;
          background: white;
          z-index: 1000;
          margin: 0;
          width: 100vw;
          max-width: 100%;
        }
      }
    }
    &.dark {
      .str-chat__thread {
        background: rgba(white, 0.04);
        &-header {
          background: rgba(46, 48, 51, 0.98);
          box-shadow: 0 7px 9px 0 rgba(0, 0, 0, 0.03),
            0 1px 0 0 rgba(0, 0, 0, 0.03);
          color: white;
        }
        &-start {
          color: white;
        }
      }
      @media screen and (max-width: 960px) {
        .str-chat__thread {
          background: #282a2d;
        }
      }
    }
  }
}

.team {
  &.str-chat {
    .str-chat {
      &__thread {
        background: white;
      }
      @media screen and (max-width: 960px) {
        &__thread {
          position: fixed;
          top: 0;
          right: 0;
          height: 100vh;
          background: white;
          z-index: 1000;
          margin: 0;
          width: 100vw;
          max-width: 100%;
        }
      }
      &__thread-header {
        height: 80px;
      }
      &__thread-list {
        > .str-chat__list {
          overflow-y: auto;
          .str-chat__list--thread {
            overflow-y: hidden;
          }
        }
      }
    }
    &.dark {
      .str-chat__thread {
        background: $dt-bg-team;
      }
    }
  }
}

.livestream.str-chat,
.str-chat {
  .str-chat__thread {
    background: transparent;
    &-header {
      background: rgba(255, 255, 255, 0.29);
    }
  }
  &.dark {
    .str-chat__thread {
      background: #1a1a1a;
      &-header {
        background: rgba(255, 255, 255, 0.03);
        box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.34);
        color: white;
      }
      &-start {
        background: rgba(153, 196, 255, 0.1);
        border-radius: 4px;
        color: white;
      }
    }
  }
}
.str-chat__typing-indicator {
  display: flex;
  visibility: hidden;
  align-items: center;
  &--typing {
    visibility: visible;
  }
  &__avatars {
    display: flex;
    .str-chat__avatar {
      border: 2px solid white;
      margin-right: -14px;
      &:last-of-type {
        margin-right: 14px;
      }
    }
  }
  &__dots {
    position: relative;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 7px;
    border-radius: $border-radius $border-radius $border-radius 2px;
  }
  &__dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 3px;
    background: $secondary-color;
    animation: wave 1.1s linear infinite;

    &:nth-child(2) {
      animation-delay: -0.9s;
      opacity: 0.5;
    }

    &:nth-child(3) {
      animation-delay: -0.8s;
      opacity: 0.2;
    }
  }
}

.dark.str-chat {
  .str-chat__typing-indicator {
    &__avatars {
      .str-chat__avatar {
        border-color: #282a2d;
      }
    }
    &__dots {
      background: rgba(white, 0.05);
    }
  }
}

@keyframes wave {
  0%,
  60%,
  100% {
    transform: initial;
  }

  30% {
    transform: translateY(-8px);
  }
}
.str-chat__tooltip {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  display: flex;
  background: #000;
  border-radius: 4px;
  padding: 3px 7px;
  color: white;
  font-size: 11px;
  max-width: 300px;

  button {
    outline: none;
    outline: 0;
    background: none;
    color: #006cff;
    font-size: 11px;
    font-family: $second-font;
    border: none;
  }

  a {
    color: #006cff;
    text-decoration: none;
  }

  &::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 5px;
    width: 5px;
    height: 5px;
    background: #000;
    transform: rotate(45deg);
  }
}
