/* Threat markers are DOM markers: icon rotated by course + count badge.
   No `position` here: MapLibre positions markers absolutely, overriding it stacks them in flow. */
.tm {
  width: 34px;
  height: 34px;
  cursor: pointer;
  --c: #ff7a45;
}
.tm .ring {
  position: absolute; inset: 3px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--c) 22%, transparent);
  border: 1.5px solid var(--c);
  box-shadow: 0 0 12px color-mix(in srgb, var(--c) 55%, transparent);
}
.tm .ico {
  position: absolute; inset: 7px;
  color: var(--c);
  transition: transform 0.6s ease;
}
.tm .ico svg { width: 100%; height: 100%; display: block; }
.tm .ico.guess { opacity: 0.55; }
.tm .cnt {
  position: absolute; right: -6px; top: -6px;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px;
  background: var(--c); color: #111;
  font: 700 11px/17px var(--font);
  text-align: center;
}
.tm .lbl {
  position: absolute; left: 50%; top: 36px;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 11px; color: var(--text);
  text-shadow: 0 0 3px #000, 0 0 6px #000;
  pointer-events: none;
}
.tm[data-status="circling"] .ico { transition: none; } /* rotated every frame by the orbit */
.tm[data-status="destroyed"], .tm[data-status="impact"], .tm[data-status="lost"] { opacity: 0.55; }
.tm[data-status="destroyed"] .ring { border-color: var(--ok); background: rgba(62, 207, 142, 0.15); box-shadow: none; }
.tm[data-status="impact"] .ring { border-color: var(--danger); background: rgba(255, 77, 79, 0.25); }
.tm[data-type="ballistic"] .ring { animation: pulse 1.2s ease-out infinite; }
.tm.fresh .ring { animation: flash 1s ease-out 2; }
.tm.selected .ring { outline: 2px solid #fff; outline-offset: 2px; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 70%, transparent); }
  100% { box-shadow: 0 0 0 18px transparent; }
}
@keyframes flash {
  0% { transform: scale(1.8); opacity: 0.3; }
  100% { transform: scale(1); opacity: 1; }
}

/* Popups */
.maplibregl-popup-content {
  background: var(--panel-solid);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  font: 13px/1.4 var(--font);
  min-width: 220px;
}
.maplibregl-popup-tip { border-top-color: var(--panel-solid) !important; border-bottom-color: var(--panel-solid) !important; }
.maplibregl-popup-close-button { color: var(--muted); font-size: 18px; right: 4px; top: 2px; }
.pp h3 { margin: 0 0 6px; font-size: 14px; display: flex; gap: 8px; align-items: center; }
.pp dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 0 0 8px; }
.pp dt { color: var(--muted); }
.pp dd { margin: 0; }
.pp .hot { color: var(--danger); }
.pp ol { margin: 0; padding-left: 18px; max-height: 140px; overflow-y: auto; color: var(--muted); font-size: 12px; }

.maplibregl-ctrl-attrib { background: rgba(11, 15, 20, 0.7) !important; color: var(--dim); }
.maplibregl-ctrl-attrib a { color: var(--muted); }
.maplibregl-ctrl-group { background: var(--panel-solid); border: 1px solid var(--line); }
.maplibregl-ctrl-group button + button { border-top-color: var(--line); }
.maplibregl-ctrl button .maplibregl-ctrl-icon { filter: invert(0.85); }
@media (min-width: 761px) {
  .maplibregl-ctrl-top-right { right: 404px; }
}
@media (max-width: 760px) {
  .maplibregl-ctrl-top-right { top: 64px; }
}
