.messageList {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.messageCard {
  background: #fff;
  border-radius: 12px;
  box-shadow:
    0 4px 16px rgba(22, 119, 255, 0.06),
    0 1.5px 4px rgba(0, 0, 0, 0.04);
  padding: 20px 12px 16px 12px;
  border: 1.5px solid #f0f3fa;
  transition:
    box-shadow 0.2s,
    border 0.2s,
    transform 0.2s;
  position: relative;

  &:hover {
    box-shadow:
      0 8px 24px rgba(22, 119, 255, 0.12),
      0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1.5px solid #1677ff;
    transform: translateY(-2px) scale(1.01);
  }
}

.messageHeader {
  margin-bottom: 12px;
}

.messageHeaderContent {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.messageTypeBtns {
  display: flex;
  gap: 5px;
  margin-bottom: 8px;
}

.messageTypeBtn {
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.messageContent {
  margin-top: 12px;
}

.removeBtn {
  color: #ff4d4f;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 0 8px;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;

  &:hover {
    color: #d9363e;
  }
}

.addMessageButtons {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.addMessageBtn {
  flex: 1;
  min-width: 120px;
}

.richTextInput {
  white-space: pre-wrap; // 保留换行和空格
  word-wrap: break-word; // 允许长单词换行

  &:focus {
    border-color: #1677ff;
    box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.1);
  }

  &:empty:before {
    content: attr(data-placeholder);
    color: #bfbfbf;
  }

  // @好友样式
  :global(.mention-friend) {
    color: #1677ff !important;
    font-weight: 600 !important;
    background: #e6f7ff !important;
    padding: 2px 4px !important;
    border-radius: 3px !important;
    display: inline !important;
  }
}

@media (max-width: 600px) {
  .addMessageButtons {
    flex-direction: column;

    .addMessageBtn {
      width: 100%;
      min-width: auto;
    }
  }

  .messageTypeBtns {
    flex-wrap: wrap;
  }
}
