/**
 * 社区正文 / 广场摘要里的自动识别 URL。
 * 全站链接默认墨色（forum-base / reset）；只有这类外链走蓝字。
 * WHY 蓝：功能色（可点外链），不是正文 token。
 */

#wpforo #wpforo-wrap .wpforo-post-content a.mytheme-wpf-autolink,
#wpforo #wpforo-wrap .wpforo-post-content a.wpforo-auto-embeded-link,
#wpforo #wpforo-wrap .mytheme-wpf-card__excerpt a.mytheme-wpf-autolink {
  position: relative;
  z-index: 1;
  display: inline;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  /* WHY：外链识别色，不是正文四档墨色 */
  color: #2563eb !important;
  font-weight: inherit !important;
  line-height: inherit;
  text-decoration: underline !important;
  text-underline-offset: 3px;
  word-break: break-all;
  overflow-wrap: anywhere;
  cursor: pointer;
}

/* 字外面一圈也算热区（DESIGN A4），不撑开行高 */
#wpforo #wpforo-wrap .wpforo-post-content a.mytheme-wpf-autolink::before,
#wpforo #wpforo-wrap .wpforo-post-content a.wpforo-auto-embeded-link::before,
#wpforo #wpforo-wrap .mytheme-wpf-card__excerpt a.mytheme-wpf-autolink::before {
  content: "";
  position: absolute;
  top: -8px;
  right: -6px;
  bottom: -8px;
  left: -6px;
}

#wpforo #wpforo-wrap .wpforo-post-content a.mytheme-wpf-autolink:hover,
#wpforo #wpforo-wrap .wpforo-post-content a.wpforo-auto-embeded-link:hover,
#wpforo #wpforo-wrap .mytheme-wpf-card__excerpt a.mytheme-wpf-autolink:hover,
#wpforo #wpforo-wrap .wpforo-post-content a.mytheme-wpf-autolink:focus-visible,
#wpforo #wpforo-wrap .wpforo-post-content a.wpforo-auto-embeded-link:focus-visible,
#wpforo #wpforo-wrap .mytheme-wpf-card__excerpt a.mytheme-wpf-autolink:focus-visible {
  color: #1d4ed8 !important;
}

#wpforo #wpforo-wrap .mytheme-wpf-card__excerpt a.mytheme-wpf-card__excerpt-text {
  color: inherit !important;
  text-decoration: none !important;
}

@media (max-width: 640px) {
  #wpforo #wpforo-wrap .wpforo-post-content a.mytheme-wpf-autolink::before,
  #wpforo #wpforo-wrap .wpforo-post-content a.wpforo-auto-embeded-link::before,
  #wpforo #wpforo-wrap .mytheme-wpf-card__excerpt a.mytheme-wpf-autolink::before {
    top: -12px;
    right: -8px;
    bottom: -12px;
    left: -8px;
  }
}
