/* XCORE GHR RC2: image-only white-frame refinement.
   Deliberately DO NOT change video bubbles, video previews, PDFs, stickers, or wallpaper.
   Existing video frame sizing in ghr-video-frame.css remains authoritative. */
@supports selector(:has(*)) {
  /* Restrict the change to true image messages; exclude any bubble containing a video. */
  .app .chat .row .bubble.ghrVisualBubble:has(.mediaImageButton):not(:has(.ghrVideoPreview)) {
    box-sizing: border-box;
    width: max-content;
    max-width: min(78%, 440px);
    min-width: 0;
    padding: 4px;
    overflow: hidden;
  }
  .app .chat .row .bubble.ghrVisualBubble:has(.mediaImageButton):not(:has(.ghrVideoPreview)) .mediaImageButton {
    box-sizing: border-box;
    display: block;
    position: relative;
    width: max-content;
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
  }
  .app .chat .row .bubble.ghrVisualBubble:has(.mediaImageButton):not(:has(.ghrVideoPreview)) .mediaImage {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: min(62dvh, 530px);
    object-fit: contain;
  }
  @media (max-width:650px) {
    .app .chat .row .bubble.ghrVisualBubble:has(.mediaImageButton):not(:has(.ghrVideoPreview)) {
      max-width: min(79%,370px);
    }
  }
}
