
/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@1,400&family=Open+Sans:wght@700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&family=Silkscreen:wght@400;700&display=swap'); 
@import url('https://fonts.googleapis.com/css2?family=Karla:ital,wght@0,200..800;1,200..800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300..700&display=swap');

/* General styles */

body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

/* Container for map and overlay menu */
#container{
  position: relative;
  width: 100vw;  /* Use viewport width */
  height: 100vh; /* Use viewport height */
  overflow: hidden; /* Prevent scrollbars */
}

#map {
  position: absolute;
  width: 100%;
  height: calc(100vh - 60px); /* Subtract header height from viewport height */
  top: 60px; /* Account for header height */
  left: 0;
  right: 0;
  bottom: 0;
}

.leaflet-container {
  width: 100% !important;
  height: 100% !important;
  background: #eee;
}


#notes img{
  width: 70%;
  opacity: 0.5
}

#notes-icon {
  cursor: pointer; /* Shows pointer to indicate it's interactive */
}

#notes-text {
  display: none;
  margin: 0;
  padding: 1px 5px;
  background-color: darkgrey;
  color: white;
  border-radius: 5px;
  position: absolute;
  bottom: 10px; /* Adjust as needed */
  left: 50%;
  transform: translateX(-50%);
  max-width: 300px;
  opacity: 0.85;
  font-family: Verdana, Geneva, sans-serif; /* Use Verdana */
  font-size: 9.5px; /* Adjust the size as needed */
  line-height: 1.2; /* Optional, for better readability */
}

.hidden {
  display: none;
}

#notes:hover #notes-text {
  display: block; /* You can change this if you want it to appear on hover */
}

span.support {
  display: inline-block;
  margin: 2px 5px;
  padding: 0.5px 5px;
  line-height: 2rem;
  font-weight: 700;
  color: #f6fafc;
  border-radius: 9px;
}
.support-geo { background-color: #bab2a6;} /*#ada599;}/* #93C572; } */
.support-sbp { background-color: #7fb6c8; }
.support-mrsm { background-color: #e5a0c6; }
.support-location { background-color: #F89880; }
.support-other { background-color: darkgrey; }

/*   */

#sbpInfo, #mrsmInfo {
  display: none;
}

#subzoneFilter,
#subformFilter,  #subcategoryFilter{
  font-family: "Cormorant Garamond", serif;
  font-style: normal;
  font-weight: 600;
  font-size: 18px;
  text-align: center;
}
  /* When active, display the element */
  #subzoneFilter.active,
  #subformFilter.active,
  #subcategoryFilter.active {
    display: flex; /* Show and restore layout flow */
    gap: 10px; /* Add spacing for child elements */
    flex-wrap: wrap; /* Ensure good wrapping */
}
 
  label {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
  }
  
  input[type="radio"],
  input[type="checkbox"] {   
    margin-right: 10px;
  }
  
  #explanationText {
    font-family: "Karla", serif;
    font-optical-sizing: auto;
    font-weight: 300;
    font-style: normal;
    font-size: 15px;
    
    margin-top: 15px;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 5px;
    background-color: #eee;
    display: none; /* Initially hidden */
  }

/********** OVERLAY MENU *********/
  
