:root {
  --ocean: #fff;
  --land: #e7ebf0;
  --border: #cfd6df;
  --green: #1db954;
  --panel: #0f1217;
  --panel-text: #f6f7f8;
  --panel-muted: #a7b0ba;
}

.trade-map {
  background: #fff;
}

.map-tight-wrap {
  width: 85%;
  margin: 0 auto;
  position: relative;
}
.map-tight-wrap svg {
  width: 100%;
  height: auto;
  display: block;
  background: var(--ocean);
}

/* Countries */
.country {
  fill: url(#mt-dots);
  stroke: var(--border);
  stroke-width: 0.5;
  cursor: pointer;
  transition: fill 0.2s;
}
.country.hovered {
  /* fill: #bde4a7; */
  fill: #cad7738f;
}
.country.selected {
  /* fill: #d7f3c2; */
  fill: #39b54a;
}

/* Borders */
.mt-bounds {
  fill: none;
  stroke: var(--border);
  stroke-width: 0.7;
}

/* Markers */
.mt-core {
  fill: #138a3d;
  stroke: #37ff00;
  stroke-width: 1.4;
}
.mt-glow {
  fill: var(--green);
  filter: url(#mt-glow);
  opacity: 0.25;
  animation: mt-blink 1.4s ease-in-out infinite;
}
@keyframes mt-blink {
  0%, 100% { opacity: .12; }
  50% { opacity: .5; }
}

/* Panel */
.mt-panel {
  --shiftX: 0px;
  position: absolute;
  z-index: 40;
  min-width: 240px;
  max-width: 320px;
  background: var(--panel);
  color: var(--panel-text);
  border-radius: 12px;
  padding: 12px 14px 10px;
  transform: translate(calc(-50% + var(--shiftX)), calc(-100% - 10px));
  box-shadow: 0 12px 28px rgba(0,0,0,.24);
}
.mt-panel.below {
  transform: translate(calc(-50% + var(--shiftX)), 10px);
}
.mt-panel h4 {
  margin: 0 0 6px;
  font-size: 16px;
  color: #fff;
  font-weight: 700;
}
.mt-muted {
  color: var(--panel-muted);
  font-size: 12px;
}
.mt-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 8px;
  margin: 8px 0 10px;
}
.mt-kpi {
  background: rgba(255,255,255,.06);
  border-radius: 9px;
  padding: 8px 10px;
}
.mt-kpi b {
  display: block;
  font-size: 18px;
  margin-bottom: 4px;
  color: #fff;
}
.mt-more {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-weight: 700;
  text-decoration: none;
  color: #07140c;
  background: var(--green);
  padding: 8px 12px;
  border-radius: 10px;
}

/* caret */
.mt-panel::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -8px;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid var(--panel);
}
.mt-panel.below::before {
  bottom: auto;
  top: -8px;
  border-top: none;
  border-bottom: 8px solid var(--panel);
}

/* Legend */
.mt-legend {
  margin: 12px auto 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  background: #0f1217;
  color: #b9c3cd;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
  width: fit-content;
}
.mt-legend .mt-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #1db954;
  border: 1px solid #fff;
  box-shadow: 0 0 0 1px #9aa3af;
}
