/* map specific css styles */

/* hide outlines */
* {
  outline: 0 !important;
}

#map {
  min-height: 790px;
  height: 90vh;
  border-radius: 1rem;
  -webkit-border-radius: 1rem;
  -moz-border-radius: 1rem;
  position: relative;
  z-index: 500;
  background: #fff url('/static/assets/spinner.gif') no-repeat center; /* Spinner built using https://loading.io/ */
  -webkit-box-shadow: 0px 2px 20px -10px rgba(0,0,0,0.1);
  -moz-box-shadow: 0px 2px 20px -10px rgba(0,0,0,0.1);
  box-shadow: 0px 2px 20px -10px rgba(0,0,0,0.1);
}

#map.small {
  height: 60vh;
}

#map.crosshair {
  cursor: crosshair !important;
}

/* Pulsating marker code adapted from https://jsfiddle.net/3rhzn1au/ */
.pulse {
    display: block;
    border-radius: 50%;
    margin: 0;
    width: 20px;
    height: 20px;
    background: #007bff;
    color: #007bff;
    border: 3px solid #fff;
    box-shadow: 0 0 0 #007bff;
    cursor: pointer;
    animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    -moz-box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 0;
  }
  70% {
      -moz-box-shadow: 0 0 0 10px rgba(0, 0, 0, 0);
      box-shadow: 0 0 0 10px rgba(0, 0, 0, 0);
  }
  100% {
      -moz-box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
      box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
  }
}

.leaflet-div-icon {
  background: rgba(0,0,0,0);
  border: none;
}
/* end reference */

.star {
  font-size: 20px;
  margin-top: -13px;
  display: inline-block;
  color: #007bff;
  transition: all .5s;
}

.star.red {
  color: red;
}

.star:before {
  content: '\2605';
}

.outlined .star {
  transform: scale(2);
  -webkit-text-fill-color: #007bff;
  -webkit-text-stroke-width: 1.3px;
  -webkit-text-stroke-color: #8ebdff;
}

.outlined .star.red {
  -webkit-text-fill-color: red;
  -webkit-text-stroke-color: #ff8e88;
}

.leaflet-routing-container .star {
  margin-top: -2px;
  font-size: 14px;
}
/* end reference */

.number {
  font-weight: 600;
  font-size: .7rem;
  color: black;
  margin-left: 3px;
  margin-top: -5px;
  display: block;
  text-align: center;
  width: 15px;
  background: white;
  opacity: .75;
  border-radius: 50%;
  transition: all .5s;
}

.leaflet-div-icon {
  background: rgba(0,0,0,0) !important;
  border: none !important;
}

.leaflet-popup-content {
  margin: 19px 13px 13px 13px;
  font-size: 13px;
  color: #6c757d;
  min-width: 250px;
  max-width: 70vw;
}

.leaflet-popup-content strong {
  font-weight: 500;
  font-size: 14px;
  color: #212529;
}

.leaflet-popup-content img {
  margin-top: 10px;
  width: 100%;
  height: auto;
  border-radius: 5px;
}

.leaflet-routing-alt td {
  min-width: 50px;
}

.info {
  width: 30px;
  height: 30px;
  display: block;
  margin-left: -5px;
  margin-top: -8px;
}

.popup-link {
  cursor: zoom-in;
}

.hidden {
  display: none;
}

.current-location {
  left: 4px;
  margin-top: 24px;
}

.leaflet-routing-container {
  max-height: 35vh;
  min-height: 160px;
  overflow-y: auto;
}

.leaflet-routing-alt, .leaflet-routing-geocoders, .leaflet-routing-error {
  max-height: none !important;
}

.leaflet-top.leaflet-right {
  margin-right: 10px !important;
  margin-top: 10px !important;
}

.leaflet-routing-collapse-btn::after {
  content: initial;
}

.leaflet-routing-collapse-btn {
  display: none;
}

.leaflet-routing-alt table {
  width: 100%;
}

.leaflet-popup-content h6 {
  color: #212529;
  margin-bottom: 8px;
  font-size: 14px;
}

.leaflet-popup-content p {
  margin: 0;
  font-size: 12px;
  line-height: 18px;
  max-height: 50vh;
  overflow-y: auto;
}

.button-state {
  color: #404040;
}

.leaflet-marker-icon {
  width: 25px !important;
  height: 25px !important;
  text-align: center !important;
}

.leaflet-routing-alt td {
  line-height: 25px;
}

.leaflet-routing-alt tr > td:first-child {
  display: none;
}

.leaflet-routing-container[class*="i-1-"], .leaflet-routing-container[class*="i-2-"] {
  display: none;
}

.leaflet-routing-container[class*="-0"] {
  display: block;
}

@media (max-width: 768px) {

  .leaflet-routing-container {
    display: none;
    min-height: unset !important;
    max-height: 30vh;
    max-width: calc(100vw - 90px);
    margin-bottom: 10px !important;
  }

  .leaflet-routing-container[class*="-0"] {
    display: none;
  }

  #map {
    min-height: 80vh;
    height: 80vh;
  }

  .leaflet-container a.leaflet-popup-close-button {
    font-size: 22px;
    right: 3px;
    top: 3px;
  }

  .mfp-close {
    font-size: 40px;
  }

  .leaflet-popup-content p {
    max-height: 55vh;
  }

  .leaflet-popup-content {
    width: auto !important;
  }

}
