html,
body {
  margin: 0;
  padding: 0;
  font-family: 'Swiss', sans-serif;
  box-sizing: border-box;
}
.hero-map {
  height: 68vw;
  width: 100%;
  position: relative;
  background-color: #020d18;
  max-height: 100vh;
  overflow-x: hidden;
  overflow-y: hidden;
}
#amchart_component {
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background: #020d18;
}

.map-marker {
  margin-left: -8px;
  margin-top: -8px;
  box-sizing: border-box;
  cursor: pointer;
  pointer-events: none;
}
.map-marker.clickable {
  pointer-events: all;
}
.map-marker .dot {
  border: 4px solid transparent;
  background: transparent;
  -webkit-border-radius: 60px;
  -moz-border-radius: 60px;
  border-radius: 60px;
  height: 10px;
  width: 10px;
  -webkit-animation: pulse 3s ease-out;
  -moz-animation: pulse 3s ease-out;
  animation: pulse 3s ease-out;
  -webkit-animation-iteration-count: infinite;
  -moz-animation-iteration-count: infinite;
  animation-iteration-count: infinite;
  position: absolute;
  top: -20px;
  left: -20px;
  z-index: 1;
  opacity: 0;
  box-sizing: border-box;
}

.map-popup {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  min-height: 200px;
  width: 420px;
  transform: translateX(420px);
  background: linear-gradient(to top right, #062c48, #0b4568);
  max-height: calc(100vh - 360px);
  height: auto;
  margin: auto;
  transition: transform 0.2s ease-out;
  color: white;
  z-index: 2;
}
.map-popup .main-map-desc {
  padding: 30px;
}
.map-popup .bottom-desc {
  position: absolute;
  bottom: 0;
  left: 0;
  padding: 30px;
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
}
.map-popup * {
  color: white;
}
.map-popup.active {
  transform: translateX(0px);
  background: linear-gradient(to top right, #062c48, #0b4568);
}
.map-popup .close {
  cursor: pointer;
  padding: 30px;
  padding-bottom: 0;
}

.hero-map {
  height: 68vw;
  width: 100%;
  position: relative;
  background-color: #020d18;
  max-height: 100vh;
  overflow-x: hidden;
  overflow-y: hidden;
}
.hero-map #amchart_component {
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;

  left: 0;
}
.hero-map .container {
  position: absolute;
  height: 100%;
  right: 0;
  left: 0;
}
.map-image {
  background-size: cover;
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  transition: transform 0.4s ease-out;
  transform-origin: top left;
}
.map-image.zoomed {
  transform: scale(2);
}
.map-image .locations {
  height: 100%;
  width: 100%;
  position: absolute;
  overflow: hidden;
}
.map-image .locations .marker {
  position: absolute;
  width: auto;
  color: white;
}
.map-image.zoomed .locations .marker {
  transform: scale(0.5);
  transform-origin: top left;
}
.map-image .locations .marker .marker-details {
  opacity: 0;
  position: relative;
  left: -10px;
  top: -40px;
  padding: 20px 40px 20px 40px;
  background: linear-gradient(to top right, #062c48, #0b4568);
  color: white;
  z-index: 0;
  display: none;
  pointer-events: none;
  max-height: 200px;
  overflow: scroll;
}
.map-image .locations .marker .marker-details p {
  color: white;
  font-size: 14px;
}
.map-image .locations .marker:hover .marker-details {
  opacity: 1;
  display: block;
  pointer-events: all;
  z-index: 10;
}
.map-image .locations .marker:hover {
  z-index: 10;
}

#amchart_component .map-marker:before {
  display: block;
  width: 6px;
  height: 6px;
  display: flex;
  color: white;
  align-items: center;
  cursor: pointer;
  justify-content: center;
  position: relative;
  z-index: 1;
  position: absolute;
}
.map-image .locations .marker:hover:before {
  z-index: 11;
}
.facility {
  font-family: 'Swiss', sans-serif;
}
#amchart_component .map-marker.facility:before {
  content: '✕';
}
#amchart_component .map-marker.e_manu:before {
  content: '✕';
  transform: rotate(45deg);
}
#amchart_component .map-marker.manu:before {
  content: ' ';
  border: 1px solid white;
}
#amchart_component .map-marker.e_dist:before {
  content: ' ';
  border: 1px solid white;
  border-radius: 100px;
}
#amchart_component .map-marker.grouped {
  background: white;
  border: 3px solid white;
  border-radius: 3px;
}
#amchart_component .map-marker.grouped:before {
  opacity: 0;
}
.locations .marker hr {
  border: none;
  width: 100%;
  height: 1px;
  background: white;
  opacity: 0.3;
}
.locations .marker-details hr:last-of-type {
  display: none;
}

