body,
html {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column; /* Stack header, map, and footer vertically */
  overflow: hidden; /* Prevent vertical scrolling */
}

#map {
  width: 100%;
  flex: 1; /* Allow the map to grow and fill the available space */
}

.legend {
  color: white;
  padding: 10px;
  background-color: rgba(0, 0, 0, 0.8);
  border-radius: 5px;
  max-width: 500px;
}

.legend i {
  width: 18px;
  height: 18px;
  float: left;
  margin-right: 8px;
  opacity: 0.7;
  clear: left;
}

.legend h4 {
  margin-top: 0px;
}

.link {
  text-decoration: underline;
  cursor: pointer;
}

.fa {
  line-height: inherit;
}

ol {
  list-style: none;
  padding-left: 0;
}

.modal {
  display: flex;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 9%;
  height: calc(100% - 14%); /* Adjust height to fit below the header */
  overflow: hidden;
  flex-shrink: 0;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 300px;
  text-align: center;
  border-radius: 8px;
  font-family: Arial, sans-serif;
}

.modal-content button {
  background-color: #0074d9;
  color: white;
  border: none;
  padding: 10px 20px;
  margin-top: 20px;
  border-radius: 5px;
  cursor: pointer;
}

.modal-content button:hover {
  background-color: #0074d9;
}

.blue-button {
  background-color: #0074d9;
  color: white;
  border: none;
  padding: 10px 20px;
  margin-top: 20px;
  border-radius: 5px;
  cursor: pointer;      
}

.green-button {
  background-color: #07a83d;
  color: white;
  border: none;
  padding: 10px 20px;
  margin-top: 20px;
  border-radius: 5px;
  cursor: pointer;      
}

.footer {
  flex-shrink: 0;
  display: flex; /* Enables flexbox */
  position: fixed;
  bottom: 0;
  height: 5%;
  width: 100%;
  z-index: 1000;
  background-color: rgb(0, 62, 97);
  border-color: red;
  color: #fff;
  text-align: center;
  justify-content: center; /* Spreads content across the footer */
  align-items: center; /* Centers items vertically */
  border-top: 4px solid transparent;
  background-image: linear-gradient(to bottom, rgb(0, 62, 97), rgb(0, 62, 97)),
                    linear-gradient(to right, rgb(96, 154, 181), rgb(96, 154, 181));
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

.footer nav {
  display: flex;
  gap: 15px; /* Adds space between links */
}

.footer a {
  color: white;
  text-decoration: none;
  margin-left: 20px;
}

.footer a:hover {
  color: lightgray;
}

.version-number {
  position: absolute;
  right: 20px;
  bottom: 10px;
  font-size: 14px;
  color: white;
  font-weight: normal;
}

header {
  flex-shrink: 0;
  display: flex;
  height: 8%;
  align-items: center;
  padding: 0px 0px;
  background-color: rgb(0, 62, 97);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.mainlogo {
  cursor: pointer;
  margin: 1%;
}

.mainlogo img {
  max-width: 140px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px; /* Ensures spacing between logo and button */
}

.header-right {
  display: flex;
  align-items: right;
  margin-left: auto; /* Pushes the login button to the right */
  margin-right: 10px;
  gap: 10px;
}

.line {
  height: 1%;
  width: 100%;
  background-color: rgb(96, 154, 181);
}

.toplevelbutton {
  background-color: rgb(0, 62, 97);
  color: white;
  border: none;
  padding: 8px 15px;
  cursor: pointer;
  border-radius: 5px;
  font-size: 22px;
}

.toplevelbutton:hover {
  background-color: rgb(96, 154, 181);
  color: white;
}

.selection-list {
  display: none; /* Initially hidden */
  position: absolute; /* Positioning the list below the button */
  top: 55px; /* Position the list directly below the button */
  left: 160px;
  background-color: rgb(0, 62, 97);
  /* background-color: rgb(255, 255, 255); */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  list-style-type: none;
  padding: 0;
  margin: 0;
  width: 200px; /* Fixed width */
  z-index: 1000; /* Ensure it appears above other content */
}

.selection-list li {
  padding: 10px;
  cursor: pointer;
  color: white;
}

.selection-list li:hover {
  background-color: rgb(96, 154, 181);
  color: white;
}

.toplevelbutton:hover + .selection-list,
.selection-list:hover {
  display: block;
}
