:root {
  --cda-color-accent: #d0603d;
  --cda-color-bg-white: #ffffff;
  --cda-popup-bg: rgba(18, 29, 39, 0.88);
  --cda-popup-title: #ffffff;
  --cda-popup-text: rgba(255, 255, 255, 0.88);
  --cda-popup-shadow: 0 20px 40px rgba(7, 16, 24, 0.35);
}

.cda-projects-map {
  position: relative;
  width: 100%;
  isolation: isolate;
}

.cda-projects-map__image {
  width: 100%;
  height: auto;
  display: block;
}

.cda-projects-map__marker {
  --marker-x: 50%;
  --marker-y: 50%;
  --popup-offset: 16px;
  --popup-hidden-y: 8px;
  --popup-visible-y: 0;
  position: absolute;
  left: var(--marker-x);
  top: var(--marker-y);
  transform: translate(-50%, -100%);
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  z-index: 1;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.cda-projects-map__marker:hover,
.cda-projects-map__marker:focus-visible,
.cda-projects-map__marker:focus-within,
.cda-projects-map__marker.is-active {
  background: transparent;
  z-index: 10;
}

.cda-projects-map__marker-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--cda-color-accent);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  display: block;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cda-projects-map__marker-dot::before {
  content: "";
  position: absolute;
  inset: 2.5px;
  border-radius: 50%;
  background: var(--cda-color-bg-white);
}

.cda-projects-map__marker-dot::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 4.5px solid transparent;
  border-right: 4.5px solid transparent;
  border-top: 6px solid var(--cda-color-accent);
}

.cda-projects-map__marker:hover .cda-projects-map__marker-dot,
.cda-projects-map__marker:focus-visible .cda-projects-map__marker-dot,
.cda-projects-map__marker:focus-within .cda-projects-map__marker-dot,
.cda-projects-map__marker.is-active .cda-projects-map__marker-dot {
  transform: scale(1.25);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.cda-projects-map__marker-icon {
  width: 24px;
  height: 24px;
  display: block;
  object-fit: contain;
  transition: transform 0.25s ease, filter 0.25s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.28));
}

.cda-projects-map__marker:hover .cda-projects-map__marker-icon,
.cda-projects-map__marker:focus-visible .cda-projects-map__marker-icon,
.cda-projects-map__marker:focus-within .cda-projects-map__marker-icon,
.cda-projects-map__marker.is-active .cda-projects-map__marker-icon {
  transform: scale(1.15);
}

.cda-projects-map__popup {
  position: absolute;
  left: 0;
  bottom: calc(100% + var(--popup-offset));
  width: min(var(--popup-max-width, 320px), calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  max-height: var(--popup-max-height, none);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 20px;
  border-radius: 12px;
  background: var(--cda-popup-bg);
  box-shadow: var(--cda-popup-shadow);
  color: var(--cda-popup-title);
  text-align: left;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(var(--popup-hidden-y));
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.cda-projects-map__popup::after {
  content: "";
  position: absolute;
  left: var(--popup-arrow-left, 50%);
  bottom: -10px;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid var(--cda-popup-bg);
}

.cda-projects-map__popup-title {
  display: block;
  margin-bottom: 10px;
  color: var(--cda-popup-title);
  font-size: 20px;
  line-height: 1.25;
  font-weight: 700;
}

.cda-projects-map__popup-description {
  display: block;
  color: var(--cda-popup-text);
  font-size: 15px;
  line-height: 1.55;
}

.cda-projects-map__popup-description > :first-child {
  margin-top: 0;
}

.cda-projects-map__popup-description > :last-child {
  margin-bottom: 0;
}

.cda-projects-map__popup-description p,
.cda-projects-map__popup-description ul,
.cda-projects-map__popup-description ol,
.cda-projects-map__popup-description blockquote {
  margin: 0 0 0.75em;
}

.cda-projects-map__popup-description ul,
.cda-projects-map__popup-description ol {
  padding-left: 1.2em;
}

.cda-projects-map__popup-description a {
  color: #ffffff;
  text-decoration: underline;
}

.cda-projects-map__popup-description strong,
.cda-projects-map__popup-description b {
  color: #ffffff;
}

.cda-projects-map__popup-description h3,
.cda-projects-map__popup-description h4 {
  margin: 0 0 0.55em;
  color: #ffffff;
  line-height: 1.3;
}

.cda-projects-map__popup-description h3 {
  font-size: 18px;
}

.cda-projects-map__popup-description h4 {
  font-size: 16px;
}

.cda-projects-map__marker.is-popup-below {
  --popup-hidden-y: -8px;
}

.cda-projects-map__marker.is-popup-below .cda-projects-map__popup {
  top: calc(100% + var(--popup-offset));
  bottom: auto;
}

.cda-projects-map__marker.is-popup-below .cda-projects-map__popup::after {
  top: -10px;
  bottom: auto;
  border-top: 0;
  border-bottom: 10px solid var(--cda-popup-bg);
}

.cda-projects-map__marker.is-active .cda-projects-map__popup {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(var(--popup-visible-y));
}

@media (hover: hover) and (pointer: fine) {
  .cda-projects-map__marker:hover .cda-projects-map__popup,
  .cda-projects-map__marker:focus-visible .cda-projects-map__popup,
  .cda-projects-map__marker:focus-within .cda-projects-map__popup {
    opacity: 1;
    visibility: visible;
    transform: translateY(var(--popup-visible-y));
  }
}

.cda-projects__no-coords {
  text-align: center;
  font-style: italic;
}

@media (max-width: 767px) {
  .cda-projects-map__popup {
    width: 100%;
    max-width: 100%;
    max-height: none;
    padding: 14px 16px;
    border-radius: 10px;
    z-index: 30;
  }

  .cda-projects-map__popup::after {
    display: block;
  }

  .cda-projects-map__popup-title {
    margin-bottom: 8px;
    font-size: 15px;
  }

  .cda-projects-map__popup-description {
    font-size: 12px;
    line-height: 1.45;
  }
}

@media (min-width: 1024px) {
  .cda-projects-map__marker-dot {
    width: 16px;
    height: 16px;
  }

  .cda-projects-map__marker-dot::before {
    inset: 4px;
  }

  .cda-projects-map__marker-dot::after {
    bottom: -5px;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid var(--cda-color-accent);
  }

  .cda-projects-map__marker-icon {
    width: 30px;
    height: 30px;
  }
}