.overlay-menu {

  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60%;
  max-height: 90vh; /* Ensures it doesn't go beyond screen size */
  max-width: 400px;
  background-color: #e0f0f8; /* Blue-greyish background */
  line-height: 1.1; /* Good spacing for readability */
  padding: 15px; /* Adjusted padding for a balanced look */
  border: 1px solid #b0c4de; /* Thin line border with light blue-grey color */
  border-radius: 12px; /* Subtle rounded corners */
  z-index: 1000;
  overflow-y: auto; /* Allow scrolling if content exceeds the container */
  display: flex; /* Flexbox for centering */
  flex-direction: column; /* Stack children vertically */
  align-items: center; /* Center horizontally */
  justify-content: center; /* Center vertically */  
  gap: 10px;
  opacity: 0.95;
} 
/* Ensure a uniform gap between dynamic content inside hor-group */
.overlay-menu .hor-group {
  gap: 10px; /* Uniform spacing between items within the group */
  display: flex; /* Flexbox ensures horizontal layout */
  flex-wrap: wrap; /* Wrap to the next line if needed */
  justify-content: center; /* Centers the items horizontally, even when wrapping */
  align-items: center; /* Ensures vertical alignment of items within the group */
}

  /* Optionally, style the radio buttons or checkboxes here */
  .overlay-menu input[type="radio"] + label,
  .overlay-menu input[type="checkbox"] + label {
    margin-right: 5px; /* Space between input and label */
    margin: 0;
  }

  .overlay-menu h1 {
    font-family: "Cormorant Garamond", serif;
    font-weight: 600;
    font-style: normal;
    font-size: 19px;
    text-align: center;
  }
  
  .overlay-menu h2 {
    /*font-family: 'Georgia','Merriweather', serif; /* Elegant serif font for headings */
    font-family: "Cormorant Garamond", serif;
    font-weight: 500;
    font-style: normal;
    font-size: 17px; /* Smaller heading size */
    text-align: justify;
    margin-bottom: 10px; /* Space below heading */
    color: #2c3e50; /* Slightly darker color for the heading */
    opacity: 1.0;
  }

  .overlay-menu h3 {
   /*font-family: 'Georgia','Merriweather', serif; /* Elegant serif font for headings */
    font-family: "Cormorant Garamond", serif;
    font-size: 23px; /* Smaller heading size */
    font-style: normal;
    font-weight: 700; /* Slightly bold for emphasis */
    text-align: center;
    margin-bottom: 10px; /* Space below heading */
    color: #2c3e50; /* Slightly darker color for the heading */
    opacity: 1.0;
  }
  

/****** BUTTON ******/

.filter-btn {
  background-color: #c0c0c0; 
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border: none;
  border-radius: 50%; /* Circular button */
  cursor: pointer;
  width: 60px;
  height: 60px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Optional: Add shadow for elevation */
  transition: all 0.3s ease; /* Smooth transition */
}

.filter-btn img.btn-icon {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: 50%;
}

.all-btn:hover {
  background-color: darkgrey;
}

.sbp-btn:hover {
  background-color: #7fb6c8; /* Slightly lighter background on hover */
}

.mrsm-btn:hover {
  background-color: #e5a0c6; /* Slightly lighter background on hover */
}

.all-btn {
  /* background-color: lightgrey; */
  color: white;
  font-family: 'Georgia','Merriweather', serif; 
  font-optical-sizing: auto;
  font-weight: 700;
  font-size: 19px;
}


/******** Hamburger Icon Styling ********/
.hamburger {
  position: absolute; /* Position it absolutely within the overlay menu */
  top: 10px; /* Adjust as needed */
  right: 10px; /* Adjust as needed */
  font-size: 17px; /* Size of the icon */
  cursor: pointer; /* Make it look clickable */
  z-index: 1000; /* Ensure it's above other elements */
  padding: 8px; /* Add some padding for better clickability */
  border-radius: 4px; /* Rounded corners */
}


/* Shrink the overlay menu when the 'hidden' class is applied */
#filters.hidden {
  width: 0; /* Shrink width to 0 */
  height: 0; /* Shrink height to 0 */
  overflow: hidden; /* Hide overflowing content */
  transition: width 0.3s ease, height 0.3s ease; /* Smooth transition */
}

/* Ensure the menu is visible by default */
#filters {
  width: 400px; /* Set initial width */
  height: auto; /* Set initial height */
  transition: width 0.3s ease, height 0.3s ease; /* Smooth transition */
}




/****** media queries ******/

#mobileHeader {
  display: none; /* Hide by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: white;
  padding: 10px;
  text-align: center;
  z-index: 1000;
  /* border-bottom: 1px solid black; */
}

#mobileHeader button {
  background-color: #bab2a6; /*#96B3D2;*/
  transition: background-color 0.3s ease-in-out; /* Smooth transition */
  color: white;
  border: none;
  padding: 8px 15px;
  font-size: 14px;
  border-radius: 7px;
  cursor: pointer;
}

#mobileHeader button:hover {
  background-color: #ada599; /*#4863A0;*/
}

#mobileHeader button:active {
  transform: scale(0.95); /* Slightly shrink button when clicked */
  transition: transform 0.1s ease;
}

/* Mobile Collapsible Menu */
#mobileCollapsibleMenu {
  display: none; /* Hidden by default */
  position: fixed;
  top: 50px; /* Below the mobile header */
  left: 0;
  width: 100%;
  background-color: white;
  z-index: 1000;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  opacity: 0.9;
}

#mobileCollapsibleMenu #toggleMenuBtn {
  width: 100%;
  padding: 10px;
  background-color: #96B3D2;
  color: white;
  border: none;
  font-size: 16px;
  cursor: pointer;
}

