.sc-message {
  margin: auto;
  padding: 0 0.5rem;
  display: flex;
  margin-bottom: 0.25rem;

  &:first-child {
    margin-top: 50%;
  }

  &.sent {
    flex-direction: row-reverse;

    .sc-message--content {
      justify-content: flex-end;

      .sc-message--avatar {
        display: none;
      }

      .sc-message--wrapper {
        align-items: flex-end;

        .sc-message--text {
          color: white;
          background-color: #4e8cff;
          word-wrap: break-word;
        }

        .sc-message--meta {
          flex-direction: row-reverse;
        }
      }
    }
  }

  .sc-message--content {
    display: flex;
    flex-direction: row;
    position: relative;
    max-width: calc(100% - 60px);
    width: auto;

    .sc-message--avatar {
      width: 32px;
      height: 32px;
      margin-right: 4px;
      margin-top: 2px;
      background-position: 0 0;
      flex-shrink: 0;
      background-size: cover;
      border-radius: 999px;
    }

    .sc-message--wrapper {
      display: flex;
      flex-direction: column;
      width: 100%;

      .sc-message--text {
        padding: 10px 20px;
        border-radius: 6px;
        font-weight: 300;
        font-size: .85rem;
        max-width: 190px;
        line-height: 1.2;
        position: relative;
        -webkit-font-smoothing: subpixel-antialiased;
        color: #263238;
        background-color: #f4f7f9;

        .sc-message--text-body {
          .sc-message--text-content {
            white-space: pre-wrap;
          }
        }

        code {
          font-family: "Courier New", Courier, monospace !important;
        }
      }

      .sc-message--meta {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        font-size: 0.65rem;
        margin-top: 4px;
        padding: 0 4px;
        width: 100%;
        height: 18px;
        box-sizing: border-box;
      }
    }
  }
}

@media (max-width: 450px) {
  .sc-message {
    width: 80%;
  }
}
