$otherBox-line: #cccccc;
$otherBox-bg: #ffffff;
$meBox-line: #cccccc;
$meBox-bg: #ffffff;

.chat-messages {
  padding: 30px 40px;
  display: flex;
  flex-direction: column;
}
.information-msg {
  /* width: 100%;
  height: 100%;
  text-align: center;
  background-color: rgba(0, 0, 0, 0.1);
  padding: 10px;
  margin: 10px 0;*/
}

.message-row {
  margin-bottom: 20px;
  .date-splitter {
    display: block;
    width: 100%;
    margin-bottom: 10px;
  }
  .chat-row {
    position: relative;
    display: flex;
    flex-direction: row;
    margin-left: 0;
    .profile-img {
      flex: 0 0 auto;
      img {
        border-radius: 50%;
      }
    }
  }
  &.me {
    .chat-row {
      flex-direction: row-reverse;
      margin-left: 0;
      margin-right: 0;
      .profile-info {
        flex-direction: row-reverse;
        display: flex;
        justify-content: flex-end;
      }
    }
  }

  .message-main {
    margin-left: 20px;
    margin-right: 10px;
    max-width: 80%;
    .chat-name {
      font-size: 12px;
      color: #333333;
      margin-bottom: 6px;
    }
    .bubble {
      border: 1px solid $otherBox-line;
      font-weight: 900;
      position: relative;
      background-color: $otherBox-bg;
      border-radius: 4px;
      box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
      word-break: break-all;
      word-wrap: break-word;
      &:before {
        content: '';
        width: 0px;
        height: 0px;
        position: absolute;
        border-left: 6px solid transparent;
        border-right: 6px solid $otherBox-line;
        border-top: 6px solid $otherBox-line;
        border-bottom: 6px solid transparent;
        left: -12px;
        top: 4px;
      }
      &:after {
        content: '';
        width: 0px;
        height: 0px;
        position: absolute;
        border-left: 6px solid transparent;
        border-right: 6px solid $otherBox-bg;
        border-top: 6px solid $otherBox-bg;
        border-bottom: 6px solid transparent;
        left: -10px;
        top: 5px;
      }
    }
  }
  .secondary-text {
    align-self: flex-end;
    font-size: 11px;
    color: #666666;
    word-wrap: break-word;
    white-space: nowrap;
  }
  &.me {
    .secondary-text {
      text-align: end;
    }
  }
  &.searched {
    color: red;
  }
}

.message-row.me > .bubble {
  border: 1px solid $meBox-line;
  background-color: $meBox-bg;
}
.message-row.me {
  .profile-img {
    display: none;
  }
  .chat-name {
    display: none;
  }
  .message-main {
    text-align: right;
    margin-left: 10px;
    margin-right: 20px;
    & .bubble:before {
      content: '';
      width: 0px;
      height: 0px;
      position: absolute;
      border-left: 6px solid $meBox-line;
      border-right: 6px solid transparent;
      border-top: 6px solid $meBox-line;
      border-bottom: 6px solid transparent;
      left: initial;
      right: -12px;
      top: 4px;
    }
    & .bubble:after {
      content: '';
      width: 0px;
      height: 0px;
      position: absolute;
      border-left: 6px solid $meBox-bg;
      border-right: 6px solid transparent;
      border-top: 6px solid $meBox-bg;
      border-bottom: 6px solid transparent;
      left: initial;
      right: -10px;
      top: 5px;
    }
  }
}
.bubble-main {
  word-wrap: break-word;
  white-space: pre-wrap;
  word-break: break-word;
}
.view-previous {
  display: flex;
  align-content: center;
  flex-flow: row;
  background-color: rgba(0, 0, 0, 0.4);
  padding: 4px 10px;
  color: #ffffff;
  border-radius: 100px;
  justify-content: center;
  margin: 10px 0 20px;
  button {
    height: 24px;
    line-height: 24px;
    width: 100%;
    svg {
      stroke: #ffffff;
      align-self: center;
    }
  }
}
.unRead-count {
  display: flex;
  justify-items: self-end;
  flex-flow: row;
  align-items: flex-end;
  .line {
    height: 1px;
    background-color: #cccccc;
    width: 40%;
    flex: 1 1 auto;
    margin-bottom: 10px;
    display: inline-flex;
  }
  .count {
    width: 260px;
    font-size: 13px;
    text-align: center;
    font-weight: 600;
  }
}