/* MapLibre Map Popups */
.maplibregl-popup-content {
  background: rgba(16, 32, 51, 0.92) !important;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px !important;
  color: #fff !important;
  padding: 12px 14px !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4) !important;
}
.maplibregl-popup-anchor-bottom .maplibregl-popup-tip {
  border-top-color: rgba(16, 32, 51, 0.92) !important;
}
.maplibregl-popup-anchor-top .maplibregl-popup-tip {
  border-bottom-color: rgba(16, 32, 51, 0.92) !important;
}
.maplibregl-popup-anchor-left .maplibregl-popup-tip {
  border-right-color: rgba(16, 32, 51, 0.92) !important;
}
.maplibregl-popup-anchor-right .maplibregl-popup-tip {
  border-left-color: rgba(16, 32, 51, 0.92) !important;
}
.maplibregl-popup-close-button {
  color: #aaa !important;
  font-size: 16px !important;
  padding: 4px 8px !important;
}
.maplibregl-popup-close-button:hover {
  color: #fff !important;
  background: transparent !important;
}
.map-popup-card {
  min-width: 200px;
  font-size: 13px;
}
.map-popup-card .popup-title {
  font-weight: bold;
  font-size: 15px;
  color: #64ffda;
  margin-bottom: 2px;
}
.map-popup-card .popup-sub {
  color: #a0aec0;
  font-size: 11px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 4px;
}
.map-popup-card .popup-body {
  margin-bottom: 10px;
  line-height: 1.6;
}
.map-popup-card .popup-actions button {
  width: 100%;
  background: #1769aa;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: bold;
  transition: all 0.2s;
}
.map-popup-card .popup-actions button:hover {
  background: #00e676;
  color: #000;
}
/* Live Agent markers are avatars in both map modes. */
.map-agent-marker-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
  cursor: pointer;
  z-index: 10;
  transition: transform 0.15s ease;
}

.map-agent-marker-wrapper:hover {
  transform: scale(1.15);
  z-index: 20;
}

.map-agent-avatar {
  width: 34px;
  height: 34px;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #2d7f63;
  box-shadow: 0 2px 9px rgba(8, 35, 29, .55);
}

.map-agent-avatar:hover,
.map-agent-avatar:focus-visible {
  border-color: #f4c95d;
  outline: 2px solid rgba(244, 201, 93, .55);
}

.map-agent-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.map-agent-label {
  margin-top: 2px;
  padding: 1px 6px;
  background: rgba(13, 27, 42, 0.9);
  color: #64ffda;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  white-space: nowrap;
  border: 1px solid rgba(100, 255, 218, 0.4);
  box-shadow: 0 2px 4px rgba(0,0,0,0.4);
  pointer-events: none;
}

/* Building / Landmark Node Label Badge */
.map-node-label-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(56, 189, 248, 0.6);
  border-radius: 4px;
  color: #f8fafc;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  pointer-events: auto;
  cursor: pointer;
  transition: all 0.15s ease;
}

.map-node-label-badge:hover {
  background: rgba(15, 23, 42, 0.98);
  border-color: #38bdf8;
  transform: scale(1.1);
  z-index: 15;
}

.map-node-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 6px #38bdf8;
  flex-shrink: 0;
}

.map-node-text {
  line-height: 1.2;
}
