#map {
    width: 100%;
    height: 600px;
}

/*pop up styling*/
.gb-ol-popup {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  position: absolute !important;
  top: 0;
  right: 0;
  width: 320px;
  max-height: 90vh;
  font-family: Arial, sans-serif;
  font-size: 13px;
  z-index: 1000;
  overflow-y: auto;
}

.gb-ol-popup .popup-header {
  background: #f5f5f5;
  border-bottom: 1px solid #ddd;
  border-radius: 8px 8px 0 0;
  padding: 4px 8px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gb-ol-popup .popup-header .popup-close {
  background: none;
  border: none;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  color: #666;
}

.gb-ol-popup .popup-header .popup-close:hover {
  color: #000;
}

.gb-ol-popup .popup-content {
  padding: 6px 8px;
}

.gb-ol-popup table {
  border-collapse: collapse;
  width: 100%;
}

.gb-ol-popup th {
  text-align: right;
  color: #333;
  padding: 1px 6px 1px 0;
  font-weight: 600;
  white-space: nowrap;
  vertical-align: top;
}

.gb-ol-popup td {
  color: #555;
  padding: 1px 0;
  word-break: break-word;
  width: 60%;
}

.gb-ol-popup .popup-tip {
  display: none;
}
/*end of popup styling*/

/*hover tooltip styling*/
.hover-tooltip {
  background: white;
  color: #333;
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid #ccc;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  font-family: Arial, sans-serif;
  font-size: 13px;
  position: absolute;
  pointer-events: none;
  z-index: 1001;
  transform: translate(-50%, -120%);
  white-space: nowrap;
}

.hover-tooltip::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid white;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.1));
}
/*end of hover tooltip styling*/


#map .ol-control.layer-switcher {
    top: 3.5em !important;
    left: auto;
    right: 0.5em;
    transition: right 0.3s ease;
}

#map .ol-control.layer-switcher.sidebar-open {
    right: 330px;
}

.ol-home {
    top: 0.5em;
    left: auto;
    right: 0.5em;
    transition: right 0.3s ease;
}

.ol-home.sidebar-open {
    right: 330px;
}

.ol-control.ol-home button {
  background-color: #fff;
  border: none;
  color: #333;
  font-size: 1.4em;
  font-weight: 700;
  height: 38px;
  width: 38px;
  margin: 0;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: background 0.2s ease;
}

.ol-control.ol-home button:hover,
.ol-control.ol-home button:focus {
    background-color: rgba(255,255,255,.6);
    color: #000;
}

/* Map Overlay Components Styling */

.legend {
    position: absolute;
    top: 75px;
    left: 15px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    min-width: 150px;
    z-index: 1000;
    font-family: Arial, sans-serif;
    font-size: 12px;
}

.legend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    cursor: pointer;
    user-select: none;
    border-radius: 5px 5px 0 0;
}

.legend-header:hover {
    background: rgba(240, 240, 240, 0.8);
}

.legend h3 {
    margin: 0;
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

.legend-toggle {
    font-size: 16px;
    font-weight: bold;
    color: #666;
    line-height: 1;
}

.legend-content {
    padding: 0 10px 10px 10px;
    max-height: 450px;
    overflow-y: auto;
    transition: max-height 0.3s ease-out;
}

.legend-content.collapsed {
    max-height: 0;
    padding: 0 10px;
    overflow: hidden;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.legend-item:last-child {
    margin-bottom: 0;
}

.legend-symbol {
    width: 20px;
    height: 16px;
    margin-right: 8px;
    border: 1px solid #333;
    border-radius: 2px;
    display: inline-block;
    flex-shrink: 0;
}

.legend-symbol.point {
    border-radius: 50%;
    width: 12px;
    height: 12px;
    margin-right: 10px;
}

.legend-label {
    flex-grow: 1;
    color: #333;
}

