/* ForestEars Map Engine — shared styles
   Scoped to .feme-* classes. No dashboard-specific selectors. */

/* ── Error panel ─────────────────────────────────────────────────────────── */
.feme-error-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #07111e;
  padding: 32px;
  text-align: center;
  z-index: 1000;
  font-family: "Pelak", Tahoma, Arial, sans-serif;
  direction: rtl;
}
.feme-error-icon { font-size: 48px; opacity: .38; }
.feme-error-title {
  font-size: 16px;
  font-weight: 900;
  color: #ef4444;
}
.feme-error-body {
  font-size: 12px;
  color: #7a99c0;
  max-width: 360px;
  line-height: 1.9;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px;
  padding: 14px 18px;
  text-align: right;
  white-space: pre-line;
}

/* ── Event marker ─────────────────────────────────────────────────────────── */
.feme-mk-event {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid rgba(255,255,255,.85);
  box-shadow: 0 0 0 3px rgba(239,68,68,.28), 0 0 12px rgba(239,68,68,.55);
  transition: transform .15s, box-shadow .15s;
  cursor: pointer;
}
.feme-mk-event--selected {
  background: #ff6b6b;
  border-color: #fff;
  box-shadow: 0 0 0 5px rgba(239,68,68,.45), 0 0 20px rgba(239,68,68,.8);
  transform: scale(1.35);
}

/* ── Pulse animation (newest/highest-priority threat) ─────────────────────── */
.feme-mk-pulse {
  animation: feme-pulse 1.8s ease-in-out infinite;
}
@keyframes feme-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(239,68,68,.8),  0 0 12px rgba(239,68,68,.55); }
  50%  { box-shadow: 0 0 0 10px rgba(239,68,68,0),  0 0 22px rgba(239,68,68,.7); }
  100% { box-shadow: 0 0 0 0   rgba(239,68,68,.8),  0 0 12px rgba(239,68,68,.55); }
}

/* ── Node marker ──────────────────────────────────────────────────────────── */
.feme-mk-node {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid rgba(255,255,255,.85);
  box-shadow: 0 0 0 3px rgba(34,197,94,.28);
  cursor: pointer;
  transition: transform .15s;
}
.feme-mk-node--selected {
  transform: scale(1.3);
  box-shadow: 0 0 0 5px rgba(34,197,94,.45);
}

/* ── Patrol post marker ───────────────────────────────────────────────────── */
.feme-mk-patrol {
  width: 13px;
  height: 13px;
  border-radius: 3px;
  background: #f59e0b;
  border: 2px solid rgba(255,255,255,.85);
  box-shadow: 0 0 0 3px rgba(245,158,11,.28);
  transform: rotate(45deg);
  margin: 1px;
  cursor: pointer;
}

/* ── Cluster badge ────────────────────────────────────────────────────────── */
.feme-cluster {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(239,68,68,.82);
  border: 2px solid rgba(255,255,255,.85);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 4px rgba(239,68,68,.3), 0 3px 10px rgba(0,0,0,.45);
  cursor: pointer;
  font-family: "Pelak", Tahoma, Arial, sans-serif;
  transition: transform .15s;
}
.feme-cluster:hover { transform: scale(1.1); }

/* ── Geofence polygon ─────────────────────────────────────────────────────── */
/* Styles applied via L.geoJSON options; this class available for override */
.feme-geofence-path {
  stroke: #18c1a0;
  stroke-width: 2;
  fill: rgba(24,193,160,.06);
}

/* ── Leaflet popup override (engine-scoped) ───────────────────────────────── */
.feme-map-container .leaflet-popup-content-wrapper {
  background: #0d1e30 !important;
  color: #e2eeff !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.5) !important;
  font-family: "Pelak", Tahoma, Arial, sans-serif !important;
  font-size: 12px !important;
  direction: rtl;
}
.feme-map-container .leaflet-popup-tip {
  background: #0d1e30 !important;
}
.feme-map-container .leaflet-popup-close-button {
  color: #7a99c0 !important;
}
