* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html, body {
  height: 100%;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
}
#map {
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
}
#embed-button {
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 1000;
  background: #1d70b8;
  padding: 8px 12px;
  box-shadow: 0 2px 0 #003078;
  cursor: pointer;
  font-family: "GDS Transport", arial, sans-serif;
  font-size: 16px;
  line-height: 1.1875;
  font-weight: 400;
  color: #ffffff;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
#embed-button:hover {
  background: #003078;
}
#embed-button:focus {
  outline: 3px solid #ffdd00;
  outline-offset: 0;
  background: #003078;
}
#embed-modal {
  display: none;
  position: absolute;
  bottom: 60px;
  left: 10px;
  z-index: 1001;
  background: #ffffff;
  padding: 20px;
  border: 1px solid #b1b4b6;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  width: 400px;
  max-width: calc(100vw - 40px);
  font-family: "GDS Transport", arial, sans-serif;
}
#embed-modal.show {
  display: block;
}
#embed-modal h3 {
  margin: 0 0 15px 0;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 700;
  color: #0b0c0c;
}
#embed-modal p {
  margin: 0 0 15px 0;
  font-size: 16px;
  line-height: 1.25;
  color: #0b0c0c;
}
#embed-code {
  width: 100%;
  height: 100px;
  padding: 5px;
  font-family: monospace;
  font-size: 14px;
  border: 2px solid #0b0c0c;
  resize: vertical;
  margin-bottom: 20px;
  box-sizing: border-box;
}
#embed-code:focus {
  outline: 3px solid #ffdd00;
  outline-offset: 0;
}
#copy-button {
  background: #00703c;
  color: #ffffff;
  border: none;
  padding: 8px 10px 7px;
  cursor: pointer;
  font-family: "GDS Transport", arial, sans-serif;
  font-size: 16px;
  line-height: 1.1875;
  font-weight: 400;
  box-shadow: 0 2px 0 #002d18;
  text-decoration: none;
  display: inline-block;
}
#copy-button:hover {
  background: #005a30;
}
#copy-button:focus {
  outline: 3px solid #ffdd00;
  outline-offset: 0;
  background: #005a30;
}
#close-modal {
  background: #f3f2f1;
  color: #0b0c0c;
  border: 2px solid transparent;
  padding: 8px 10px 7px;
  cursor: pointer;
  font-family: "GDS Transport", arial, sans-serif;
  font-size: 16px;
  line-height: 1.1875;
  font-weight: 400;
  box-shadow: 0 2px 0 #929191;
  text-decoration: none;
  display: inline-block;
  margin-left: 10px;
}
#close-modal:hover {
  background: #dbdad9;
}
#close-modal:focus {
  outline: 3px solid #ffdd00;
  outline-offset: 0;
  background: #dbdad9;
}
/* Mobile responsive embed modal */
@media (max-width: 640px) {
  #embed-modal {
    padding: 12px;
    width: auto;
    max-width: calc(100vw - 20px);
    right: 10px;
    left: 10px;
    bottom: 50px;
  }
  #embed-modal h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
  }
  #embed-modal p {
    margin: 0 0 10px 0;
    font-size: 14px;
  }
  #embed-code {
    height: 80px;
    font-size: 12px;
    margin-bottom: 12px;
    padding: 4px;
  }
  #copy-button,
  #close-modal {
    padding: 6px 8px 5px;
    font-size: 14px;
    margin-left: 0;
  }
  #close-modal {
    margin-left: 8px;
  }
}
@media (max-width: 480px) {
  #embed-modal {
    padding: 10px;
    bottom: 45px;
  }
  #embed-modal h3 {
    font-size: 16px;
    margin: 0 0 8px 0;
  }
  #embed-modal p {
    font-size: 13px;
    margin: 0 0 8px 0;
  }
  #embed-code {
    height: 70px;
    font-size: 11px;
    margin-bottom: 10px;
  }
  #copy-button,
  #close-modal {
    padding: 5px 7px 4px;
    font-size: 13px;
  }
  #embed-modal > div {
    display: flex;
    gap: 8px;
  }
}
@media (max-width: 360px) {
  #copy-button span,
  #close-modal span {
    font-size: 12px;
  }
}
/* MapLibre custom controls */
.maplibregl-ctrl-info {
  background: rgba(255, 255, 255, 0.95);
  padding: 12px 15px;
  max-width: 600px;
  width: auto;
  font-family: "GDS Transport", arial, sans-serif;
  border-radius: 4px;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  gap: 15px;
}
.maplibregl-ctrl-info.collapsed {
  padding: 8px 12px;
  cursor: pointer;
  gap: 8px;
}
.maplibregl-ctrl-info.collapsed:hover {
  background: rgba(255, 255, 255, 1);
}
.maplibregl-ctrl-info img {
  height: 50px;
  width: 50px;
  flex-shrink: 0;
}
.maplibregl-ctrl-info.collapsed img {
  height: 30px;
  width: 30px;
}
.maplibregl-ctrl-info-content {
  flex: 1;
  min-width: 0;
}
.maplibregl-ctrl-info.collapsed .maplibregl-ctrl-info-content h2,
.maplibregl-ctrl-info.collapsed .maplibregl-ctrl-info-content p {
  display: none;
}
.maplibregl-ctrl-info-toggle {
  display: none;
  font-size: 16px;
  font-weight: 700;
  color: #0b0c0c;
  white-space: nowrap;
  align-items: center;
  gap: 6px;
}
.maplibregl-ctrl-info.collapsed .maplibregl-ctrl-info-toggle {
  display: flex;
}
.maplibregl-ctrl-info-chevron {
  display: none;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.maplibregl-ctrl-info:not(.collapsed) .maplibregl-ctrl-info-chevron.chevron-up {
  display: block;
}
.maplibregl-ctrl-info.collapsed .maplibregl-ctrl-info-chevron.chevron-down {
  display: block;
}
.maplibregl-ctrl-info h2 {
  margin: 0 0 6px 0;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 700;
  color: #0b0c0c;
}
.maplibregl-ctrl-info h2 a {
  color: #0b0c0c;
  text-decoration: none;
}
.maplibregl-ctrl-info h2 a:hover {
  text-decoration: underline;
}
.maplibregl-ctrl-info p {
  margin: 0;
  font-size: 14px;
  line-height: 1.3;
  color: #0b0c0c;
}
.maplibregl-ctrl-logo {
  background: rgba(255, 255, 255, 0.9);
  padding: 8px;
  border-radius: 4px;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
}
.maplibregl-ctrl-logo img {
  display: block;
  height: 40px;
  width: auto;
}
.maplibregl-ctrl-logo a {
  display: block;
  line-height: 0;
}
/* Position controls horizontally */
.maplibregl-ctrl-top-left {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  margin: 10px;
}
.maplibregl-ctrl-top-left .maplibregl-ctrl {
  margin: 0 !important;
}
@media (max-width: 768px) {
  .maplibregl-ctrl-info {
    max-width: calc(100vw - 120px);
  }
}
@media (max-width: 640px) {
  .maplibregl-ctrl-info {
    cursor: pointer;
    max-width: calc(100vw - 80px);
  }
  .maplibregl-ctrl-info:not(.collapsed) {
    width: auto;
    padding: 12px 15px;
  }
  .maplibregl-ctrl-info:not(.collapsed) img {
    height: 40px;
    width: 40px;
  }
  .maplibregl-ctrl-info:hover {
    background: rgba(255, 255, 255, 1);
  }
}

/* Cookie consent banner for map embed */
#map-cookie-banner {
  display: none;
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1002;
  background: #f3f2f1;
  border: 1px solid #b1b4b6;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  padding: 10px 14px;
  font-family: GDS Transport, arial, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  color: #0b0c0c;
  max-width: 320px;
  justify-content: center;
}
#map-cookie-banner.show {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#map-cookie-banner p {
  margin: 0;
  font-size: 13px;
}
#map-cookie-banner .cookie-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  justify-content: center;
}
#map-cookie-banner button {
  font-family: "GDS Transport", arial, sans-serif;
  font-size: 13px;
  line-height: 1;
  font-weight: 400;
  padding: 6px 10px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
