:root {
  --marker-width: 23px;
  --marker-height: 28px;
  --marker-bg-color: white;
}

.marker {
    background-color: transparent;
    background-size: cover;
    width: var(--marker-width);
    height: var(--marker-height);
    cursor: pointer;
    border: transparent;

    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: visible;
    padding: 0;
}

.marker::before {
    content: '';
    display: block;
    position: absolute;
    top: 1px;
    left: -1px;
    width: var(--marker-width);
    height: var(--marker-height);
    background-color: var(--marker-bg-color);
    mask-image: url(../img/default-blurred-pin.svg);
    mask-repeat: no-repeat;
    -webkit-mask-image: url(../img/default-blurred-pin.svg);
    -webkit-mask-repeat: no-repeat;
    background-clip: border-box;
}

.marker::after {
    content: '';
    clip-path: url('#mapbox-pin-clip-path');
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: var(--marker-width);
    height: var(--marker-height);
    background-color: var(--marker-bg-color);
}

.marker:not(.visible) {
  opacity: 0.0 !important;
  visibility: hidden;
  transition-property: opacity, visibility;
  transition-duration: 0.25s;
  transition-timing-function: ease-in-out;
}

.marker.featured::after {
    content: '';
    display: block;
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    background-image: url(../img/featured-pin.svg);
}

.marker.selected {
    --marker-bg-color: black !important;
}

.marker .icon-container {
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}
.marker .icon-container .icon {
  display: block;
  width: 14px;
  height: auto;
  padding-bottom: 3px;
}

.map-pin-popup {
    position: relative;
    height: 100%;
    background-color: #fff;
    display: none;
}

.map-pin-popup.visible {
    display: block;
}

.map-pin-popup .close-btn {
    float: right;
    background-color: transparent;
    border: none;
    font-family: "alternate-gothic-atf", sans-serif;
    color: #CD1919;
    font-size: 20px;
    line-height: 40px;
    font-weight: 700;
    padding-right: 21px;
    padding-top: 10px;
}

.map-pin-popup figure {
    height: unset;
}

.map-pin-popup figure img {
    width: unset;
    height: unset;
}

.map-pin-popup figure::after {
    content: '';
    display: block;
    height: 6px;
    background: #CD1919;
}

.map-pin-popup h1, .map-pin-popup h2, .map-pin-popup h3, .map-pin-popup h4, .map-pin-popup h5, .map-pin-popup h6 {
    text-transform: uppercase;
}

.map-pin-popup .inner-wrapper {
    padding: 29px;
    background-color: white;
}

.map-pin-popup .body {
    font-size: 14px;
    font-family: "neue-frutiger-world", sans-serif;
    line-height: 30px;
    margin: 35px 0 40px;
}

.map-pin-popup .links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 0;
}

.map-pin-container {
    height: 100%;
    /* max-width: 355px; */
    visibility: hidden;
    overflow-y: scroll;
}

@media (min-width: 1281px) {
    .map-pin-container {
        max-width: 455px;
    }
}

.map-pin-container.visible {
    visibility: visible;
    z-index: 4;
    position: relative;
}

.mapbox-outer {
    aspect-ratio: 9 / 14.4;
}
.mapbox-outer.remove-aspect-ratio {
    aspect-ratio: unset;
}

.mapboxgl-canvas-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

@media (min-width: 768px) {
    .mapbox-outer {
        aspect-ratio: 9 / 9.024;
    }
    .marker {
        width: var(--marker-width);
        height: var(--marker-height);
    }
    .map-pin-container {
        max-width: 380px;
    }
    .map-pin-popup .inner-wrapper {
        padding: var(--marker-width);
    }
}

@media (min-width: 1280px) {
    .mapbox-outer {
        width: 100%;
        max-height: 860px;
    }
    .map-pin-popup .close-btn {
        font-size: 25px;
    }
    .map-pin-container {
        max-width: 565px;
    }
    .map-pin-popup .inner-wrapper {
        padding: 40px;
    }
    .map-pin-popup .body {
        font-size: 15px;
    }
}
@media (min-width: 1920px) {
    .mapbox-outer {
        aspect-ratio: 16 / 7.5;
    }
    .map-pin-popup .body {
        word-spacing: -1px;
        font-size: 16px;
        line-height: 35px;
    }
    .map-pin-container {
        max-width: 455px;
    }
    .map-pin-popup .inner-wrapper {
        padding: 48px;
    }
}

a.mapboxgl-ctrl-logo.invisible {
    visibility: hidden;
}

.mapboxgl-ctrl-attrib-button.invisible {
    visibility: hidden;
}

.mapboxgl-ctrl-top-right.invisible {
    visibility: hidden;
}

ul.legend {
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 3;
  margin: 0;
  padding: 1rem 2rem;
  background-color: rgba(255, 255, 255, 0.75);
}
ul.legend li {
  list-style: none;
  padding: 0.25rem 0;
}
ul.legend li a {
  display: flex;
  align-items: center;
  color: #585858;
}
ul.legend li a:hover {
  color: #cd1919;
}
ul.legend li a:not(.selected):not([data-category-id='all']) {
  opacity: 0.5;
  filter: grayscale(0.5);
}
ul.legend li a .pin {
  display: flex;
}
ul.legend li a .category-name {
  padding-left: 10px;
  font-size: 14px;
  font-weight: bold;
  line-height: 20px;
}
ul.legend li a[data-category-id='all'] .category-name {
  padding-left: 0;
}
