/* Data & Peta uses the map edge; active picking uses only the return control. */
html body.hka-map-interaction-ready.hka-map-interaction-ready.hka-map-interaction-ready :is(#exportDataPanel,#coordPanel).hka-map-ready {
  position: fixed !important;
  inset: auto !important;
  left: auto !important;
  right: max(16px,env(safe-area-inset-right)) !important;
  top: max(76px,env(safe-area-inset-top)) !important;
  bottom: auto !important;
  transform: none !important;
  width: min(540px,calc(100vw - 32px)) !important;
  max-width: calc(100vw - 32px) !important;
  height: auto !important;
  max-height: calc(100dvh - 100px) !important;
  margin: 0 !important;
  overflow: auto !important;
}
html body.hka-map-interaction-ready :is(#exportDataPanel,#coordPanel,#dasMultiExportPanel,#riverMultiExportPanel,#gridMultiExportPanel).hka-map-panel-minimized {
  display: none !important;
  pointer-events: none !important;
}
/* The selection drawer is opened explicitly from the compact map control;
   it must not sit in front of the main menu when the user returns there. */
html body.hka-map-interaction-ready.export-data-open:not(.hka-map-controls-minimized) :is(#dasMultiExportPanel,#riverMultiExportPanel,#gridMultiExportPanel) {
  display: none !important;
  pointer-events: none !important;
}
html body.hka-map-interaction-ready .hka-map-minimize {
  flex: 0 0 auto;
  min-height: 36px !important;
  padding: 7px 10px !important;
  border: 1px solid #c6d9ed !important;
  border-radius: 7px !important;
  background: #f2f7fc !important;
  color: #17476d !important;
  font: 600 12px/1.4 Arial,sans-serif !important;
  cursor: pointer;
}
html body.hka-map-interaction-ready #exportDataPanel .export-data-header { flex-wrap: wrap; }
html body.hka-map-interaction-ready #coordPanel > .hka-map-minimize { float: right; margin-bottom: 10px; }
html body.hka-map-interaction-ready #hkaMapInteractionBar {
  position: fixed;
  z-index: 2147482710;
  top: max(76px,env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: calc(100vw - 24px);
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #cadbeb;
  border-radius: 10px;
  background: #fff;
  color: #183a5c;
  box-shadow: 0 4px 18px #15395124;
  font: 13px/1.4 Arial,sans-serif;
  pointer-events: auto;
}
html body.hka-map-interaction-ready #hkaMapInteractionBar[hidden],
html body.hka-map-interaction-ready #hkaMapInteractionBar button[hidden] { display: none !important; }
html body.hka-map-interaction-ready #hkaMapInteractionBar button {
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid #0e659d;
  border-radius: 7px;
  min-height: 38px;
  color: #fff;
  background: #0e659d;
  font: 600 12px/1.3 Arial,sans-serif;
  cursor: pointer;
}
html body.hka-map-interaction-ready #hkaMapInteractionBar #hkaMapCancelButton { color: #294c67; background: #fff; border-color: #c5d7e5; }
html body.hka-map-interaction-ready :is(#dasMultiExportPanel,#riverMultiExportPanel,#gridMultiExportPanel).hka-map-summary-open {
  position: fixed !important;
  z-index: 2147482705 !important;
  top: 144px !important;
  bottom: auto !important;
  right: 16px !important;
  width: min(370px,calc(100vw - 32px)) !important;
  max-height: calc(100dvh - 166px) !important;
  overflow: auto !important;
}
html body.hka-map-interaction-ready :is(.hka-map-minimize,#hkaMapInteractionBar button,#hkaCoordinatePickButton):focus-visible { outline: 3px solid #66a8ec; outline-offset: 2px; }
.hka-coordinate-picking, .hka-coordinate-picking .leaflet-interactive { cursor: crosshair !important; }
@media (max-width: 720px) {
  html body.hka-map-interaction-ready.hka-map-interaction-ready.hka-map-interaction-ready :is(#exportDataPanel,#coordPanel).hka-map-ready {
    top: auto !important;
    bottom: max(12px,env(safe-area-inset-bottom)) !important;
    right: 12px !important;
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    max-height: min(68dvh,calc(100dvh - 104px)) !important;
  }
  html body.hka-map-interaction-ready #hkaMapInteractionBar {
    top: auto;
    bottom: max(16px,env(safe-area-inset-bottom));
    gap: 6px;
    padding: 7px;
    max-width: calc(100vw - 20px);
    flex-wrap: wrap;
    justify-content: center;
  }
  html body.hka-map-interaction-ready #hkaMapInteractionStatus { flex: 1 1 100%; text-align: center; font-size: 11px; }
  html body.hka-map-interaction-ready #hkaMapInteractionBar button { min-height: 42px; padding: 7px 9px; }
  html body.hka-map-interaction-ready :is(#dasMultiExportPanel,#riverMultiExportPanel,#gridMultiExportPanel).hka-map-summary-open {
    top: auto !important;
    bottom: max(106px,calc(96px + env(safe-area-inset-bottom))) !important;
    right: 12px !important;
    width: calc(100vw - 24px) !important;
    max-height: 55dvh !important;
  }
}
