/* Global Map and Layout */
#map, #map-container {
    width: 100%;
    height: 100vh;
    position: relative;
  }
  
  /* General Typography */
  body {
    font-family: Arial, sans-serif;
    color: #333;
  }
  
  /* Leaflet Search Box */
  .leaflet-control-search {
    border-radius: 4px;
    border: 2px solid #4CAF50;
    background-color: #fff;
    font-size: 16px;
    padding: 5px;
  }
  
  .leaflet-control-search input {
    border: none;
    padding: 5px;
    width: 200px;
    font-size: 14px;
    background-color: white;
    color: #333;
  }
  
  .leaflet-control-search button {
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 3px;
    font-size: 16px;
    padding: 6px 12px;
    cursor: pointer;
  }
  
  .leaflet-control-search button:hover {
    background-color: #45a049;
  }
  
  .leaflet-control-search .leaflet-search-result {
    font-size: 14px;
    padding: 5px;
    border-bottom: 1px solid #ddd;
  }
  
  .leaflet-control-search .leaflet-search-result.active {
    background-color: #4CAF50;
    color: white;
  }
  
  /* Filter Panel */
  #filter-panel,
  .filter-panel {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    background: white;
    padding: 16px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: 240px;
    font-family: system-ui, sans-serif;
    font-size: 14px;
    color: #333;
    transition: max-height 0.3s ease-out;
    max-height: 0;
    overflow: hidden;
  }
  
  #filter-panel.open {
    max-height: 1000px;
  }
  
  .filter-panel h3 {
    margin: 0 0 12px;
    font-size: 18px;
  }
  
  .filter-group {
    margin-bottom: 20px;
  }
  
  .filter-group-title {
    font-weight: bold;
    margin-bottom: 8px;
  }
  
  .checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px 10px;
  }
  
  .checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: #f3f3f3;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
  }
  
  .checkbox-label:hover {
    background-color: #e0e0e0;
  }
  
  .checkbox-label input[type="checkbox"] {
    margin: 0;
  }
  
  /* Toggle Button */
  .toggle-btn {
    background-color: #007BFF;
    color: white;
    padding: 10px;
    border: none;
    cursor: pointer;
    margin-bottom: 10px;
  }
  
  .toggle-btn:hover {
    background-color: #0056b3;
  }
  
  /* Popup Card */
  .popup-card {
    font-family: sans-serif;
    max-width: 200px;
  }
  
  .popup-card h4 {
    margin: 0 0 5px;
    font-size: 16px;
    color: #333;
  }
  
  .popup-card a {
    text-decoration: none;
    color: #007BFF;
  }
  
  /* Custom Cluster Icon */
  .custom-cluster-icon {
    border-radius: 50%;
    color: white;
    text-align: center;
    line-height: 32px;
    font-weight: bold;
    border: 2px solid white;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
  }
  
  /* Leaflet Control Position Overrides */
  .leaflet-control-zoom {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1500;
  }
  
  .leaflet-control-fullscreen {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1500;
  }
  
  .leaflet-control-minimap {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 1500;
  }
  
  .leaflet-control-geolocate {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 1500;
  }

  /* Toggle button styling */
.toggle-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1100;
    background-color: #007BFF;
    color: white;
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
  }
  
  .toggle-btn:hover {
    background-color: #0056b3;
  }
  
  /* Filter panel styles (collapsed and open) */
  #filter-panel {
    position: absolute;
    top: 50px; /* Leave room for the toggle button */
    right: 10px;
    z-index: 1000;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 16px;
    width: 240px;
    font-family: system-ui, sans-serif;
    font-size: 14px;
    color: #333;
  
    transition: max-height 0.3s ease-out, opacity 0.3s ease;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
  }
  
  #filter-panel.open {
    max-height: 1000px;
    opacity: 1;
  }

  .material-icon-marker {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #8e44ad; /* Set a default background color */
    color: white;
    font-size: 20px;
    text-align: center;
    border: 2px solid #ffffff; /* Add a border around the icon */
  }

  .material-style-wrapper {
    background: #8e44ad;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Ensures nothing sticks out */
  }
  
  .custom-icon {
    width: 60%; /* or try 24px if fixed size is better */
    height: 60%;
    object-fit: contain;
  }
  