#topbar {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  padding: 8px 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  font-family: sans-serif;
  font-size: 14px;
}

#map {
      height: 100vh;
      width: 100%;
    }
.curr_img{ 
/*   width: 150px;
  height: 150px; */
}
.curr_img img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      border-radius: 0.5rem;
    }
.info.legend {
  background: white;
  padding: 8px 12px;
  font: 14px/16px Arial, sans-serif;
  border-radius: 6px;
  box-shadow: 0 0 15px rgba(0,0,0,0.2);
}
.info.legend i {
  width: 14px;
  height: 14px;
  float: left;
  margin-right: 8px;
  opacity: 0.7;
  display: inline-block;
}

/*ai sidebar:*/
.sidebar {
  position: absolute;
  top: 80px;
  left: 10px;
  bottom: 10px;
  width: 300px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  padding: 10px;
  z-index: 1000;
  font-family: sans-serif;
  overflow-y: auto;
  transition: all 0.3s ease;
}

.sidebar h3 {
  margin-top: 0;
}

.detection-card {
  margin: 8px 0;
  padding: 8px;
  border-left: 4px solid #ff4e00;
  background: #f9f9f9;
  cursor: pointer;
  transition: background 0.2s;
}

.detection-card:hover {
  background: #eee;
}

#toggleSidebar {
  position: absolute;
  top: 8px;
  right: 8px;
  border: none;
  background: #eee;
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
  z-index: 1001;
}

.sidebar.collapsed {
  left: -270px;
}

@media (min-width: 769px) {
  #toggleSidebar {
    left: auto;
    right: 10px;
    top: 10px;
    transform: none;
    background: #fff;
    border: 1px solid #ccc;
  }

  .sidebar.collapsed #toggleSidebar {
    right: 6px;
  }
}

/* Mobile version: convert sidebar to bottom drawer */
@media (max-width: 768px) {
    
  .sidebar {
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: 100%;
    max-height: 40vh;
    border-radius: 10px 10px 0 0;
    padding: 10px 12px;
  }

  .sidebar.collapsed {
    transform: translateY(90%);
  }

  #toggleSidebar {
    top: 10px;
    left: 90%;
    right: auto;
    transform: translateX(-50%);
    border-radius: 14px;
    border: 1px solid #ccc;
  }
}
