/* ============================================================
   Dotted Map Widget – Frontend Styles
   ============================================================ */

/* ── Container ─────────────────────────────────────────────── */
.dmw-map-wrapper {
  width: 100%;
  box-sizing: border-box;
}

.dmw-map-container {
  position: relative;
  width: 100%;
  height: 500px;           /* default; overridden by Elementor control */
}

/* ── SVG layer ─────────────────────────────────────────────── */
.dmw-svg-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.dmw-svg-wrap svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ── Marker base ───────────────────────────────────────────── */
.dmw-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 10;
  outline: none;
}

/* ── Circle shape ──────────────────────────────────────────── */
.dmw-shape-circle::before {
  content: '';
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pin-color, #f5a623);
  box-shadow: 0 0 0 3px var(--pin-color, #f5a623);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.dmw-shape-circle.dmw-marker--active::before {
  width: 10px;
  height: 10px;
  box-shadow: 0 0 0px 3px var(--pin-color, #f5a623);
}

/* ── Diamond shape ─────────────────────────────────────────── */
.dmw-shape-diamond::before {
  content: '';
  display: block;
  width: 12px;
  height: 12px;
  background: var(--pin-color, #f5a623);
  transform: rotate(45deg);
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 8px var(--pin-color, #f5a623);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.dmw-shape-diamond:hover::before,
.dmw-shape-diamond.dmw-marker--active::before {
  transform: rotate(45deg) scale(1.35);
  box-shadow: 0 0 16px var(--pin-color, #f5a623);
}

/* ── Triangle / pointer shape ──────────────────────────────── */
.dmw-shape-triangle {
  width: 0;
  height: 0;
}
.dmw-shape-triangle::before {
  content: '';
  display: block;
  width: 0;
  height: 0;
  border-left:   7px solid transparent;
  border-right:  7px solid transparent;
  border-bottom: 14px solid var(--pin-color, #f5a623);
  filter: drop-shadow(0 0 4px var(--pin-color, #f5a623));
  transition: transform 0.2s ease, filter 0.2s ease;
  transform-origin: center bottom;
}
.dmw-shape-triangle:hover::before,
.dmw-shape-triangle.dmw-marker--active::before {
  transform: scale(1.35);
  filter: drop-shadow(0 0 10px var(--pin-color, #f5a623));
}


/* ── Tooltip ───────────────────────────────────────────────── */
.dmw-tooltip {
  position: absolute;
  z-index: 100;
  background: #ffffff;
  color: #1a1a2e;
  border-radius: 8px;
  padding: 16px 20px;
  min-width: 220px;
  max-width: 260px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
  pointer-events: auto;
  transition: opacity 0.2s ease, transform 0.2s ease;
  /* transform set via JS */
  font-family: inherit;
}

/* Caret */
.dmw-tooltip::after {
  content: '';
  position: absolute;
  bottom: -12px;
  top: auto;
  left: var(--caret-left, 10%);
  transform: translateX(-50%);
  border-left:   8px solid transparent;
  border-right:  8px solid transparent;
  border-top:    8px solid #ffffff;
  border-bottom: none;
}
/* .dmw-marker.dmw-shape-circle:after {
    content: '';
    position: absolute;
    bottom: 15px;
    left: 50%;
    display:none;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #ffffff;
}
.dmw-marker.dmw-shape-circle.dmw-marker--active:after{
    display:block;
} */

/* Title */
.dmw-tooltip__title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* Body rows */
.dmw-tooltip__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.82rem;
  line-height: 1.5;
}

.dmw-tooltip__address,
.dmw-tooltip__email {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

/* Icon stubs – replaced with unicode symbols */
.dmw-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  display: inline-block;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.6;
}

.dmw-icon-address {
  background-image: url("../icons/location.png");
}

.dmw-icon-email {
  background-image: url("../icons/mail.png");
}

.dmw-tooltip a {
  color: #0d0d8e;
  text-decoration: none;
  word-break: break-all;
}
.dmw-tooltip a:hover {
  text-decoration: underline;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .dmw-map-container { height: 320px; }
  .dmw-tooltip { min-width: 180px; max-width: 240px; padding: 12px 14px; }
  .dmw-tooltip__title { font-size: 0.87rem; }
  .dmw-tooltip__body  { font-size: 0.76rem; }
}