.interactive-map.ratio-landscape {
  aspect-ratio: 1408/654;
}
.interactive-map.ratio-square {
  aspect-ratio: 1/1;
}
.interactive-map.ratio-square .map-wrapper {
  aspect-ratio: inherit;
}
.interactive-map.ratio-portrait {
  aspect-ratio: 9/16;
}
.interactive-map.ratio-portrait .map-wrapper {
  aspect-ratio: inherit;
}
.interactive-map {
  --map-scale: 1;
  --map-base-translate-x: 0px;
  --map-base-translate-y: -15%;
  --map-translate-x: var(--map-base-translate-x);
  --map-translate-y: var(--map-base-translate-y);
  --map-full-translate-x: 0px;
  --map-full-translate-y: -15%;
}
.interactive-map .map-wrapper {
  background: var(--Primary-country-map-bg);
}
.interactive-map .map-wrapper svg {
  width: 100%;
  height: 100%;
  transform: translate(var(--map-translate-x), var(--map-translate-y)) scale(var(--map-scale));
  transform-origin: 0 0;
  transform-box: fill-box;
  shape-rendering: geometricPrecision;
}
.interactive-map .map-wrapper .map-fill,
.interactive-map .map-wrapper .map-stroke,
.interactive-map .map-wrapper .map-path {
  fill: var(--Primary-map-country);
  stroke: var(--Primary-map-country);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.interactive-map .map-wrapper .country-label {
  font-size: 12px;
  font-weight: 300;
  paint-order: stroke;
  fill: var(--Primary-Dark-Background);
  stroke: var(--Primary-Dark-Background);
  stroke-width: 1;
  pointer-events: none;
  letter-spacing: 1px;
}
.interactive-map .map-wrapper #pins .pin path {
  fill: var(--Pin-Map-Color);
  stroke: var(--Pin-Map-Color);
}
.interactive-map .map-wrapper #countries .active {
  position: relative;
}
.interactive-map .map-wrapper #countries .active .map-fill,
.interactive-map .map-wrapper #countries .active .map-stroke,
.interactive-map .map-wrapper #countries .active .map-path {
  fill: var(--Primary-Dark-Background);
  stroke: var(--Primary-Light-Contrast);
}
.interactive-map .map-wrapper #countries .active .pin path {
  fill: var(--Secondary-Light-Stroke);
  stroke: var(--Secondary-Light-Stroke);
  z-index: 10;
}
.interactive-map .map-wrapper #countries .active.past .map-fill,
.interactive-map .map-wrapper #countries .active.past .map-stroke,
.interactive-map .map-wrapper #countries .active.past .map-path {
  fill: var(--Primary-Light-Foreground);
  stroke: var(--Primary-Light-Foreground);
}

.zoom-mode {
  --map-scale: 2.2;
}
.zoom-mode.in-card {
  --map-scale: 3.9;
}
.zoom-mode {
  --map-base-translate-x: 276px;
  --map-base-translate-y: -134px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
}

.zoom-mode.zoom-ready {
  opacity: 1;
  visibility: visible;
}

.ani-zoom-in {
  --ani-duration: 0.9s;
  --ani-easing: cubic-bezier(0.4, 0, 0.2, 1);
  transition: none;
}
.ani-zoom-in.zoom-ready {
  opacity: 1;
  visibility: visible;
}
.ani-zoom-in.zoom-ready .map-wrapper svg {
  animation: map-zoom-in var(--ani-duration) var(--ani-easing) both;
}

@keyframes map-zoom-in {
  from {
    transform: translate(var(--map-full-translate-x), var(--map-full-translate-y)) scale(1);
  }
  to {
    transform: translate(var(--map-translate-x), var(--map-translate-y)) scale(var(--map-scale));
  }
}
.hover-zoom-in {
  --ani-duration: 0.6s;
  --ani-easing: cubic-bezier(0.4, 0, 0.2, 1);
  transition: none;
}
.hover-zoom-in.zoom-ready {
  opacity: 1;
  visibility: visible;
}
.hover-zoom-in.zoom-ready .map-wrapper svg {
  transform: translate(var(--map-full-translate-x), var(--map-full-translate-y)) scale(1);
  transition: transform var(--ani-duration) var(--ani-easing);
}
.hover-zoom-in.zoom-ready:hover .map-wrapper svg {
  transform: translate(var(--map-translate-x), var(--map-translate-y)) scale(var(--map-scale));
}

.hover-zoom-out {
  --ani-duration: 1s;
  --ani-easing: cubic-bezier(0.4, 0, 0.2, 1);
  transition: none !important;
}
.hover-zoom-out.zoom-ready {
  opacity: 1;
  visibility: visible;
}
.hover-zoom-out.zoom-ready .map-wrapper svg {
  transition: transform var(--ani-duration) var(--ani-easing);
  transition-delay: 0.2s;
}
.hover-zoom-out.zoom-ready:hover .map-wrapper svg {
  transform: translate(var(--map-full-translate-x), var(--map-full-translate-y)) scale(1);
  transition-delay: 0s;
}

.ani-zoom-out {
  --ani-duration: 0.9s;
  --ani-easing: cubic-bezier(0.4, 0, 0.2, 1);
  transition: none;
}
.ani-zoom-out.zoom-ready {
  opacity: 1;
  visibility: visible;
}
.ani-zoom-out.zoom-ready .map-wrapper svg {
  animation: map-zoom-out var(--ani-duration) var(--ani-easing) forwards;
}

@keyframes map-zoom-out {
  from {
    transform: translate(var(--map-translate-x), var(--map-translate-y)) scale(var(--map-scale));
  }
  to {
    transform: translate(var(--map-full-translate-x), var(--map-full-translate-y)) scale(1);
  }
}
