/* Keep Gutenberg's column widths; reserve a separate row for the actions. */
figure.wp-block-image.fm-share-figure {
  display:flex!important; flex-direction:column!important; align-items:stretch!important;
  gap:0!important; overflow:hidden; border-radius:12px; background:#fff;
  box-shadow:0 0 0 1px rgba(20,32,26,.08),0 4px 16px rgba(20,32,26,.04);
}
figure.wp-block-image.fm-share-figure > img,
figure.wp-block-image.fm-share-figure > a { display:block; width:100%; flex:0 0 auto!important; }
figure.wp-block-image.fm-share-figure > img,
figure.wp-block-image.fm-share-figure > a > img { border-radius:0!important; height:auto!important; width:100%; vertical-align:middle; }
figure.wp-block-image.fm-share-figure > figcaption {
  position:static!important; margin:0!important; padding:10px 14px!important;
  background:#fff!important; color:#56625c!important; box-sizing:border-box;
}
.fm-share-figure .fm-share-tools {
  position:static; display:flex; flex-wrap:wrap; align-items:center; gap:10px;
  padding:12px; margin-top:auto; box-sizing:border-box; width:100%; background:#fff;
  border-top:1px solid #eef1ee;
}
.fm-share-figure .fm-share-tools button {
  appearance:none; display:flex; flex:1 1 110px; justify-content:center; align-items:center;
  gap:8px; min-height:44px; margin:0; padding:10px 12px; border:1px solid #137845;
  border-radius:8px; background:#137845; color:#fff; box-shadow:none;
  font:600 14px/1.3 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  text-transform:none; letter-spacing:0; cursor:pointer; transition:background .15s ease;
}
.fm-share-figure .fm-share-tools button:hover { background:#0d6237; }
.fm-share-figure .fm-share-tools button:disabled { opacity:.65; cursor:wait; }
.fm-share-figure .fm-share-tools svg { display:block; width:20px; height:20px; flex-shrink:0; }
.fm-share-figure .fm-share-tools a {
  display:flex; align-items:center; justify-content:center; flex:0 0 44px; min-height:44px;
  box-sizing:border-box; border:1px solid #dfe5e1; border-radius:8px; background:#f8faf8;
  color:#4a5950; text-decoration:none; box-shadow:none; margin:0; padding:0;
}
.fm-share-figure .fm-share-tools a:hover { background:#edf3ee; color:#137845; }
.fm-share-figure .fm-share-tools button:focus-visible,
.fm-share-figure .fm-share-tools a:focus-visible { outline:3px solid #77b798; outline-offset:3px; }
.fm-share-figure .fm-share-tools small {
  display:block; flex:1 0 100%; margin:0; padding:0; background:none; color:#647169;
  font:400 12px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
.fm-share-figure .fm-share-tools small:empty { display:none; }
/* Scoped reset: gallery/theme link sizing must not stretch the action controls. */
figure.fm-share-figure .fm-share-tools {
  display:grid!important; grid-template-columns:minmax(0,1fr)!important;
  gap:10px!important; padding:14px!important; height:auto!important;
  min-height:0!important; flex:0 0 auto!important; align-items:stretch!important;
}
figure.fm-share-figure .fm-share-tools > button,
figure.fm-share-figure .fm-share-tools > a {
  display:flex!important; position:static!important; float:none!important;
  flex:none!important; align-self:stretch!important; align-items:center!important;
  justify-content:center!important; gap:9px!important;
  box-sizing:border-box!important; width:100%!important; max-width:none!important;
  height:auto!important; min-height:48px!important; max-height:none!important;
  aspect-ratio:auto!important; margin:0!important; padding:12px 14px!important;
  border:0!important; border-radius:9px!important; box-shadow:none!important;
  color:#fff!important; font:600 14px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  text-decoration:none!important; text-transform:none!important; letter-spacing:0!important;
  text-align:center!important; white-space:normal!important; cursor:pointer!important;
}
figure.fm-share-figure .fm-share-tools > button { background:#137845!important; }
figure.fm-share-figure .fm-share-tools > button:hover { background:#0e6338!important; }
figure.fm-share-figure .fm-share-tools > a { background:#663bb5!important; }
figure.fm-share-figure .fm-share-tools > a:hover { background:#522b99!important; }
figure.fm-share-figure .fm-share-tools > button::before,
figure.fm-share-figure .fm-share-tools > button::after,
figure.fm-share-figure .fm-share-tools > a::before,
figure.fm-share-figure .fm-share-tools > a::after { content:none!important; }
figure.fm-share-figure .fm-share-tools svg {
  width:20px!important; height:20px!important; min-width:20px!important;
  max-width:20px!important; flex:0 0 20px!important; margin:0!important;
}
figure.fm-share-figure .fm-share-tools span {
  display:block!important; color:inherit!important; font:inherit!important;
}
figure.fm-share-figure .fm-share-tools small { width:100%!important; }
figure.wp-block-video.fm-share-figure {
  display:flex!important; flex-direction:column!important; align-items:stretch!important;
  gap:0!important; overflow:hidden; border-radius:12px; background:#fff;
  box-shadow:0 0 0 1px rgba(20,32,26,.08),0 4px 16px rgba(20,32,26,.04);
}
figure.wp-block-video.fm-share-figure > video {
  display:block; width:100%; height:auto; margin:0; flex:0 0 auto;
}
figure.wp-block-video.fm-share-figure > figcaption {
  position:static!important; margin:0!important; padding:10px 14px!important;
  background:#fff!important; color:#56625c!important;
}
