/* Host container for positioning */
.entry-content.single-content .mm-pin-host{
  position: relative !important;
  overflow: visible !important;
}

/* Kadence gallery wrappers sometimes clip overlays */
.entry-content.single-content .wp-block-kadence-advancedgallery,
.entry-content.single-content .kadence-blocks-gallery-item,
.entry-content.single-content .kadence-blocks-gallery-item-inner,
.entry-content.single-content .kb-gal-image-radius{
  overflow: visible !important;
}

/* ✅ Gallery host is tight to image, normal host may be full-width.
   For normal images we use --mm-img-w to place button on actual photo edge. */
.entry-content.single-content .mm-pin-host .mm-pin-share{
  position: absolute !important;
  top: 12px;

  /* Normal images (figure): align to image edge even if figure is full width */
  right: calc((100% - var(--mm-img-w, 100%)) / 2 + 12px);

  z-index: 999999 !important;
  pointer-events: auto;
}

/* Gallery: simpler right alignment */
.entry-content.single-content .kb-gallery-image-contain.mm-pin-host .mm-pin-share{
  right: 12px !important;
}

/* Pinterest button */
.entry-content.single-content .mm-pin-btn{
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: #E60023;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  box-shadow: 0 8px 18px rgba(0,0,0,.25);
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

.entry-content.single-content .mm-pin-btn svg{
  width: 26px;
  height: 26px;
  display: block;
  fill: #fff;
}

.entry-content.single-content .mm-pin-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0,0,0,.30);
  filter: brightness(1.02);
}

@media (max-width: 480px){
  .entry-content.single-content .mm-pin-host .mm-pin-share{
    top: 8px;
    right: calc((100% - var(--mm-img-w, 100%)) / 2 + 8px);
  }
  .entry-content.single-content .kb-gallery-image-contain.mm-pin-host .mm-pin-share{
    right: 8px !important;
  }
  .entry-content.single-content .mm-pin-btn{ width: 44px; height: 44px; }
  .entry-content.single-content .mm-pin-btn svg{ width: 24px; height: 24px; }
}
