/* CSS for the Mapping Centre top navigation menu*/

#mapping-navbar {
  position: absolute;
  z-index: 999;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 20px;
  width: max-content;
  padding: 0;
  min-height:40px;
  height:fit-content;
  margin:0;
  background-color: white;
  border-bottom: 2px solid lightblue;
  border-right: 2px solid lightblue;
  border-bottom-right-radius: 5px;
}

#mapping-navbar-left, #mapping-navbar-right {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#mapping-navbar-left {
  width: 600px;
  gap: 10px;
}
#mapping-navbar-right {
  width: max-content;
  margin: 0;
}

.compare_profiles_nav {
  display: flex;
  align-items: center;
  height: 30px;
}

.dropdown-menu {
  font-size: 12px;
}

/* Shift the left toolbar down so its under the mapping navbar */
.leaflet-top.leaflet-left {
  margin-top: 50px;
}

/* On wide screens, that can fit all the nav buttons*/
@media (min-width: 1400px) {

  /* "Navigation" expand/collapse button is hidden*/
  button#navbar-nav-btn {
    display: none;
  }

  #mapping-navbar-left {
    display: flex!important; /* prevents a bug where shrinking the window then expanding it again makes this navbar disappear*/
    /* equal width buttons*/
    li {
      flex: 1 1 0;
      button {
        width: 100%;
      }
    }
  }

}

/* On small screens, which need the "Navigation" button to expand/collapse the navbar*/
@media (max-width: 1399px) {
  /* button is revealed*/
  button#navbar-nav-btn {
    margin: 6px 5px 5px 11px;
    float: left;
    padding-bottom: 6px;
    padding-top: 6px;
    border: 1px solid #444;
  }
  /* this becomes a dropdown menu*/
  #mapping-navbar-left {
    display: none;
    margin: 0 !important;
    z-index: 9999;
    position: absolute;
    float: none !important;
    background-color: var(--polaris_blue);
    flex-direction: column;
    left: 11px;
    width: 208px;
    top: 38px;
    gap: 0;
    li:hover {
      background-color: sandybrown;
    }
    li {
      button, a {
        background-color: transparent !important;
        color: white;
        outline: none !important;
        margin: 0 !important;
        border: none;
        width: 208px;
        display: block;
        height: 40px;
      }
    }
  }
  .dropdown-menu {
    background-color: #808080;
    li {
      color: white;
      a {
        display: flex !important;
        justify-content: center;
        align-items: center;
      }
    }
  }
}

/* Geocoding*/

#geoSearchList {

  .spinner_container {
    display: block;
    width: 30px;
    height: 30px;
    position: absolute;
    right: -35px;
  }

  form {
    margin: 0;
    padding: 0;
    #geocoding_input_text {
      height: 30px;
      font-size: 14px;
      padding: 2px 5px 2px 5px;
      display: inline-block;
      vertical-align: middle;
    }
    #geocoding_search_list_form{
      display:none;
      position: absolute;
      top: 40px;
      width: max-content;
      max-width: 450px;
      height: fit-content;
      border: lightgrey solid 1px;
      z-index: 99999;
      border-radius: 5px;
    }
    button#geocoding {
      margin-right: 10px;
    }

  }
}
#geocoding_search_list_form {

  #ul_list{
    padding: 10px;
    width: 100%;
    height: fit-content;
    background-color: white;

    ul{
      width: 100%;
      padding-left: 0;
      margin: 0;

      li {
        display: block; /* POL-10901 */
        border-bottom: solid lightgrey 1px;
        text-align: left;
        list-style: none;
        width: 100%;
        cursor: pointer;
        padding: 1px 5px 1px 5px;
        margin: 0;
        div {
          text-overflow: ellipsis;
          text-wrap: none;
          overflow: hidden;
          white-space: nowrap;
          margin: 0;
        }
      }
      li:last-child {
        border-bottom: none;
      }

      li:hover, li.selected {
        background-color: rgba(164, 219, 232, 0.5);
      }
    }
  }
}


/* Some old CSS, not exactly sure what it does so I'd rather not remove it.*/
input#geocoding_input_text.form-control[type="text"] {
  width: intrinsic; /* Safari/WebKit uses a non-standard name */
  width: -moz-max-content; /* Firefox/Gecko */
  width: -webkit-max-content; /* Chrome */
  width: max-content;
}

input#geocoding_input_text {
  max-width: 180px;
}
.leaflet-map-pane .leaflet-objects-pane svg, .leaflet-map-pane .leaflet-objects-pane .leaflet-overlay-pane .leaflet-draw-guides .leaflet-draw-guide-dash {
  z-index: 8000;
}
.poi-polyline {
  transform: translateY(-20px);
}