.tiptap.ProseMirror {
  min-height: 100%;
  height: fit-content;
  max-height: 120px;
  flex: 1 0 auto;
  word-wrap: break-word;
  word-break: break-word;
  white-space: pre-wrap;
  -webkit-user-select: text;
  user-select: text;
  overflow-y: auto;
  border: none !important;
  outline: none !important;
  display: flex;
  align-items: flex-start;

  &:disabled {
    cursor: not-allowed;
  }

  p {
      margin: 0;
      padding: 2px;
      font-style: normal;
      outline: none !important;
      min-height: 26px;   // 单行时给一个"居中用的空间"，多行时由内容撑开
      line-height: 26px;  // 单行行高，emoji 用 middle 时以此为参照 }
  }

  img {
      &.ProseMirror-selectednode {
          outline: 2px solid #68cef8;
      }
  }

  .message-emoji {
    display: inline-block;
    vertical-align: middle; // 真正的"垂直居中
    width: 20px;
    height: 20px;
    user-select: text;
    pointer-events: none;
  }
  .message-image {
    display: inline-block;
    max-width: 220px;
    user-select: text;
  }
  .message-file {
    display: inline-block;
    width: 180px;
    user-select: text;
  }
}



.tiptap p.is-editor-empty:first-child::before {
  color: #adb5bd;
  content: attr(data-placeholder);
  float: left;
  height: 0;
  pointer-events: none;
}

// Mention tag styles (Telegram-style)
.uikit-message-input-mention-tag {
  display: inline;
  padding: 2px 4px;
  margin: 0 2px;
  border-radius: 4px;
  background-color: rgba(0, 122, 255, 0.1);
  color: #007AFF;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;

  &:hover {
    background-color: rgba(0, 122, 255, 0.15);
  }

  // Selected state (when backspacing)
  &.ProseMirror-selectednode {
    background-color: rgba(0, 122, 255, 0.2);
  }
}

