.ts-node-leaflet-icon,
.ts-node-leaflet-icon.leaflet-div-icon,
.ts-node-cluster-leaflet-icon,
.ts-node-cluster-leaflet-icon.leaflet-div-icon {
  background: transparent !important;
  border: 0 !important;
}

.ts-node-marker {
  --node-state-color: #67818f;
  --ts-node-marker-size: 34px;
  position: relative;
  width: var(--ts-node-marker-size);
  height: var(--ts-node-marker-size);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--node-state-color);
  border-radius: 50%;
  background: rgba(4, 25, 35, 0.92);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.44),
    0 0 0 2px rgba(2, 14, 21, 0.70);
  transition:
    transform 150ms ease,
    box-shadow 150ms ease;
}

.ts-node-marker-halo {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--node-state-color) 18%, transparent);
  opacity: .78;
}

.ts-node-marker-image {
  position: relative;
  z-index: 1;
  width: 25px;
  height: 25px;
  object-fit: contain;
  pointer-events: none;
}

.ts-node-marker-status {
  position: absolute;
  z-index: 2;
  right: -1px;
  bottom: -1px;
  width: 9px;
  height: 9px;
  border: 2px solid #061722;
  border-radius: 50%;
  background: var(--node-state-color);
}

.ts-node-marker--online { --node-state-color: #25d998; }
.ts-node-marker--stale { --node-state-color: #f2bd3d; }
.ts-node-marker--invalid { --node-state-color: #f08a35; }
.ts-node-marker--critical { --node-state-color: #ef5968; --ts-node-marker-size: 36px; }
.ts-node-marker--offline { --node-state-color: #788893; }
.ts-node-marker--unknown { --node-state-color: #67818f; }

.ts-node-marker--selected {
  --node-state-color: #29b6ff;
  --ts-node-marker-size: 40px;
  transform: scale(1.03);
  box-shadow:
    0 3px 12px rgba(0, 0, 0, 0.48),
    0 0 0 4px rgba(41, 182, 255, 0.24);
}

.ts-node-marker--critical::before {
  content: "";
  position: absolute;
  inset: -5px;
  border: 2px solid rgba(239, 89, 104, 0.62);
  border-radius: 50%;
  animation: ts-node-critical-pulse 1.8s infinite;
}

@keyframes ts-node-critical-pulse {
  0% {
    opacity: 0.85;
    transform: scale(0.84);
  }
  100% {
    opacity: 0;
    transform: scale(1.45);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ts-node-marker,
  .ts-node-marker--critical::before {
    animation: none !important;
    transition: none !important;
  }
}

.ts-node-marker:focus-visible {
  outline: 2px solid #29b6ff;
  outline-offset: 4px;
}

.ts-node-cluster {
  position: relative;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 2px solid #29b6ff;
  border-radius: 50%;
  background: rgba(4, 25, 35, 0.94);
  box-shadow:
    0 2px 10px rgba(0, 0, 0, .45),
    0 0 0 4px rgba(41, 182, 255, .16);
}

.ts-node-cluster--large {
  width: 42px;
  height: 42px;
}

.ts-node-cluster img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.ts-node-cluster strong {
  position: absolute;
  right: -5px;
  bottom: -5px;
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid #061722;
  border-radius: 999px;
  background: #29b6ff;
  color: #02111a;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.ts-node-tooltip {
  white-space: pre-line;
  border: 1px solid rgba(112, 151, 174, .34);
  background: rgba(7, 19, 31, .96);
  color: #edf5f8;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.45;
  box-shadow: 0 12px 28px rgba(0,0,0,.32);
}

.ts-node-popup-shell .leaflet-popup-content-wrapper {
  background: #07131f;
  color: #edf5f8;
  border: 1px solid rgba(112,151,174,.34);
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(0,0,0,.40);
}

.ts-node-popup-shell .leaflet-popup-tip {
  background: #07131f;
  border: 1px solid rgba(112,151,174,.34);
}

.ts-node-popup-shell .leaflet-popup-close-button {
  color: #91a9b4 !important;
}

.ts-node-popup {
  min-width: 250px;
  font-size: 12px;
  line-height: 1.35;
}

.ts-node-popup-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.ts-node-popup-head strong {
  display: block;
  color: #edf5f8;
  font-size: 13px;
}

.ts-node-popup-head span {
  display: block;
  color: #9fb2bf;
  font-size: 11px;
  margin-top: 2px;
}

.ts-node-popup-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
}

.ts-node-popup-grid span {
  color: #9fb2bf;
}

.ts-node-popup-grid strong {
  color: #edf5f8;
  font-weight: 800;
  text-align: right;
}

.ts-node-popup-note {
  margin: 8px 0 0;
  color: #9fb2bf;
  font-size: 11px;
}

.ts-node-popup-actions,
.ts-node-focus-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 9px;
}

.ts-node-popup-actions a,
.ts-node-focus-actions a {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border: 1px solid rgba(41,182,255,.32);
  border-radius: 6px;
  background: rgba(41,182,255,.12);
  color: #dff2ff;
  text-decoration: none;
  font-size: 11px;
  font-weight: 800;
}

.ts-node-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .02em;
  white-space: nowrap;
}

.ts-node-pill-online { background: rgba(37,217,152,.14); color: #a4f4d7; }
.ts-node-pill-stale { background: rgba(242,189,61,.15); color: #ffe08a; }
.ts-node-pill-invalid { background: rgba(240,138,53,.15); color: #ffc18d; }
.ts-node-pill-critical { background: rgba(239,89,104,.16); color: #ffb5bf; }
.ts-node-pill-offline { background: rgba(120,136,147,.17); color: #cad5da; }
.ts-node-pill-unknown { background: rgba(103,129,143,.17); color: #cfdae0; }

.ts-nodes-legend-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ts-nodes-legend-group[hidden] {
  display: none !important;
}

.ts-nodes-legend-group strong {
  font-size: 10px;
  color: #edf5f8;
  margin-right: 2px;
}

.ts-nodes-legend-group span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: #9fb2bf;
}

.ts-nodes-legend-group i {
  width: 9px;
  height: 9px;
  display: inline-block;
  border-radius: 999px;
}

.ts-nodes-legend-group i.selected {
  background: #29b6ff;
}

.ts-nodes-legend-group i.cluster {
  width: 14px;
  height: 14px;
  background: #061722;
  border: 2px solid #29b6ff;
  box-shadow: 0 0 10px rgba(41,182,255,.38);
}

.ts-cesium-node-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  overflow: hidden;
}

.ts-cesium-node-overlay-item {
  position: absolute;
  left: 0;
  top: 0;
  width: 54px;
  height: 96px;
  pointer-events: none;
  will-change: transform;
}

.ts-cesium-node-balloon {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
}

.ts-cesium-node-balloon .ts-node-marker {
  width: 40px;
  height: 40px;
}

.ts-cesium-node-balloon .ts-node-marker-image {
  width: 29px;
  height: 29px;
}

.ts-cesium-node-stem {
  width: 2px;
  height: 34px;
  margin-top: 2px;
  border-radius: 999px;
  background: var(--node-state-color);
  box-shadow:
    0 0 0 1px rgba(3, 13, 20, .82),
    0 3px 8px rgba(0, 0, 0, .42);
}

.ts-cesium-node-anchor {
  width: 10px;
  height: 10px;
  margin-top: -1px;
  border: 2px solid #061722;
  border-radius: 50%;
  background: var(--node-state-color);
  box-shadow: 0 2px 7px rgba(0, 0, 0, .42);
}
