
.map-section {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 1rem;
  gap: 0.9rem;
  overflow: hidden;
}
.map-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.tool-btn {
  min-width: 56px;
  padding: 0.8rem 0.95rem;
}
.map-viewport {
  cursor: grab;
  touch-action: none;
  position: relative;
  min-height: 0;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(110, 196, 255, 0.16);
  background:
    radial-gradient(circle at 30% 20%, rgba(74, 182, 255, 0.12), transparent 30%),
    radial-gradient(circle at 78% 82%, rgba(74, 182, 255, 0.08), transparent 26%),
    linear-gradient(180deg, rgba(7, 15, 25, 0.96), rgba(7, 12, 20, 0.98));
}
.map-canvas {
  height: 100%;
  width: 100%;
  transform-origin: center center;
  transition: transform 160ms ease;
  display: block;
  overflow: hidden;
}
#europe-map {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
}
.graticule-line {
  fill: none;
  stroke: rgba(108, 192, 255, 0.08);
  stroke-width: 1;
}
.country-shape {
  fill: rgba(17, 43, 67, 0.96);
  stroke: rgba(123, 211, 255, 0.34);
  stroke-width: 1.1;
  vector-effect: non-scaling-stroke;
  transition: fill 120ms ease, stroke 120ms ease, filter 120ms ease, opacity 120ms ease;
  cursor: pointer;
}
.country-group:hover .country-shape,
.country-group.is-hovered .country-shape {
  fill: rgba(26, 79, 118, 0.98);
  stroke: rgba(154, 237, 255, 0.92);
  filter: url(#softGlow);
}
.country-group.is-selected .country-shape {
  fill: rgba(44, 134, 197, 0.98);
  stroke: rgba(220, 249, 255, 1);
  filter: url(#softGlow);
}

.country-shape:focus,
.country-shape:focus-visible {
  outline: none;
}

.country-group:focus-within .country-shape {
  fill: rgba(30, 96, 145, 0.98);
  stroke: rgba(220, 249, 255, 1);
  stroke-width: 2;
  filter: url(#softGlow);
}

.country-group.is-dimmed .country-shape {
  opacity: 0.26;
}
#map-tooltip {
  position: absolute;
  transform: translate(16px, 16px);
  padding: 0.52rem 0.72rem;
  border-radius: 10px;
  pointer-events: none;
  z-index: 3;
  background: rgba(9, 18, 31, 0.92);
  border: 1px solid rgba(120, 211, 255, 0.24);
  color: var(--text-main);
  font-size: 0.86rem;
  backdrop-filter: blur(8px);
}
#map-tooltip.is-hidden {
  display: none;
}
.map-statusbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.92rem;
  color: var(--text-soft);
}

.map-statusbar span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(110, 196, 255, 0.14);
  background: rgba(8, 17, 28, 0.7);
}
@media (max-width: 1100px) {
  .map-statusbar {
    flex-direction: column;
  }
}

body.is-panning .map-canvas {
  transition: none;
}


.country-group.is-eu-member:not(.is-selected):not(.is-hovered) .country-shape {
  stroke: rgba(110, 168, 255, 0.85);
  stroke-width: 1.35;
}

.country-group.is-eu-candidate:not(.is-selected):not(.is-hovered) .country-shape,
.country-group.is-eu-potential-candidate:not(.is-selected):not(.is-hovered) .country-shape {
  stroke: rgba(246, 196, 83, 0.95);
  stroke-width: 1.35;
  stroke-dasharray: 5 3;
}


.country-group.is-overlay-match:not(.is-selected):not(.is-hovered) .country-shape {
  stroke: var(--overlay-color, #7df8ff);
  stroke-width: 1.9;
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--overlay-color, #7df8ff) 30%, transparent));
}

.country-group.is-overlay-filter-active:not(.is-overlay-match):not(.is-selected):not(.is-hovered) .country-shape {
  fill-opacity: 0.52;
  stroke-opacity: 0.45;
}


@media (max-width: 720px) {
  .map-toolbar {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .tool-btn {
    min-width: 0;
    padding-inline: 0.6rem;
  }
}
