/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(30, 41, 59, 0.5);
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 9999px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Leaflet Custom Marker Styling */
.family-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.family-marker-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #1e293b;
  border: 3px solid #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), 0 0 12px rgba(16, 185, 129, 0.4);
  position: relative;
  transition: transform 0.2s ease;
}

.family-marker-avatar:hover {
  transform: scale(1.15);
}

.family-marker-avatar.offline {
  border-color: #64748b;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  filter: grayscale(0.5);
}

.family-marker-pulse {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 2px solid #10b981;
  animation: marker-pulse 2s cubic-bezier(0.45, 0, 0.55, 1) infinite;
  pointer-events: none;
}

@keyframes marker-pulse {
  0% {
    transform: scale(1);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

.family-marker-label {
  margin-top: 4px;
  background: rgba(15, 23, 42, 0.85);
  color: #f8fafc;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  pointer-events: none;
}

/* Leaflet dark/night override for standard OSM */
.leaflet-container {
  background: #0f172a !important;
  font-family: inherit;
}

/* Leaflet Popup Styling */
.leaflet-popup-content-wrapper {
  background: #1e293b !important;
  color: #f1f5f9 !important;
  border-radius: 16px !important;
  border: 1px solid #334155 !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5) !important;
  padding: 0 !important;
  overflow: hidden;
}

.leaflet-popup-content {
  margin: 0 !important;
  line-height: 1.4 !important;
}

.leaflet-popup-tip {
  background: #1e293b !important;
}

.leaflet-popup-close-button {
  color: #94a3b8 !important;
  padding: 8px !important;
}
