.messageItem {
  padding: 24px 0;
  .messageItemSection {
    display: inline-block;
  }
  .messageItemSectionLeft {
    width: 80%;
  }
  .messageItemContent {
    display: inline-flex;
    gap: 20px;
    width: 100%;
    min-width: 0;
  }
  .messageItemContentReverse {
    flex-direction: row-reverse;
  }

  .messageTextBase() {
    padding: 6px 10px;
    border-radius: 8px;
    & > p {
      margin: 0;
    }
  }
  .messageText {
    .chunkText();
    .messageTextBase();
    word-break: break-word;

    // RTL Support
    &[dir='rtl'] {
      text-align: right;
    }
  }
  .messageTextDark {
    .chunkText();
    .messageTextBase();
    word-break: break-word;
    :global(details.think) {
      color: rgb(166, 166, 166);
      border-inline-start-color: rgb(78, 78, 86);

      summary {
        color: rgb(140, 140, 140);
        &:hover {
          color: rgb(180, 180, 180);
        }
      }
    }
    :global(details.retrieving) {
      color: rgb(166, 166, 166);
      border-inline-start-color: rgb(60, 100, 90);

      summary {
        color: rgb(120, 170, 155);
        &:hover {
          color: rgb(150, 200, 185);
        }
      }
    }

    // RTL Support
    &[dir='rtl'] {
      text-align: right;

      :global(details.think) {
        border-inline-start-color: transparent;
        border-inline-end-color: rgb(78, 78, 86);
        border-inline-end-width: 2px;
        border-inline-end-style: solid;
        border-inline-start: none;
        padding-inline-start: 0;
        padding-inline-end: 10px;
      }
      :global(details.retrieving) {
        border-inline-start-color: transparent;
        border-inline-end-color: rgb(60, 100, 90);
        border-inline-end-width: 2px;
        border-inline-end-style: solid;
        border-inline-start: none;
        padding-inline-start: 0;
        padding-inline-end: 10px;
      }
    }
  }

  .messageUserText {
    .chunkText();
    .messageTextBase();
    word-break: break-word;
    text-align: justify;

    // RTL Support
    &[dir='rtl'] {
      text-align: right;
    }
  }
  .messageEmpty {
    width: 300px;
  }

  .thumbnailImg {
    max-width: 20px;
  }
}

.messageItemLeft {
  text-align: start;
}

.messageItemRight {
  text-align: end;
}
