.kp-map-modal .modal-dialog {
  width: min(calc(100% - 2rem), 71.25rem);
  max-width: none;
  margin: 1rem auto;
}

.kp-map-modal .modal-content {
  height: min(86vh, 52rem);
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  overflow: hidden;
}

.kp-map-modal .modal-header,
.kp-map-modal .modal-footer {
  flex: 0 0 auto;
}

.kp-map-modal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.kp-map-modal .kp-map-canvas {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.kp-map-modal .leaflet-popup-content-wrapper {
  max-width: calc(100vw - 2rem);
}

@media (max-width: 575.98px) {
  .kp-map-modal .modal-dialog {
    width: calc(100% - 1rem);
    height: calc(100vh - 1rem);
    height: calc(100dvh - 1rem);
    margin: .5rem auto;
  }

  .kp-map-modal .modal-content {
    height: 100%;
    max-height: none;
  }

  .kp-map-modal .leaflet-popup-content-wrapper {
    max-width: calc(100vw - 1.5rem);
  }
}
