/* The same compact teardrop marker geometry as Карта ТО; Firewall status colours. */
.fire-map {
  position: relative;
  background: #dce3eb;
}
.fire-map .ol-zoom {
  left: auto;
  right: 12px;
  top: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 0;
}
.fire-map .ol-zoom button {
  width: 44px;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--panel);
  color: var(--text);
  font: 700 22px system-ui;
}
.fire-map-mobile .ol-zoom {
  top: auto;
  bottom: 30px;
}
.fire-map .ol-attribution {
  background: var(--panel);
  color: var(--text);
  font: 11px system-ui;
  max-width: 100%;
  padding: 3px 6px;
}
.fire-map .ol-attribution a {
  color: var(--text);
  text-decoration: underline;
}
.fire-map .ol-attribution ul {
  color: inherit;
  text-shadow: none;
}
.fire-map-marker {
  --pin: var(--offline);
  position: relative;
  display: block;
  width: 44px;
  height: 48px;
  min-height: 48px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  overflow: visible;
}
.fire-map-marker:hover {
  background: transparent;
}
.fire-map-marker.ok {
  --pin: var(--ok);
}
.fire-map-marker.fault {
  --pin: var(--fault);
}
.fire-map-marker.fire {
  --pin: var(--fire);
}
.fire-map-marker.uncertain {
  --pin: #176fe5;
}
.fire-map-marker.location-draft {
  cursor: grab;
  touch-action: none;
}
.fire-map-marker.location-draft:active {
  cursor: grabbing;
}
.fire-map-marker[hidden] {
  display: none;
}
.fire-map-alarm {
  position: absolute;
  right: -2px;
  top: 0;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--fire);
  color: white;
  font: 800 14px system-ui;
}
.fire-map-alarm.fault {
  background: var(--fault);
  color: #151515;
}
.editing-location .ol-viewport {
  cursor: crosshair;
}
.fire-map-pin {
  position: absolute;
  left: 8px;
  bottom: 7px;
  width: 28px;
  height: 28px;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--pin);
  box-shadow: 0 4px 11px #16293f59;
}
.fire-map-pin::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  top: 7px;
  left: 7px;
}
.fire-map-count {
  display: grid;
  place-items: center;
  position: absolute;
  inset: 3px 1px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--pin);
  color: #fff;
  font: 800 16px system-ui;
  box-shadow: 0 4px 11px #16293f59;
  text-shadow: 0 1px 3px #000b;
}
.fire-map-marker.selected .fire-map-pin,
.fire-map-marker.selected .fire-map-count {
  outline: 3px solid var(--text);
  outline-offset: 2px;
}
.fire-map-marker:focus-visible {
  outline: 3px solid var(--accent, #ffad66);
  outline-offset: 3px;
  border-radius: 8px;
}
.fire-map-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  max-width: min(280px, 70vw);
  width: max-content;
  padding: 8px 10px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: 0 4px 12px #0003;
  font: 500 14px/1.4 system-ui;
  text-align: left;
  pointer-events: none;
  white-space: normal;
}
.fire-map-marker:hover .fire-map-tooltip,
.fire-map-marker:focus-visible .fire-map-tooltip {
  display: block;
}
.fire-map .ol-overlaycontainer-stopevent > div:has(.fire-map-marker:hover),
.fire-map
  .ol-overlaycontainer-stopevent
  > div:has(.fire-map-marker:focus-visible) {
  z-index: 2;
}
.fire-map-popup {
  min-width: 230px;
  max-width: min(330px, 85vw);
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 42px 10px 10px;
  box-shadow: 0 5px 20px #0004;
}
.fire-map-popup-close {
  position: absolute;
  right: 4px;
  top: 4px;
  min-height: 34px;
  width: 34px;
  padding: 0;
  font-size: 20px;
}
.fire-map-popup .cluster-choices {
  display: grid;
  gap: 6px;
  max-height: 200px;
  overflow: auto;
}
.fire-map-popup .cluster-choices button {
  text-align: left;
  white-space: normal;
}
@media (min-width: 1900px) and (min-aspect-ratio: 2/1) {
  .fire-map .ol-zoom button {
    width: 48px;
    height: 48px;
  }
  .fire-map-tooltip {
    font-size: 18px;
    max-width: 360px;
  }
  .fire-map-pin {
    width: 34px;
    height: 34px;
    left: 5px;
    bottom: 8px;
  }
  .fire-map-pin::after {
    top: 10px;
    left: 10px;
  }
}
