.chat-container {

  margin: 50px auto;
  padding: 20px;
  background-color: whitesmoke;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: flex-start;

  .narration {
    font-style: italic;
    color: #3a413a;
    margin: 10px;
    text-align: center;
    background-color: #f8f9fa;
    padding: 5px 10px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    width: 100%;
  }

  .chat-bubble {
    display: flex;
    margin: 10px 0;
    align-items: flex-left;
    position: relative;
    width: 100%;

    .character-image {
      font-size: 30px;
      width: 50px;
      height: 50px;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-right: 10px;
    }

    .bubble {

      width: 100%;
      padding: 10px;
      border-radius: 15px;
      font-size: 1em;
      position: relative;

      /*
       * ---------------------------------------------------------
       * LEGACY DEFAULT
       * ---------------------------------------------------------
       *
       * Old conversations don't have .ch-color-*.
       * They therefore continue to use:
       *
       * left  = yellow
       * right = blue
       */

      &:not(.right) {
        --bubble-background-color: #FFF9CC;

        background-color: var(--bubble-background-color);

        &::before {
          content: '';

          position: absolute;
          top: 10px;
          left: -18px;

          border-width: 10px;
          border-style: solid;

          border-color:
            transparent
            var(--bubble-background-color)
            transparent
            transparent;
        }
      }

      &.right {
        --bubble-background-color: #D9F2FD;

        background-color: var(--bubble-background-color);

        text-align: left;

        &::before {
          content: '';

          position: absolute;
          top: 10px;
          left: -18px;

          border-width: 10px;
          border-style: solid;

          border-color:
            transparent
            var(--bubble-background-color)
            transparent
            transparent;
        }
      }
    }
  }

  .character-name {
    font-weight: bold;
    font-size: 1em;
    margin-bottom: 5px;
  }
}