/* Акустический слой карты: маркеры узла/цели, регулятор секторов, панель параметров.
   Полигоны секторов и линии стилизуются опциями Leaflet прямо в JS (acoustic.jsx). */

/* ── divIcon-маркер узла: ядро + две дуги («локатор») ── */
.leaflet-div-icon.lf-ac,
.leaflet-div-icon.lf-ac-obj {
  background: transparent;
  border: 0;
}
.lf-ac-core {
  position: absolute; left: 50%; top: 50%;
  width: 8px; height: 8px;
  border-radius: 999px;
  border: 2px solid #fff;
  transform: translate(-50%, -50%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .45);
}
/* Дуга = окружность с окрашенной только верхней (и частично боковой) гранью.
   Плагинов нет, поэтому «локатор» рисуется чистым CSS. */
.lf-ac-arc {
  position: absolute; left: 50%; top: 50%;
  border-radius: 999px;
  border: 2px solid transparent;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .35));
}
.lf-ac-a1 { width: 17px; height: 17px; }
.lf-ac-a2 { width: 27px; height: 27px; opacity: .55; }
.lf-ac-sel .lf-ac-core { width: 10px; height: 10px; }
.lf-ac-sel .lf-ac-a2 { opacity: .85; }

/* ── divIcon сведённой цели: ядро + подпись высоты ── */
.lf-ac-obj-core {
  position: absolute; left: 50%; top: 50%;
  width: 10px; height: 10px;
  border-radius: 999px;
  border: 2px solid #fff;
  transform: translate(-50%, -50%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .5);
}
.lf-ac-obj-sel .lf-ac-obj-core { width: 13px; height: 13px; }
.lf-ac-obj-alt {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  padding: 1px 5px;
  white-space: nowrap;
  font: 600 10.5px/1.3 var(--font-mono);
  color: var(--text, var(--fg));
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-1);
  box-shadow: var(--shadow-md);
  pointer-events: none;
}

/* ── регулятор секторов (право-низ, над регулятором LBS) ── */
.map-ac-ctl {
  position: absolute;
  right: 14px; bottom: 56px;
  z-index: 500;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  box-shadow: var(--shadow-md);
}
.map-ac-ctl .mac-toggle {
  display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
}
.map-ac-ctl .mac-toggle input { cursor: pointer; accent-color: var(--accent); margin: 0; }
.map-ac-ctl .mac-label { font-size: 11px; color: var(--muted); }
.map-ac-ctl .mac-k { font-size: 11px; color: var(--muted); min-width: 42px; }
.map-ac-ctl input[type="range"] { width: 84px; accent-color: var(--accent); cursor: pointer; }
.map-ac-ctl input[type="range"]:disabled { opacity: .4; cursor: default; }

/* карточка устройства (right:16px, до 460px) не должна перекрываться */
@media (min-width: 721px) {
  .map-widget[data-selected="on"] .map-ac-ctl { right: calc(460px + 30px); }
}
@media (max-width: 720px) {
  .map-ac-ctl { right: 8px; bottom: 50px; }
  .map-ac-ctl input[type="range"] { width: 64px; }
}
/* в режиме трека регулятор LBS уезжает на 62px — поднимаем и этот */
.map-widget[data-track="on"] .map-ac-ctl { bottom: 104px; }

/* ── панель параметров выбранной детекции/цели (лево-верх) ── */
.ac-panel {
  position: absolute;
  left: 14px; top: 14px;
  z-index: 600;
  width: 296px;
  max-width: calc(100% - 28px);
  max-height: calc(100% - 28px);
  overflow: auto;
  padding: 10px 12px 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  box-shadow: var(--shadow-md);
  font-size: 12px;
}
.ac-panel-head {
  display: flex; align-items: center; gap: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.ac-panel-head b { font-size: 13px; }
.ac-panel .ac-dot {
  width: 9px; height: 9px; border-radius: 999px; flex-shrink: 0;
  border: 1px solid #fff;
}
.ac-panel .ac-close {
  margin-left: auto;
  border: 0; background: transparent; cursor: pointer;
  color: var(--muted); font-size: 16px; line-height: 1;
  padding: 0 2px; border-radius: var(--r-1);
}
.ac-panel .ac-close:hover { color: var(--danger); background: var(--bg-sub); }
.ac-panel .ov-kpis { margin-top: 10px; }
.ac-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 3px 0;
  border-bottom: 1px dashed var(--line);
}
.ac-row:last-child { border-bottom: 0; }
.ac-row-v { font-size: 11.5px; text-align: right; }
.ac-nodes { display: flex; flex-wrap: wrap; gap: 4px; padding-top: 4px; }
.ac-chip {
  padding: 1px 7px;
  font: 500 11px/1.5 var(--font-mono);
  color: var(--muted);
  background: var(--bg-sub);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.ac-panel-time {
  margin-top: 10px; padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 11px; text-align: right;
}

@media (max-width: 720px) {
  .ac-panel { left: 8px; top: 8px; width: 260px; max-height: 55%; }
}
