/* Basic page and map styling */
html,
body {
    margin: 0;
    padding: 0;
    height: 100%;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  -webkit-hyphens: auto;
  -moz-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;

  -webkit-hyphenate-limit-before: 3;
  -webkit-hyphenate-limit-after: 3;

  -webkit-hyphenate-limit-chars: 7 3 3;
  -moz-hyphenate-limit-chars: 7 3 3;
  -ms-hyphenate-limit-chars: 7 3 3;
  hyphenate-limit-chars: 7 3 3;

}


#map {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    bottom:0;
}

/* Sidebar styles */
#sidebar {
    position: absolute;
    top: 0;
    right: 0;
    width: 260px;
    max-width: 80%;
    height: 100%;
    background: #f8f9fa;
    border-left: 1px solid #aaa;
    padding: 10px;
    overflow-y: auto;
  /*  transition: transform 0.3s ease;*/
  transition:width .3s ease;          /* width animates instead of transform */
  z-index: 1000;
}


/* collapsed = slim bar that still shows the toggle button -------------- */
#sidebar.collapsed{width:32px;}       /* ≈3 rem – adjust to taste        */
#sidebar.collapsed h2,
#sidebar.collapsed .filter-group,
#sidebar.collapsed #closeSidebar{display:none;}  /* hide inner UI        */


/* toggle button now *inside* sidebar ----------------------------------- */
#sidebarToggle{
  position:absolute;
  background-color: #FFFFFF;
  top:10px;
  left:10px;
  width:26px;
  height:26px;
  font-size:1.1rem;
  line-height:24px;
  cursor:pointer;
  padding:0;
  border: none;
}

/* nice little arrow that flips direction ------------------------------- */
/*#sidebar:not(.collapsed) #sidebarToggle::before{
    content:"‹";
}
#sidebar.collapsed      #sidebarToggle::before{content:"›";}
*/

#sidebar h2 {
    font-size: 1.2em;
    margin: 0 0 0.5em 0;
   position: relative;
}

#closeSidebar {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 1.1em;
}


.filter-group {
    margin-bottom: 1em;
    margin-top:3rem;
}

.filter-group h3 {
    font-family: firasans-semibold;
    font-size: 1.1em;
    margin-bottom: 0.2em;
}

.filter-group button {
    font-size: 0.9em;
    margin: 0 5px 5px 0;
    cursor: pointer;
}

.category-label {
    font-weight: bold;
    cursor: pointer;
}

.category-label::after {
    content: " (isolate)";
    font-weight: normal;
    font-size: 0.9em;
    color: #555;
}

.category-icon {
  width: 24px;
  height: 24px;
}


/* Filters toggle button */
#toggleFilters {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    background: #fff;
    border: 1px solid #999;
    font-size: 14px;
    padding: 8px 12px;
    cursor: pointer;
}

#filterOverlay {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 5px;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    width: 220px;
}

#filterOverlay.hidden {
    display: none;
}


/* ─── modernised filter look ─────────────────────────────────────────── */
#toggleFilters,
#filterOverlay button {
    border: none;
    border-radius: 6px;
    background: linear-gradient(135deg, #4b6cb7 0%, #182848 100%);
    color: #fff;
    padding: 6px 12px;
    font-size: 0.9em;
    cursor: pointer;
    transition: opacity .2s ease;
}
#toggleFilters:hover,
#filterOverlay button:hover { opacity: .85; }

#filterOverlay {
    backdrop-filter: blur(4px);
    border: 1px solid #4b6cb7;
}

.filter-group label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.125rem;
    font-family: firasans-book;
    line-height: 1.75rem;
}

.filter-group input[type="checkbox"] {
    accent-color: #7A93BF;
    width: 16px;
    height: 16px;
}

.filter-actions {
  display: flex;
  gap: 0.5em;
  margin-bottom: 0.5em;
}

.filter-action {
  cursor: pointer;
  color: #7A93BF;
  font-family: firasans-book;
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
}
.filter-action:hover {
  text-decoration: underline;
}


/* Cluster summary marker icon (DivIcon) */
.cluster-icon {
    background: rgba(208, 183, 161, 0.9);
    color: #fff;
    text-align: center;
    border-radius: 30%;
    border: 2px solid #fff;
    font-size: 40px;
    line-height: 120px;
}

.cluster-icon span {
    display: inline-block;
    vertical-align: middle;
}

/* Popup content styling */
.leaflet-popup {
    opacity: 0.9; 
    margin-bottom: 43px;
}

.leaflet-popup-content-wrapper {
    background : white;
    color: #333;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4);
    padding: 1px;
    text-align : left;
    border-radius: 12px;
}

.leaflet-popup-content {
    width: 200px;
    margin : 12px 14px 12px 14px;
    font-size: 13px;
    min-height: 20px;
}
.leaflet-popup-content a {
    color: #5B77AC;
}

.popup-content {
    max-height: 360px;
    overflow-y: auto;
}

.popup-content h3 {
    margin: 0 0 8px 0;
}

.popup-content h4 {
    margin: 8px 0 2px 0;
}

.popup-content ul {
    margin: 0;
    list-style-type: disc; 
    list-style-position: outside;
    padding-left: 5px;
}
.popup-content ul  li::marker {
      font-size: 0.8em;          
    }
.popup-content li {
    margin-bottom: 4px;
    margin-left: 2px;
}

.popup-content li:last-child {
  margin-bottom: 0;
}

.popup-item {
    border-bottom: 1px solid #ddd;
    padding: 3px 0;
}

.popup-item:last-child {
    border: none;
}

