.swm-map {
  --swm-water: #ffffff;
  position: relative;
  width: 100%;
  aspect-ratio: 1.94 / 1;
  overflow: hidden;
  background: var(--swm-water);
  touch-action: pan-y;
  isolation: isolate;
}

.swm-svg {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--swm-water);
  cursor: grab;
  user-select: none;
}

.swm-svg.is-dragging {
  cursor: grabbing;
}

html.swm-dragging,
html.swm-dragging * {
  -webkit-user-select: none !important;
  user-select: none !important;
}

html.swm-dragging {
  cursor: grabbing;
}

.swm-country {
  stroke-width: 0.7px;
  stroke-linejoin: round;
  stroke-linecap: round;
  outline: none;
}

.swm-country.is-active {
  cursor: pointer;
}

.swm-country.is-disputed {
  stroke-dasharray: 3 2;
}

.swm-country:focus-visible {
  stroke-width: 1.5px;
}

.swm-controls {
  position: absolute;
  z-index: 5;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0,0,0,.2);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 5px rgba(0,0,0,.16);
}

.swm-controls button {
  appearance: none;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #ccc;
  background: #fff;
  color: #222;
  font: 700 22px/34px system-ui, sans-serif;
  text-align: center;
  cursor: pointer;
}

.swm-controls button:last-child {
  border-bottom: 0;
}

.swm-controls button:hover,
.swm-controls button:focus-visible {
  background: #f4f4f4;
}

.swm-tooltip {
  position: fixed;
  z-index: 2147483000;
  top: 0;
  left: 0;
  pointer-events: none;
  width: max-content;
  max-width: calc(100vw - 24px);
  padding: 5px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: rgba(255,255,255,.97);
  color: #222;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  font: 600 14px/1.25 system-ui, sans-serif;
  white-space: normal;
  overflow-wrap: break-word;
  will-change: transform;
  contain: layout paint style;
  transform: translate3d(-10000px,-10000px,0);
}

.swm-status {
  padding: 1rem;
}

@media (max-width: 600px) {
  .swm-map {
    aspect-ratio: 1.72 / 1;
  }

  .swm-controls button {
    width: 40px;
    height: 40px;
    font-size: 24px;
    line-height: 40px;
  }
}

.sits-map-admin .sits-map-preview {
  max-width: 1100px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #dcdcde;
  background: #fff;
}

/* v1.2.5: reduce SVG zoom/rendering seams in Chromium/WebKit */
.sits-map svg {
  display:block;
  overflow:visible;
  shape-rendering:geometricPrecision;
  backface-visibility:hidden;
}
.sits-map svg path {
  vector-effect:non-scaling-stroke;
  shape-rendering:geometricPrecision;
}

/* Reset-view control: visually separated from the zoom pair. */
.swm-controls .swm-reset-view {
  margin-top: 10px;
}
.swm-controls .swm-reset-view span {
  display: block;
  font-size: 19px;
  line-height: 1;
  transform: translateY(-1px);
}

/* v1.2.16: zoom controls and reset control are separate visual islands. */
.swm-controls {
  gap: 10px;
  border: 0;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
  background: transparent;
}
.swm-zoom-group {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.2);
  border-radius: 4px;
  box-shadow: 0 1px 5px rgba(0,0,0,.16);
}
.swm-zoom-group button:last-child {
  border-bottom: 0;
}
.swm-controls .swm-reset-view {
  margin-top: 0;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.2);
  border-radius: 4px;
  box-shadow: 0 1px 5px rgba(0,0,0,.16);
}
