/* yanxin:im-text-select-hotpatch v3 — PC/移动端气泡文字可选中复制 */
.yx-wx-text-body {
  -webkit-tap-highlight-color: transparent;
}

/* 直接覆盖 IM 气泡文本，不依赖 JS 打标 */
.im-shell .im-bubble .im-bubble-text,
.im-shell .im-bubble-text,
.im-shell .im-bubble-text--rich,
.im-shell .im-rich-text-body,
.im-shell .im-msg-plain,
.im-shell .im-msg-rich,
.im-shell .message-bubble__body,
.im-shell .message-bubble__plain,
.im-shell .message-bubble__rich,
.im-shell .message-bubble-inline__body,
.im-shell .yx-quote-body-text {
  user-select: text !important;
  -webkit-user-select: text !important;
  cursor: text;
}

@media (pointer: coarse) {
  .yx-wx-text-body:not(.yx-wx-text-selectable) {
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
  }
}

.yx-wx-text-body.yx-wx-text-selectable {
  user-select: text !important;
  -webkit-user-select: text !important;
  -webkit-touch-callout: default;
  cursor: text;
}

@media (pointer: fine) {
  .yx-wx-text-body,
  .im-shell .im-bubble .im-bubble-text,
  .im-shell .im-bubble-text,
  .im-shell .im-bubble-text--rich,
  .im-shell .im-rich-text-body,
  .im-shell .im-msg-plain,
  .im-shell .im-msg-rich,
  .im-shell .message-bubble__body,
  .im-shell .message-bubble__plain,
  .im-shell .message-bubble__rich {
    user-select: text !important;
    -webkit-user-select: text !important;
    cursor: text;
  }
}

.yx-wx-text-body .wx-link,
.yx-wx-text-body .im-msg-link {
  color: #576b95;
  text-decoration: none;
  word-break: break-all;
}

.im-msg-row.self .yx-wx-text-body .wx-link,
.im-msg-row.self .yx-wx-text-body .im-msg-link,
.im-bubble--self-wx .yx-wx-text-body .wx-link {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.yx-wx-text-body .wx-link:active,
.yx-wx-text-body .im-msg-link:active {
  opacity: 0.65;
}

.yx-wx-phone-sheet {
  position: fixed;
  inset: 0;
  z-index: 10120;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: rgba(0, 0, 0, 0.45);
  animation: yx-wx-sheet-fade 0.18s ease;
}

.yx-wx-phone-sheet__panel {
  background: #f7f7f7;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.yx-wx-phone-sheet__title {
  padding: 14px 16px 10px;
  text-align: center;
  font-size: 13px;
  color: #888;
  background: #fff;
  border-bottom: 1px solid #ececec;
}

.yx-wx-phone-sheet__btn {
  display: block;
  width: 100%;
  border: none;
  background: #fff;
  padding: 16px;
  font-size: 17px;
  color: #111;
  border-bottom: 1px solid #ececec;
}

.yx-wx-phone-sheet__btn--primary {
  color: #576b95;
}

.yx-wx-phone-sheet__btn--cancel {
  margin-top: 8px;
  color: #111;
}

@keyframes yx-wx-sheet-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
