.map-panel {
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.map-panel.is-dragging {
  cursor: grabbing;
}

.region-map {
  position: absolute;
  z-index: 2;
  left: 72px;
  top: 54px;
  width: 780px;
  height: 316px;
  user-select: none;
  -webkit-user-select: none;
}

.region-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 0 14px rgba(72, 174, 255, 0.28));
  user-select: none;
  -webkit-user-select: none;
}

.region-map-empty {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: #9cc7e8;
  font-size: 14px;
  font-weight: 800;
}

.region-layer {
  transform-origin: center center;
  transition: transform 0.16s ease;
}

.map-panel.is-dragging .region-layer {
  transition: none;
}

.region-shape {
  stroke: rgba(180, 230, 255, 0.78);
  stroke-width: 1.1;
  cursor: pointer;
  fill-opacity: 0.54;
  outline: none !important;
  vector-effect: non-scaling-stroke;
  -webkit-tap-highlight-color: transparent;
}

.region-shape:hover,
.region-shape:focus,
.region-shape:focus-visible,
.region-shape.is-selected,
.region-shape.is-filtered {
  fill-opacity: 0.88;
  outline: none !important;
  stroke: #f5fbff;
  stroke-width: 2.2;
}

.region-svg *:focus {
  outline: none !important;
}

.region-label {
  fill: rgba(229, 247, 255, 0.86);
  font-size: 9px;
  font-weight: 800;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  text-anchor: middle;
  text-shadow: 0 1px 2px rgba(0, 8, 25, 0.9);
}

.region-popover {
  position: absolute;
  z-index: 7;
  left: 20px;
  bottom: 14px;
  width: 218px;
  padding: 10px 12px;
  border: 1px solid rgba(84, 177, 255, 0.7);
  border-radius: 6px;
  background: rgba(4, 25, 60, 0.92);
  box-shadow: 0 10px 28px rgba(0, 10, 28, 0.42);
}

.region-popover[hidden] {
  display: none;
}

.region-popover strong,
.region-popover span,
.region-popover p {
  display: block;
  margin: 0;
}

.region-popover strong {
  color: #eef9ff;
  font-size: 16px;
  font-weight: 900;
}

.region-popover span {
  margin-top: 6px;
  color: #42c2ff;
  font-size: 13px;
  font-weight: 900;
}

.region-popover p {
  margin-top: 5px;
  color: #bdd8f4;
  font-size: 12px;
  line-height: 1.45;
}

.map-controls {
  position: absolute;
  z-index: 8;
  top: 13px;
  right: 18px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.map-controls::before {
  display: grid;
  min-width: 48px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(61, 150, 238, 0.45);
  border-radius: 5px;
  background: rgba(4, 26, 62, 0.82);
  color: #bde5ff;
  content: attr(data-scale);
  font-size: 12px;
  font-weight: 900;
}

.map-controls button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(58, 150, 244, 0.66);
  border-radius: 5px;
  background: linear-gradient(180deg, rgba(12, 52, 110, 0.96), rgba(5, 29, 70, 0.92));
  color: #e6f5ff;
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.map-controls button:hover,
.map-controls button:focus-visible {
  border-color: rgba(103, 207, 255, 0.96);
  box-shadow: 0 0 14px rgba(54, 172, 255, 0.22);
}

body.map-fullscreen-active {
  overflow: hidden;
}

.map-panel.map-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  border-radius: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(0, 160, 255, 0.24), transparent 28%),
    linear-gradient(180deg, rgba(6, 28, 64, 0.99), rgba(2, 13, 32, 0.99));
}

.map-panel.map-fullscreen .panel-heading {
  left: 28px;
  top: 22px;
}

.map-panel.map-fullscreen .map-controls {
  top: 22px;
  right: 28px;
}

.map-panel.map-fullscreen .region-map {
  inset: 80px 36px 76px;
  width: auto;
  height: auto;
}

.map-panel.map-fullscreen .region-popover {
  left: 28px;
  bottom: 92px;
}

.map-panel.map-fullscreen .map-legend {
  right: 50%;
  bottom: 24px;
  transform: translateX(50%);
}
