/* The SVG, its native state titles and the text list remain usable without JS. */
.market-map {
  position: relative;
  isolation: isolate;
  width: 100%;
}

.market-map__canvas > svg {
  display: block;
  width: 100%;
  height: auto;
}

.market-map.is-interactive .market-map__state {
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.market-map.is-interactive svg > path:not(.market-map__state),
.market-map.is-interactive svg text,
.market-map__outline {
  pointer-events: none;
}

.market-map__state:focus {
  outline: none;
}

.market-map__state:focus-visible {
  stroke: #F0361A;
  stroke-width: 2.5px;
  vector-effect: non-scaling-stroke;
}

.market-map__outline {
  opacity: 0;
  transition: opacity 120ms ease;
}

.market-map__outline.is-visible {
  opacity: 1;
}

.market-map__halo,
.market-map__highlight {
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.market-map__halo {
  fill: none;
  stroke: #fff;
  stroke-width: 4.5px;
}

.market-map__highlight {
  fill: #F0361A;
  fill-opacity: .1;
  stroke: #F0361A;
  stroke-width: 2.5px;
}

.market-map__popup {
  position: absolute;
  z-index: 2;
  box-sizing: border-box;
  width: max-content;
  max-width: min(260px, calc(100% - 16px));
  padding: 12px 16px;
  border: 1px solid rgba(14, 53, 72, .12);
  border-top: 3px solid #F0361A;
  border-radius: 8px;
  background: #fff;
  color: #0E3548;
  box-shadow: 0 6px 20px rgba(14, 53, 72, .16);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.45;
  text-align: left;
  pointer-events: auto;
}

.market-map__popup[hidden] {
  display: none;
}

/* This transparent bridge keeps the callout open while the pointer enters it. */
.market-map__popup::before {
  content: "";
  position: absolute;
  inset: -12px;
  z-index: -1;
}

.market-map__popup::after {
  content: "";
  position: absolute;
  left: var(--map-popup-tip, 50%);
  bottom: -5px;
  width: 8px;
  height: 8px;
  background: #fff;
  border-right: 1px solid rgba(14, 53, 72, .12);
  border-bottom: 1px solid rgba(14, 53, 72, .12);
  transform: translateX(-50%) rotate(45deg);
}

.market-map__popup[data-placement="below"]::after {
  top: -6px;
  bottom: auto;
  background: #F0361A;
  border: 0;
}

.market-map__popup strong,
.market-map__popup span {
  display: block;
}

.market-map__popup strong {
  margin-bottom: 2px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.market-map__hint {
  display: none;
  margin: 10px 0 0;
  color: #526873;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.market-map.is-interactive .market-map__hint {
  display: block;
}

.market-map__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .market-map__outline {
    transition: none;
  }
}

@media (forced-colors: active) {
  .market-map__highlight,
  .market-map__state:focus-visible {
    stroke: Highlight;
  }

  .market-map__popup {
    border-color: CanvasText;
    color: CanvasText;
    background: Canvas;
  }
}
