/* RESET */
* {
  box-sizing: border-box;
}
 
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: "Noto Sans", sans-serif;
  background: #f9f9f9;
  overflow: hidden;
}
 
body {
  display: flex;
  height: 100vh;
  color: #333;
}
 
/* Sidebar (right side with slide animation) */
#sidebar {
  width: 260px; /* slightly narrower */
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  background: #fff;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  padding: 16px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  
}

#sidebar.visible {
  transform: translateX(0);

}
 
#sidebar h2 {
  font-family: "Manrope", sans-serif;
  margin: 0 0 10px;
  font-weight: 600;
  font-size: 18px;
  color: #4caf50;
  text-align: end;
}
 
/* Controls Container */
.control-group {
  margin-bottom: 10px;
}
 
.control-group strong {
  display: block;
  /* margin-bottom: 2px; */
  font-size: 12px;
  font-weight: 600;
  color: #444;
}
 
/* Labels and inputs */
label {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-bottom: 2px;
  user-select: none;
  font-size: 12px;
}
 
label input[type="checkbox"],
label input[type="radio"] {
  margin-right: 2px;
  cursor: pointer;
}
 
/* Nested sub-layers (child checkboxes) */
.sub-layer {
  margin-left: 18px;
  font-size: 11px;
  color: #555;
}
 
.sub-layer label {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
  cursor: pointer;
}
 
.sub-layer input[type="checkbox"] {
  margin-right: 6px;
  cursor: pointer;
}
 
/* Disabled state when parent is unchecked */
.sub-layer input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
 
/* Dropdown */
select {
  width: 100%;
  padding: 4px 6px;
  font-size: 12px;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-family: inherit;
  background-color: #fff;
  transition: border-color 0.2s ease-in-out;
}
select:focus {
  outline: none;
  border-color: #4caf50;
  box-shadow: 0 0 4px #4caf50aa;
}
 
/* Scroll for sidebar if content overflows */
#sidebar::-webkit-scrollbar {
  width: 6px;
}
#sidebar::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}
 
/* Logout button fixed at bottom */
#logoutButton button {
  background: none;
  /* width: 100%; */
  padding: 6px;
  text-align: left;
  background-color: transparent;
  color: #444;
  border: none;
  /* outline: 2px solid #b0afaf ; */
  font-size: 12px;
  font-weight: 500;
  border-radius: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: "Manrope", sans-serif;
  display: inline-block;
}
 
#logoutButton {
  display: none;
}
 
#logoutButton button:hover {
  color: #000;
  border-color: #bbb;
}
 
/* Map container fills rest */
#map {
  flex-grow: 1;
  height: 100vh;
}
 
/* Popup styling */
.popup {
  background: white;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 12px;
  color: #222;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  max-width: 220px;
}
 
/* Hamburger button (top-right) */
#openSidebarBtn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #4caf50;
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  font-size: 22px;
  border-radius: 6px;
  cursor: pointer;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}
#openSidebarBtn.hidden {
  display: none;
}
#openSidebarBtn:hover {
  background-color: #388e3c;
}
 
/* Close button inside sidebar */
#closeSidebarBtn {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #4caf50;
  border: none;
  color: white;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
  z-index: 20;
}
#closeSidebarBtn:hover {
  background-color: #388e3c;
}
 
/* Popup (Login/Register) */
.popup_login {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}
.popup_login.hidden {
  display: none;
}
 
/* Card inside popup */
.container {
  position: relative;
  width: 420px;
  padding: 2rem;
  border-radius: 12px;
  background: #fff;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}
 
/* Title */
.title {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #2c3e50;
}
 
/* Input groups */
.input-group {
  position: relative;
  margin-bottom: 1rem;
}
.input-group .icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  color: #f39c12;
}
.input-group input {
  width: 100%;
  padding: 12px 42px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  color: #333;
  outline: none;
  transition: border 0.3s;
}
.input-group input::placeholder {
  color: #888;
}
.input-group input:focus {
  border: 1px solid #4cafef;
}
 
/* Toggle password eye */
.toggle-password,
.reg-toggle-password,
.confirm-reg-toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 22px;
  color: #555;
}
 
/* Login/Register button */
.btn-login {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 8px;
  border: none;
  background: #00bcd4;
  color: white;
  cursor: pointer;
  transition: 0.3s;
}
.btn-login:hover {
  background: #0097a7;
  transform: translateY(-2px);
}
 
/* Divider */
.divider {
  text-align: center;
  margin: 15px 0;
  font-weight: 500;
  color: #777;
  position: relative;
}
.divider::before,
.divider::after {
  content: "";
  height: 1px;
  background: #ddd;
  position: absolute;
  top: 50%;
  width: 40%;
}
.divider::before {
  left: 0;
}
.divider::after {
  right: 0;
}
 
/* Google button */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: 0.3s;
}
.btn-google img {
  width: 20px;
}
.btn-google:hover {
  background: #f5f5f5;
}
 
/* Forgot password button */
.btn-forgot {
  margin-top: 1.5rem;
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  font-weight: bold;
  border: none;
  border-radius: 0 0 12px 12px;
  background: #f39c12;
  color: white;
  cursor: pointer;
  transition: 0.3s;
}
.btn-forgot:hover {
  background: #e67e22;
}
 
/* Popup close button */
.popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #555;
  padding: 4px;
  border-radius: 50%;
  transition: background 0.2s;
}
.popup-close .material-icons {
  font-size: 22px;
}
.popup-close:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #000;
}
 
/* Compact view + language controls */
#viewControl,
#languageControl {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
 
