body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #f4f4f4;
  text-align: center;
}

h1 {
  margin-top: 10px;
  color: #333;
}

#map {
  width: 80%;
  height: 600px;
  margin: auto;
  border: 1px solid #ddd;
  border-radius: 8px;

    filter: grayscale(80%) brightness(1.2);
}

/* Popup Styling */
.ol-popup {
  position: absolute;
  background-color: white;
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.2);
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
  font-size: 14px;
  z-index: 200;
  width: 200px;
}

.ol-popup img {
  width: 100%;
  height: auto;
  border-radius: 5px;
}

@page {
  size: A3 landscape; /* Force A3 Landscape */
  margin: 20mm;
}

@media print {
  /* Custom header styling */
  #print-header {
      text-align: center;
      font-size: 24pt;
      font-weight: bold;
      margin-bottom: 10px;
  }

  /* Shrink the map slightly for better space usage */
  #map {
      height: 500px;
      width: 100%;
      border: 1px solid #000;
      page-break-before: avoid;
  }

  /* Hide live OpenLayers popups */
  .ol-overlaycontainer-stopevent {
      display: none !important;
  }

  /* Container for static popups with 4 columns */
  .print-popup-container {
      display: grid;
      grid-template-columns: repeat(4, 1fr); /* 4 columns */
      gap: 10px;
      page-break-inside: avoid;
  }

  /* Individual static popup styling */
  .print-popup {
      background-color: #fff;
      border: 1px solid #000;
      padding: 5px;
      box-sizing: border-box;
      page-break-inside: avoid;
      text-align: center;
  }

  /* Ensure images in popups resize nicely */
  .print-popup img {
      max-width: 100px;
      height: auto;
      display: block;
      margin: 0 auto 5px auto;
  }

  /* Tidy up heading sizes for print */
  h1 {
      font-size: 18pt;
      margin-bottom: 10px;
  }

  /* Ensure background and text stay clean for print */
  body {
      background: #fff;
      color: #000;
  }
}
