.label {
  width: 100%;
}

.map {
  position: relative;
  height: 600px;
}

/**
* This will give the map an (almost) correct width for A4 paper before calling print.
* Since it has @media only screen it will still scale to fit the page,
* but the initial fitBounds will not depend on the PDF-service's browser viewport
* Ideally, the browser's viewport would match the pages aspect ratio, as
* geometries could still be cut off for extremely narrow pages, and would have a lot of
* space on the right side for a landscape print, but for all "normal" portrait page formats
* this should work well.
* Additionally, for very wide pages the map tiles on the far right will not have a chance to
* load before the page prints, but you should at least see the relevant area.
**/
@media only screen {
  .print {
    width: 670px;
  }
}
/**
* This will give the map approximately the same aspect ratio in the PDF as it is shown on a desktop screen
*/
.print {
  height: 470px;
}

/* We do not want the map to look faded in PDF, so using @media only screen */
@media only screen {
  .map-read-only :global(.leaflet-tile-pane) {
    opacity: 0.5;
  }
}

/* In PDF we should show attribution with hyperlinks printed out */
@media print {
  .map {
    /*
    * Workaround, tool-tips become off-center due to font-size reduction in PDF @see shared.css
    * If we get rid of that, this is no longer needed.
    */
    font-size: 12px !important;
  }
  .map div:has(> :global(.leaflet-control-attribution)) {
    width: 100%;
  }
  .map :global(.leaflet-control-attribution) {
    background: white !important;
    width: 100%;
    padding: 0;
    text-align: center;
  }

  .map :global(.leaflet-control-attribution) a {
    color: black;
  }

  .map :global(.leaflet-control-attribution) a[href]:after {
    content: ' [' attr(href) ']';
  }
}

.map-error {
  border-color: var(--ds-color-danger-border-default);
  border-width: 2px;
  border-style: solid;
}

.footer {
  padding-top: 12px;
}

.empty-field {
  font-style: italic;
  font-size: 1rem;
  line-height: 1.6875;
}