#mobileCollapsibleMenu #mobileMenuContent {
  /* position: absolute; */
  display: none; /* Hidden by default */
  padding: 10px;
  background-color: #e0f0f8;
  border-top: 1px solid #b0c4de;
  max-height: 80vh; /* Set max height for scrolling */
  overflow-y: auto; /* Enable vertical scroll when content overflows */
  /* z-index: 999; */
}

#mobileCollapsibleMenu.active #mobileMenuContent {
  display: block; /* Show when active */
}

#categoryFilter .hor-group {
  display: flex; /* Align buttons in a row */
  gap: 10px; /* Add space between buttons */
  justify-content: center; /* Center buttons horizontally */
  align-items: center; /* Center buttons vertically */
}

/* Hide filters by default */
#subzoneFilterMobile,
#subcategoryFilterMobile,
#subformFilterMobile,
#mrsmCategoryFilterMobile {
  display: none;

  font-family: "Karla", serif;
  font-style: normal;
  font-weight: 400;
  font-size: 15.5px;
  text-align: center;
}

/* Show filters when their parent container is active */
#subzoneFilterMobile.active,
#subcategoryFilterMobile.active,
#subformFilterMobile.active,
#mrsmCategoryFilterMobile.active {
  display: flex;
  flex-wrap: wrap;
  justify-content: left; /*center; /* Centers horizontally */
  align-items: center; /* Ensures vertical alignment */
  gap: 2px;
  row-gap: 1px;
  padding: 5px 0;
  border: 5px solid #e0f0f8; /* Outline the container */
  border-radius: 15px; /* Rounded edges */
  background-color: #BFD4DB; /* Background color for the element */
}

#mrsmCategoryFilterMobile h1, #subcategoryFilterMobile h1, #subzoneFilterMobile h1 {
  width: 100%; /* Makes the title take full width, so it stays on top */
  margin-bottom: 5px; /* Adds space between title and checkboxes */
  text-align: center; /* Center align the title (optional) */
}

/* Mobile devices (portrait and landscape) */
@media (max-width: 768px) {

  .mobile-filter label {
    /*border: 1px solid blue; /* Outline each checkbox label */
    padding: 2px 5px !important; /* Keep it small and uniform */
    margin: 2px 0;
    margin-bottom: 10px; 
  }
  
  .mobile-filter h1 {
    font-family: 'Georgia','Merriweather', serif; /* A font with more weight options */
    font-weight: 700; /* Heaviest weight */
    font-style: normal;
    font-size: 17px;
    text-align: center;
  }
  .mobile-filter h3 {
    font-family: "Cormorant Garamond", serif;
    font-weight: 700;
    font-style: normal;
    font-size: 23px;
    text-align: center;
  }

  .mobile-filter #notes {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centers the image horizontally */
    justify-content: center; /* Centers the content vertically */
    margin-top: 30px; /* Adjust spacing from the button above */
  }

  .mobile-filter #notes img{
    width: 20px; /* Set a fixed small size */
    height: auto; /* Keep aspect ratio */
    opacity: 0.5;
    cursor: pointer; /* Makes it clear it's clickable */
  }
  
  .mobile-filter #notes-text {
    display: none;
    margin: 0;
    padding: 1px 5px;
    background-color: darkgrey;
    color: white;
    border-radius: 5px;
    position: absolute;
    bottom: 10px; /* Adjust as needed */
    left: 50%;
    transform: translateX(-50%);
    max-width: 300px;
    opacity: 0.85;
    font-family: Verdana, Geneva, sans-serif; /* Use Verdana */
    font-size: 9.5px; /* Adjust the size as needed */
    line-height: 1.2; /* Optional, for better readability */
  }
  #mobileHeader {
    display: block; /* Show only on mobile */
    
  }

  /* Adjust header for mobile */
  #topHeader {
    padding: 5px 10px; /* Reduce padding */
     display: none; 
  }

  /* Adjust map height for mobile */
  #map {
    height: calc(100vh - 50px); /* Adjust height to account for smaller header */
  }

  /* Adjust filter buttons for mobile */
  .filter-btn {
    width: 50px; /* Smaller buttons */
    height: 50px;
  }

  .filter-btn img.btn-icon {
    width: 40px; /* Smaller icons */
    height: 40px;
  }

  /* Ensure the overlay menu is hidden on mobile */
  .overlay-menu {
    display: none !important;
  }
  #mobileCollapsibleMenu {
    display: block; /* Show on mobile */
  }

}



