.filter-container {
  padding-left: 0;
  padding-right: 0;
}

#filter-bar {
  display: flex; /* Use flexbox for horizontal layout */
  flex-wrap: wrap; /* Allow wrapping to new lines if necessary */
  gap: 5px; /* Spacing between buttons */
  padding: 5px;
}

.filter-button {
  padding: 8px 16px;
  border: #006054 1px solid; /* Border color */
  border-radius: 8px;
  background-color: white; /* Default button color */
  color: #006054;
  cursor: pointer;
  transition: background-color 0.3s; /* Smooth transition for hover effect */
  white-space: nowrap; /* Prevent text from wrapping */
  width: 180px;
}

.clipped-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap; /* Prevent text from wrapping */
  max-width: 210px; /* Set your maximum width */
  display: inline-block; /* Important for width to work correctly */
}

.filter-button:hover {
  background-color: #d0d0d0;
}

.filter-button.active {
  background-color: #007bff; /* Active button color */
  color: white;
}

/* Style for the dropdown menu */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
  border-radius: 5px; /* Add rounded corners */
}

.dropdown-content a {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}

.dropdown-content a:hover {background-color: #f1f1f1;}

.dropdown:hover .dropdown-content {
  display: block;
}

.filter-button {
  position: relative; /* For positioning the dropdown */
  display: inline-flex; /* Use flexbox for icon and text */
  align-items: center; /* Vertically align icon and text */
}

.filter-button::after { /* Dropdown caret */
  content: '\279C'; /* Default: Down caret */
  margin-left: 5px;
  transition: transform 0.3s ease; /* Smooth rotation */
}

.filter-button.show::after { /* Up caret when dropdown is shown */
  transform: rotate(180deg); /* Rotate 180 degrees for up caret */
}

.filter-button.disabled {
  opacity: 0.5; /* Reduce opacity to indicate disabled */
  cursor: not-allowed; /* Change cursor to "not allowed" */
  pointer-events: none; /* prevent clicks from registering */
}

.filter-button.disabled .dropdown-panel{
  pointer-events: none; /* prevent clicks from registering on the dropdown */
}

.dropdown-panel {
  display: none;
  position: absolute;
  top: 100%; /* Position below the button */
  left: 0; /* Align to the left edge of the button */
  background-color: #f9f9f9;
  min-width: 200px; /* Adjust as needed */
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 10000; /* Gotta display panels above eg. map legend items */
  padding: 10px;
  border-radius: 5px;
  white-space: nowrap; /* Prevent contents from wrapping */
}

.dropdown-panel.show {
  display: block;
}

.dropdown-panel label {
  display: block; /* Labels on separate lines */
  margin-bottom: 5px;
}

.dropdown-panel input[type="text"],
.dropdown-panel input[type="checkbox"],
.dropdown-panel input[type="radio"] {
  margin-right: 5px;
}

.dropdown-panel input[type="checkbox"],
.dropdown-panel input[type="radio"] {
  width: auto;
}

.dropdown-panel button {
  margin-top: 10px;
  padding: 5px 10px;
  background-color: #4CAF50;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 5px;
}

/* Style the omni-search input */
#omni-search {
  width: 100%;
  padding: 5px;
  box-sizing: border-box; /* Include padding in width */
  margin-bottom: 5px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

#location-filter { /* Style the location filter button */
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
  white-space: nowrap;
  position: relative; /* For positioning the icon */
  display: inline-flex;
  align-items: center;
}

#location-input-container { /* Container for the input and icons */
  display: flex;
  align-items: center;
  padding-left: 5px; /* Add some left padding */
  width: 400px;
  border: #006054 1px solid; /* Border around the input container */
  border-radius: 8px; /* Rounded corners */
  background-color: white; /* Background color for the input container */
}

#location-input { /* Style the text input */
  border: none;
  flex-grow: 1; /* Allow input to expand */
  padding: 5px;
  outline: none; /* Remove default focus outline */
  background-color: transparent;
}

#location-search-icon, #location-clear-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#location-search-icon::before { /* Magnifying glass icon */
  /* content: '\1F50D';  Unicode for magnifying glass */
}
.magnifying-glass-button { /* SVG in HTML */
  width: 30px;
  height: 30px;
  fill: #006054; /* Icon color */
}

#location-clear-icon::before { /* 'X' icon */
  content: '\2715'; /* Unicode for multiplication sign */
}

#location-clear-icon {
  display: none; /* Initially hidden */
}

#location-input:not(:placeholder-shown) + #location-clear-icon {
  display: block; /* Show clear icon when input has text */
}

.filter-polygon-checkbox {
  display: flex;
}