#map-cookie-banner button:focus {
  outline: 3px solid #ffdd00;
  outline-offset: 0;
}
#map-cookie-accept {
  background: #00703c;
  color: #fff;
  box-shadow: 0 2px 0 #002d18;
}
#map-cookie-accept:hover {
  background: #005a30;
}
#map-cookie-reject {
  background: #f3f2f1;
  color: #0b0c0c;
  border: 1px solid #0b0c0c;
}
#map-cookie-reject:hover {
  background: #dbdad9;
}
@media (max-width: 480px) {
  #map-cookie-banner {
    padding: 8px 10px;
    font-size: 12px;
  }
  #map-cookie-banner p {
    font-size: 12px;
    min-width: 120px;
  }
  #map-cookie-banner button {
    font-size: 12px;
    padding: 5px 8px;
  }
}

/* Legend */
#map-legend {
  position: absolute;
  bottom: 50px;
  right: 10px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 4px;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
  padding: 12px 14px;
  font-family: "GDS Transport", arial, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  color: #0b0c0c;
  max-width: 280px;
}
#map-legend h4 {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 700;
}
#map-legend ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
#map-legend li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12px;
  line-height: 1.3;
  cursor: pointer;
}
#map-legend li:last-child {
  margin-bottom: 0;
}
#map-legend li.legend-disabled {
  opacity: 0.4;
}
.legend-swatch {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.legend-circle {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2.5px solid;
  box-sizing: border-box;
}
.legend-circle-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2.5px solid;
  box-sizing: border-box;
  position: relative;
}
.legend-circle-dot::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.legend-square {
  width: 13px;
  height: 13px;
  border: 2.5px solid;
  box-sizing: border-box;
}
.legend-filled {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-sizing: border-box;
}
.legend-triangle {
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 12px solid;
}
.legend-divider {
  border: 0;
  border-top: 1px solid #b1b4b6;
  margin: 8px 0;
}
#legend-toggle {
  display: none;
  position: absolute;
  bottom: 50px;
  right: 10px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  /* border-radius: 4px; */
  box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
  border: none;
  padding: 8px 12px;
  font-family: "GDS Transport", arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  color: #0b0c0c;
  align-items: center;
  gap: 6px;
}
#legend-toggle:hover {
  background: rgba(255, 255, 255, 1);
}
#legend-toggle:focus {
  outline: 3px solid #ffdd00;
  outline-offset: 0;
}
@media (max-width: 640px) {
  #map-legend {
    display: none;
    bottom: 96px;
    right: 10px;
    max-width: 240px;
    padding: 10px 12px;
  }
  #map-legend.show {
    display: block;
  }
  #legend-toggle {
    display: flex;
  }
}
/* Target the text container inside the attribution */
.maplibregl-ctrl-attrib-inner {
    font-family: "GDS Transport", arial, sans-serif;
    max-width: calc(100vw - 180px); /* Responsive: leaves space for embed button and margins */
    min-width: 80px;                /* Optional: prevent it from getting too small */
    overflow-x: auto;          /* Enable horizontal scrolling */
    white-space: nowrap;       /* Keep all text on one single line */
    display: inline-block;     /* Ensure it respects the width/overflow */
    vertical-align: middle;    /* Align nicely with the 'i' button */
    scrollbar-width: thin;     /* Optional: Makes the scrollbar less chunky in Firefox */
}

/* Optional: Custom scrollbar styling for Chrome/Safari/Edge */
.maplibregl-ctrl-attrib-inner::-webkit-scrollbar {
    height: 4px;
}
.maplibregl-ctrl-attrib-inner::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}