/* Match the main map's lower-right button dimensions across submaps. */
#shareButton,
#downloadMapButton,
#resetViewButton,
#centerMapButton {
  width: 50px;
  height: 40px;
  padding: 0;
  box-sizing: border-box;
  border-radius: 6px;
  line-height: 40px;
}
#shareButton {
  position: fixed; bottom: 150px; right: 10px; z-index: 1002;
  width: 50px; height: 40px; padding: 0; background: #3498db;
  color: #fff; border: 0; border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3); cursor: pointer;
  font: bold 12px Arial, sans-serif;
}
#shareButton:hover { background: #2980b9; }
#shareButton:focus-visible { outline: 2px solid #17263a; outline-offset: 3px; }
#shareMenu {
  position: fixed; right: 68px; bottom: 150px; z-index: 11000;
  width: 240px; max-width: calc(100vw - 80px); padding: 12px;
  max-height: calc(100dvh - 170px); overflow-y: auto; box-sizing: border-box;
  background: #fff; border-radius: 8px;
  box-shadow: 0 3px 14px rgba(0,0,0,0.28);
  color: #17263a; font: 12px/1.35 Arial, sans-serif;
}
.shareHeading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
#closeShareButton { border: 0; background: none; color: #566574; cursor: pointer; padding: 0 4px; font-size: 22px; line-height: 1; }
#shareUrl { display: block; width: 100%; box-sizing: border-box; padding: 8px; margin: 0 0 8px; border: 1px solid #ccd5dc; border-radius: 5px; background: #f6f8fa; color: #405063; font: 11px Arial, sans-serif; }
#copyShareLink { display: block; width: 100%; padding: 10px; border: 0; border-radius: 5px; background: #3498db; color: #fff; cursor: pointer; font: bold 13px Arial, sans-serif; }
#copyShareLink:hover { background: #2980b9; }
#shareStatus { color: #285b39; font-size: 11px; margin: 6px 0; }
#shareStatus:empty { display: none; }
.shareSecondary { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; }
#nativeShareLink { padding: 2px 0; border: 0; background: none; color: #506274; font: 11px Arial, sans-serif; text-decoration: underline; cursor: pointer; }
#shareMenu :focus-visible { outline: 2px solid #3498db; outline-offset: 2px; }
#shareButton[hidden], #shareMenu[hidden], #nativeShareLink[hidden] { display: none; }
@media print { #shareButton, #shareMenu { display: none !important; } }