#viewControl strong,
#languageControl strong {
  flex: 0 0 100%;
  margin-bottom: 4px;
  font-weight: 600;
  font-size: 12px;
}
 
#layerControl strong {
  margin: 4px 0;
  font-size: 12px;
}
 
#viewControl label,
#languageControl label {
  margin-bottom: 0;
  font-size: 12px;
}
 
/* poi chips design */
.poi-chip-container {
  position: absolute;
  top: 10px;
  left: 55%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  background: transparent;
  padding: 8px 12px;
  border-radius: 40px;
  /* backdrop-filter: blur(8px); */
  z-index: 10;
}
 
.poi-chip {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 25px;
  padding: 4px 10px;
  cursor: pointer;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  font-size: 14px;       
  line-height: 1;     
  display: inline-flex;
  justify-content: center;
}
 
.poi-chip:hover {
  background: #f1f3f4;
}
 
.poi-chip.active {
  background: #1a73e8;
  color: #fff;
  border-color: #1a73e8;
}
 
 
 
 
#search-container {
  position: absolute;
  top: 15px;
  left: 20px;
  z-index: 5;
  background: white;
  padding: 8px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  width: 320px;
}

/* Make all icon glyphs smaller and properly centered */
.poi-chip .material-symbols-outlined {
  font-size: 16px;        /* smaller icon font size */
  line-height: 1;         /* remove extra vertical space */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;            /* fixed icon box size */
  height: 20px;
}

/* Color-coded icon backgrounds */
.education-icon {
  border-radius: 10px;
  background-color: #C62828;
  color: #fff;
  padding: 2px;
}

.healthcare-icon {
  border-radius: 10px;
  background-color: #C62828;
  color: #fff;
  padding: 2px;
}

.religious-icon {
  border-radius: 10px;
  background-color: #8BC34A;
  color: #fff;
  padding: 2px;
}

.services-icon {
  border-radius: 10px;
  background-color: #F9A825;
  color: #fff;
  padding: 2px;
}

.parking-icon {
  border-radius: 10px;
  background-color: #1565C0;
  color: #fff;
  padding: 2px;
}


#searchInput {
  width: 100%;
  border: none;
  outline: none;
  font-size: 14px;
}
 
.search-results {
  max-height: 200px;
  overflow-y: auto;
  margin-top: 5px;
  border-top: 1px solid #ccc;
  display: none;
}
 
.search-results div {
  padding: 6px 8px;
  cursor: pointer;
}
 
.search-results div:hover {
  background-color: #f0f0f0;
}

#year-chips {
  position: absolute;
  bottom: 20px;
  left: 20px;
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.85);
  padding: 6px 10px;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  z-index: 10000;
  display: none;
}

.year-chip {
  padding: 4px 10px;
  background: #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
}

.year-chip.active {
  background: #1976d2;
  color: white;
}









































/* =======================
   📱 MOBILE VIEW STYLING
   ======================= */
@media (max-width: 768px) {
  /* Make map full-screen */
  #map {
    height: 100vh;
    width: 100vw;
  }

  /* Sidebar: full width slide-in from right */
  #sidebar {
    width: 100%;
    max-width: 360px;
    transform: translateX(100%);
    padding: 14px;
    font-size: 14px;
    z-index: 1000;
  }

  #sidebar.visible {
    transform: translateX(0);
  }

  /* Sidebar headings smaller */
  #sidebar h2 {
    font-size: 16px;
  }

  /* Close button larger & easier to tap */
  #closeSidebarBtn {
    width: 32px;
    height: 32px;
    top: 10px;
    left: 10px;
    font-size: 18px;
  }

  /* Hamburger (open sidebar) larger, lower corner */
  #openSidebarBtn {
    top: 14px;
    right: 14px;
    width: 44px;
    height: 44px;
    font-size: 24px;
    border-radius: 8px;
  }

  /* Reduce spacing in sidebar controls */
  .control-group {
    margin-bottom: 10px;
  }

  label {
    font-size: 13px;
  }

  select {
    font-size: 13px;
    padding: 5px 6px;
  }

  /* Search bar smaller & centered */
  #search-container {
    width: 90%;
    left: 50%;
    transform: translateX(-50%);
    top: 10px;
    padding: 6px;
    border-radius: 8px;
  }

  #searchInput {
    font-size: 13px;
  }

  /* Chips row becomes scrollable horizontally */
  .poi-chip-container {
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    overflow-x: auto;
    justify-content: flex-start;
    scrollbar-width: none; /* hide scrollbar */
  }

  .poi-chip-container::-webkit-scrollbar {
    display: none;
  }

  .poi-chip {
    font-size: 13px;
    padding: 4px 8px;
    flex-shrink: 0; /* prevent squishing */
  }

  /* Popup/login container fits mobile width */
  .container {
    width: 90%;
    padding: 1.5rem;
    border-radius: 10px;
  }

  .title {
    font-size: 1.3rem;
  }

  .btn-login,
  .btn-google,
  .btn-forgot {
    font-size: 0.9rem;
    padding: 10px;
  }

  /* Slightly smaller icons */
  .poi-chip .material-symbols-outlined {
    font-size: 14px;
    width: 18px;
    height: 18px;
  }
}

/* Even smaller (phones under 480px) */
@media (max-width: 480px) {
  #sidebar {
    max-width: 100%;
    font-size: 13px;
    z-index: 1000;
  }

  #openSidebarBtn {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    font-size: 22px;
  }

  #search-container {
    width: 94%;
    top: 8px;
  }

  .poi-chip {
    font-size: 12px;
    padding: 3px 7px;
  }
}
