html, body {
    max-width: 100%;
    overflow-x: hidden !important;
}


#map {
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
}


.sidebar {
    position: absolute;
    top: 60px;
    right: 10px;
    width: 230px;
    background-color: #ffffffee;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    z-index: 1001;
}

.sidebar h3 {
    margin-top: 0;
    font-size: 18px;
}

.sidebar ul {
    list-style: none;
    padding-left: 0;
}

.sidebar ul li {
    background: #f3f3f3;
    padding: 6px 10px;
    margin: 4px 0;
    border-radius: 5px;
    cursor: default;
}

/* Tombol toggle muncul di semua resolusi */
#toggleSidebar {
  /* HAPUS position: fixed dan top/right */
  background: #007bff;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 5px;
  cursor: pointer;
}
#floatingSidebarToggle {
  position: fixed;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1050;
}


#custom-top-buttons {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1001; /* lebih tinggi dari Leaflet */
    display: flex;
    gap: 6px;
  }

  @media (min-width: 769px) {
    #custom-top-buttons {
      left: 10px;
      right: auto;
    }
      .navbar-brand .fw-bold div {
    font-size: 0.85rem !important;
  }
  }


  #topbar {
    background-color: #0d6efd !important;
    opacity: 1 !important;
}

/* Dropdown tetap biru saat collapse */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: #0d6efd !important;
        padding-left: 50px;
    }
    .dropdown-menu {
        background-color: #99bdf4 !important;
    }
    .dropdown-menu .dropdown-item {
        color: rgb(0, 0, 0) !important;
    }
    .dropdown-menu .dropdown-item:hover {
        background-color: #0b5ed7 !important;
    }
    
}


.sidebar {
    width: 85vw;
    /* supaya sidebar tidak penuh 100% di HP */
    max-width: 300px;
}

.color-box {
  display: inline-block !important;
  width: 16px !important;
  height: 16px !important;
  margin: 0 6px;
  vertical-align: middle;
  border: 2px solid #333;
  border-radius: 4px;
  box-sizing: border-box;
}

#topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #005a9e;
  color: white;
  padding: 10px 20px;
  font-size: 18px;
  font-weight: bold;
  z-index: 1001;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* Geser sidebar ke bawah agar tidak tertutup topbar */
.sidebar {
  top: 60px;
}




.locate-control {
    position: absolute;
    bottom: 250px;
    right: 20px;
    background-color: white;
    border-radius: 50%;
    padding: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.locate-control:hover {
    background-color: #f0f0f0;
}

.leaflet-popup-content button {
    padding: 6px 10px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.leaflet-popup-content button:hover {
    background: #0056b3;
}

.leaflet-routing-container .leaflet-routing-alt .leaflet-routing-alt-content {
    animation: blink 1s infinite;
}

@keyframes blink {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.leaflet-routing-container-hide>* {
    animation: blink 1s infinite;
}

.leaflet-routing-container-hide .leaflet-routing-alt-line {
    stroke: red;
    stroke-width: 4;
    stroke-dasharray: 8, 8;
    animation: blink 1s infinite;
}



