html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
}

#map {
  width: 100%;
  height: calc(100vh - 56px - 28px);
}

/* Nav legend dots */
.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  vertical-align: middle;
}

#nav1 .nav-link {
  font-size: .78rem;
  white-space: nowrap;
}

/* Popup */
.ol-popup {
  position: absolute;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  padding: 12px 14px 10px;
  min-width: 220px;
  max-width: 320px;
  font-size: .85rem;
  bottom: 12px;
  left: -150px;
  display: none;
}
.ol-popup:after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 150px;
  border-width: 8px 8px 0;
  border-style: solid;
  border-color: #fff transparent transparent;
}
.ol-popup-closer {
  position: absolute;
  top: 4px;
  right: 8px;
  text-decoration: none;
  font-size: 1.2rem;
  color: #888;
}
.ol-popup-closer:after {
  content: '\00d7';
}
.popup-title {
  font-weight: bold;
  margin-bottom: 6px;
  padding-right: 16px;
  line-height: 1.3;
}
.popup-content table {
  width: 100%;
  border-collapse: collapse;
}
.popup-content th {
  color: #666;
  font-weight: normal;
  padding: 2px 8px 2px 0;
  white-space: nowrap;
  vertical-align: top;
  width: 5em;
}
.popup-content td {
  padding: 2px 0;
  word-break: break-all;
}

/* Attribution footer */
#attribution-bar {
  height: 28px;
  line-height: 28px;
  background: #f5f5f5;
  font-size: .7rem;
  color: #555;
  padding: 0 8px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
#attribution-bar a {
  color: #1565C0;
}

/* Responsive: smaller nav on mobile */
@media (max-width: 991px) {
  #nav1 .navbar-nav {
    gap: 0 !important;
  }
  #nav1 .nav-link {
    font-size: .72rem;
    padding: 2px 4px !important;
  }
  .ol-popup {
    min-width: 180px;
    max-width: 260px;
    left: -130px;
  }
  .ol-popup:after {
    left: 130px;
  }
}
