/* World Pins Map styles */
.wpm-map {
  position: relative;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  height: auto; /* responsive height */
  aspect-ratio: 1920 / 904.62; /* keep map proportions */
}
/* Full-bleed option: use with [world_pins_map class="wpm-fullwidth"] */
.wpm-map.wpm-fullwidth {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: 50%;
  transform: translateX(-50%);
}
@media (max-width: 768px) {
  .wpm-map { height: auto; }
}

/* Ensure svgMap wrappers fill the container */
.wpm-svgmap,
.svgMap-container,
.svgMap-map-wrapper { width: 100% !important; height: 100% !important; }

/* Ensure the SVG fills the container */
.wpm-map svg { width: 100% !important; height: 100% !important; display: block; }

.wpm-world-svg { display: block; width: 100%; height: 100%; }
.wpm-outlines path, .wpm-outlines polygon { stroke: #CFD8DC; fill: none; }

.wpm-pin .wpm-pin-shape { fill: #E53935; }
.wpm-pin .wpm-pin-dot { fill: #ffffff; }

.wpm-map.is-clickable .wpm-pin { cursor: pointer; }
/* Effetti disabilitati: pin puliti, nessun hover/focus transform */
.wpm-pin:hover .wpm-pin-shape,
.wpm-pin:focus-visible .wpm-pin-shape { transform: none; }

/* Tooltip */
.wpm-tooltip {
  position: absolute;
  z-index: 10;
  background: #fff;
  color: #222;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 12px;
  min-width: 160px;
  max-width: 240px;
  pointer-events: auto;
}
.wpm-tooltip[hidden] { display: none !important; }

.wpm-tooltip-inner { display: flex; align-items: center; gap: 8px; }
.wpm-flag { width: 26px; height: 18px; object-fit: cover; border-radius: 2px;margin-bottom:0 !important }
.wpm-country strong { font-weight: 700; }

.wpm-tooltip-arrow {
  position: absolute;
  width: 12px;
  height: 12px;
  background: #fff;
  transform: rotate(45deg);
  bottom: -6px;
  left: 50%;
  margin-left: -6px;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.08);
}

/* Admin preview smaller */
.wpm-admin-preview .wpm-map { height: auto; }

/* Admin continents UI */
.wpm-continents { display: grid; grid-template-columns: 1fr; gap: 16px; }
.wpm-continent { border: 1px solid #ddd; padding: 10px; border-radius: 6px; background: #fff; }
.wpm-continent summary { cursor: pointer; display: flex; align-items: center; justify-content: space-between; font-weight: 600; padding: 6px 0; }
.wpm-summary-count { font-size: 12px; color: #555; background: #f1f5f9; border: 1px solid #e5e7eb; border-radius: 10px; padding: 2px 8px; }
.wpm-continent[open] .wpm-summary-count { color: #333; }
.wpm-continent-controls { margin: 6px 0 10px; }
.wpm-select-all { display: inline-block; margin-bottom: 8px; }
.wpm-country-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 12px; }
.wpm-country { display: block; }
@media (max-width: 768px) { .wpm-country-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Admin repeater UI */
.wpm-repeater .wpm-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.wpm-repeater .wpm-row .wpm-code { min-width: 200px; }
.wpm-repeater .wpm-row .wpm-flag-field { width: 220px; }
.wpm-repeater .wpm-row .button.link-delete { color: #b00020; }

/* svgMap overrides */
.wpm-svgmap, .svgMap-container, .svgMap-map-wrapper { width: 100% !important; height: 100% !important; }
.wpm-svgmap svg { background: transparent; width: 100% !important; height: 100% !important; }
/* Override svgMap backgrounds to remove ocean */
.svgMap-container { background: transparent !important; }
.svgMap-map-wrapper { background: transparent !important; }
.wpm-svgmap svg path[data-id] { stroke: #384459; stroke-width: 0.8; stroke-linejoin: round; fill: #eff2f4; }

/* Nascondi oceano/mare disegnato da svgMap */
.svgMap-ocean, .svgMap-water { fill: transparent !important; stroke: none !important; pointer-events: none !important; }