/* Hide redundant upload link text when an inline image preview is shown.
   Only targets image file extensions to avoid hiding PDF/ZIP/doc links.
   Also hides the preceding <br> to prevent blank lines in text+image messages. */
.message_content p:has(+ .message_inline_image) > a[href*='/user_uploads/']:is(
  [href$='.jpg' i],[href$='.jpeg' i],[href$='.jpe' i],
  [href$='.png' i],[href$='.gif' i],[href$='.webp' i],[href$='.bmp' i]
) {
  display: none;
}
.message_content p:has(+ .message_inline_image) > br:has(+ a[href*='/user_uploads/']:is(
  [href$='.jpg' i],[href$='.jpeg' i],[href$='.jpe' i],
  [href$='.png' i],[href$='.gif' i],[href$='.webp' i],[href$='.bmp' i]
)) {
  display: none;
}
