/* LandAI CSS owner: Map-rendered waypoint markers and editable measurement/shape handles. */
.web-map-pin-marker {
  --pin-color: #34C759;
  --pin-foreground: #ffffff;
  position: absolute;
  width: 52px;
  height: 62px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  overflow: visible;
}

.web-map-pin-badge {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 52px;
  height: 62px;
  display: grid;
  place-items: center;
  color: var(--pin-foreground);
  filter: drop-shadow(0 5px 9px rgba(15, 23, 42, 0.34));
  transform: translateX(-50%);
  transform-origin: 50% 92%;
}

.web-map-pin-shape {
  position: absolute;
  inset: 0;
  width: 52px;
  height: 62px;
  overflow: visible;
}

.web-map-pin-shape-fill {
  fill: var(--pin-color);
  stroke: #fff;
  stroke-width: 5px;
  stroke-linejoin: round;
}

.web-map-pin-icon-wrap {
  position: absolute;
  left: 50%;
  top: 14px;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  transform: translateX(-50%);
}

.web-map-pin-icon {
  position: relative;
  z-index: 1;
  width: 21px;
  height: 21px;
  color: inherit;
  filter: drop-shadow(0 1px 1px rgba(15, 23, 42, 0.2));
}

.web-map-pin-label {
  position: absolute;
  left: 50%;
  bottom: 58px;
  max-width: 132px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #1e293b;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transform: translateX(-50%);
  pointer-events: none;
}

.web-map-pin-marker:hover .web-map-pin-badge,
.web-map-pin-marker:focus-visible .web-map-pin-badge {
  transform: translateX(-50%) scale(1.06);
}

.web-map-pin-marker:focus-visible {
  outline: none;
}

.web-map-pin-marker:focus-visible .web-map-pin-label {
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.36), 0 2px 8px rgba(15, 23, 42, 0.18);
}

.web-map-pin-popup {
  min-width: 190px;
  color: #1e293b;
  font-family: 'DM Sans', system-ui, sans-serif;
}

.web-map-pin-popup-title {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 800;
}

.web-map-pin-popup-meta {
  margin: 0 0 10px;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.35;
}

.web-map-pin-popup-actions {
  display: flex;
  gap: 8px;
}

.web-map-pin-popup-btn {
  border: none;
  border-radius: 8px;
  padding: 7px 10px;
  background: #f1f5f9;
  color: #334155;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.web-map-pin-popup-btn:hover {
  background: #e2e8f0;
}

.web-map-pin-popup-btn.is-danger {
  background: #fee2e2;
  color: #b91c1c;
}

.web-map-pin-popup-btn.is-danger:hover {
  background: #fecaca;
}

.web-measurement-edit-handle {
  width: 28px;
  height: 28px;
  display: block;
  border: 4px solid #fff;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 3px 14px rgba(15, 23, 42, 0.36), 0 0 0 1px rgba(15, 23, 42, 0.22);
  cursor: grab;
  padding: 0;
  pointer-events: auto;
  touch-action: none;
  z-index: 12;
}

.web-measurement-edit-handle.is-dragging {
  cursor: grabbing;
  transform: scale(1.12);
}

.web-measurement-edit-handle:focus-visible {
  outline: 3px solid rgba(22, 163, 74, 0.38);
  outline-offset: 3px;
}

.web-measurement-selected-label {
  min-width: max-content;
  max-width: 160px;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
  font: 800 12px/1.15 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  text-align: center;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

.web-measurement-selected-label.is-total {
  background: #0f172a;
  color: #fff;
  box-shadow: 0 5px 16px rgba(15, 23, 42, 0.26);
}