#amchart_component .map-marker.ungrouped-true:before {
  opacity: 1;
  font-size: 12px;
}
#amchart_component .map-marker.ungrouped-true .dot {
  display: none;
}
#amchart_component .map-marker.grouped.ungrouped-true {
  border: none;
  background: transparent;
}
.map-marker.ungrouped-true {
  pointer-events: all;
}

.bottom-desc .marker {
  padding-left: 20px;
}
.bottom-desc .marker:before {
  display: block;
  width: 12px;
  height: 12px;
  display: flex;
  color: white;
  left: 20px;
  align-items: center;
  cursor: pointer;
  justify-content: center;
  position: relative;
  z-index: 1;
  position: absolute;
}
.bottom-desc .marker.facility:before {
  content: '✕';
}
.bottom-desc .marker.e_manu:before {
  content: '✕';
  transform: rotate(45deg);
}
.bottom-desc .marker.manu:before {
  content: ' ';
  border: 1px solid white;
}
.bottom-desc .marker.e_dist:before {
  content: ' ';
  border: 1px solid white;
  border-radius: 100px;
}

.map-legend {
  position: absolute;
  background: linear-gradient(to top right, #062c48, #0b4568);
  color: white;
  width: 420px;
  height: auto;
  bottom: 0;
  left: 0;
  max-height: 450px;
  z-index: 4;
  min-width: 280px;
}

.map-legend .list {
  padding: 30px;
  padding-left: 60px;
  padding-bottom: 0;
}

.map-legend .bottom {
  background: rgba(0, 0, 0, 0.2);
  color: white;
  width: 100%;
  max-width: fit-content;
  padding: 20px 30px;
  font-size: 12px;
  line-height: 18px;
}

.map-legend h3 {
  color: white;
  position: relative;
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 400;
  font-family: 'Swiss';
  text-transform: none;
}

.map-legend h3:before {
  width: 13px;
  height: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: -26px;
  top: 4px;
}
.map-legend h3.facility:before {
  content: '✕';
}
.map-legend h3.e_manu:before {
  content: '✕';
  transform: rotate(45deg);
}
.map-legend h3.manu:before {
  content: ' ';
  border: 1px solid white;
}
.map-legend h3.e_dist:before {
  content: ' ';
  border: 1px solid white;
  border-radius: 100px;
}
.map-legend h3.multi:before {
  content: '•';
  transform: rotate(45deg);
}

.panel > div {
  display: flex;
  flex-wrap: wrap;
}
.panel .location {
  padding: 0px 0px 20px 0;
  width: 100%;
}

.productsTitle {
  width: 100%;
  background-color: #e4e6e6;
  padding: 20px 0;
}
.productsTitle h1 {
  padding-left: 90px;
}

.marker-box-mobile.active {
  display: none;
}

@media screen and (max-width: 980px) {
  .productsTitle h1 {
    padding-left: 0;
  }

  .hero-map {
    height: 150vw;
  }
  .map-image {
    height: 150vw;
    width: 266vw; /* This is the aspect ratio of the map image */
  }
  .map-legend {
    display: none;
  }
  .map-legend h3 {
    font-size: 14px;
  }

  .map-popup {
    z-index: 1000;
    max-width: 100%;
    height: 100%;
    max-height: none;
  }

  .map-image .locations .marker:hover .marker-details {
    display: none;
  }

  .marker-box-mobile:before {
    content: '✕';
    position: absolute;
    top: 0;
    right: 0;
    padding: 20px;
    font-size: 12px;
    display: block;
  }

  .locations .marker-box-mobile {
    height: 100%;
    pointer-events: none;
    opacity: 0;
    position: fixed;
    width: 100%;
    background: #062c47;
    z-index: 8;
    height: calc(100vh - 160px);
    color: white;
    top: 140px;
    width: 95%;
    right: 0;
    left: 0;
    margin: auto;
    overflow: scroll;
    padding: 25px;
  }
  .locations .marker-box-mobile p {
    color: white;
  }
  .locations .marker-box-mobile hr {
    height: 1px;
    border: none;
    width: 100%;
    background: white;
  }
  .marker-box-mobile.active {
    opacity: 1;
    pointer-events: all;
    display: block;
    z-index: 10;
  }
}
