/* ===== BASIC PAGE LAYOUT ===== */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #f9f9f9;
}

/* ===== CONTAINER: SIDEBAR AND MAP ===== */
#container {
  display: flex;
  height: 100vh;
  width: 100%;
}

/* ===== LEFT SIDEBAR ===== */
#sidebar {
  width: 250px;
  background: #f4f4f4;
  overflow-y: auto;
  padding: 10px;
  box-sizing: border-box;
}

/* ===== SEARCH BAR ===== */
#search {
  width: 100%;
  padding: 8px;
  margin-bottom: 10px;
  box-sizing: border-box;
}
/* ===== MAP AREA ===== */
#map {
  flex: 1;
  height: 100%;
  min-width: 0;
  border: 2px solid #ccc;
  box-sizing: border-box;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* ===== PLACE LIST ===== */
#list {
  display: block;
}

/* ===== PLACE DETAILS ===== */
#details {
  display: block;
  width: 500px;
  max-width: 100%;
  min-height: 300px;
  padding: 15px;
  box-sizing: border-box;
}

/* ===== STATUS ===== */
#status {
  font-weight: bold;
  color: #555;
  margin-top: 15px;
  margin-bottom: 15px;
}

/* ===== FILE INPUT ===== */
#excel-file {
  display: block;
  margin-top: 12px;
}

/* ===== RESET BUTTON ===== */
#resetBtn {
  display: inline-block;
  padding: 8px 12px;
  margin-left: 8px;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

#resetBtn:hover {
  filter: brightness(0.95);
}

/* ===== UTILITY CLASSES ===== */
.hidden {
  display: none !important;
}

.muted {
  color: #777;
}

/* ===== MOBILE LAYOUT ===== */
@media (max-width: 480px) {
  #container {
    flex-direction: column;
  }

  #sidebar {
    width: 100%;
    height: auto;
  }

  #map {
    height: 320px;
  }
}

/* ===== POPUP AND DETAILS IMAGES ===== */
.location-popup,
.marker-details {
  max-width: 360px;
  box-sizing: border-box;
}

.leaflet-popup-content {
  touch-action: pan-y pinch-zoom;
}

.image-gallery {
  width: 100%;
  position: relative;
}

.gallery-track {
  position: relative;
  width: 100%;
}

.gallery-slide {
  display: none;
  width: 100%;
}

.gallery-slide.active {
  display: block;
}

.gallery-arrow,
.gallery-dot {
  cursor: pointer;
}

.gallery-main-image {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 6px;
}

.gallery-dot {
  border: 0;
  width: 10px;
  height: 10px;
  background: #cfcfcf;
  border-radius: 50%;
  margin: 0 4px;
}

.gallery-dot.active {
  background: #007bff;
}

.location-popup .popup-image,
.marker-details img {
  width: 100%;
  height: auto;
  display: block;
  margin-top: 8px;
  border-radius: 6px;
  object-fit: cover;
}

/* ===== DETAILS IMAGE SIZING ===== */
#details img {
  max-width: 100%;
  height: auto;
  display: block;
}
/* ===== SIDEBAR TOGGLE ===== */

#container {
    position: relative;
}

#toggle-sidebar {
    position: absolute;
    z-index: 1000;
    top: 50%;
    left: 250px;
    transform: translateY(-50%);
    width: 40px;
    height: 72px;
    padding: 0;
    border: 1px solid #ccc;
    border-radius: 0 8px 8px 0;
    background: white;
    cursor: pointer;
    font-size: 36px;
}

  #sidebar.collapsed {
    width: 0;
    height: 0;
    flex: 0 0 0;
    padding: 0;
    overflow: hidden;
  }

@media (max-width: 480px) {
    #toggle-sidebar {
        left: auto;
        right: 0;
        top: auto;
        bottom: 50%;
        transform: translateY(50%);
    }

    #container {
        position: relative;
    }
}
#container {
    position: relative;
}


#locateMe {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2000;
    padding: 14px 20px;
    background: white;
    color: black;
    border: 1px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
    display: block;
    font-weight: bold;
    font-size: 16px;
}

#locateMe:hover {
    background: #b71c1c;
}