/* Стили интерактивной карты присутствия «Аптайм» (без границ государств) */

.leaflet-container {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #DCEAF0; /* Цвет воды / океана */
}

/* Стили кастомных маркеров городов */
.uptime-marker-pin {
  position: relative;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.uptime-marker-pulse {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 9999px;
  background-color: rgba(2, 132, 199, 0.35);
  animation: uptime-pin-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
  pointer-events: none;
}

.uptime-marker-dot {
  position: relative;
  width: 14px;
  height: 14px;
  background-color: #0284c7;
  border: 2.5px solid #ffffff;
  border-radius: 9999px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25), 0 0 8px rgba(2, 132, 199, 0.45);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease;
}

.uptime-marker-pin:hover .uptime-marker-dot,
.uptime-marker-pin.active .uptime-marker-dot {
  transform: scale(1.4);
  background-color: #0369a1;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35), 0 0 14px rgba(2, 132, 199, 0.8);
}

@keyframes uptime-pin-ping {
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* Всплывающая подсказка при наведении */
.leaflet-tooltip.uptime-map-tooltip {
  background-color: #0f172a;
  color: #f8fafc;
  border: none;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}

.leaflet-tooltip-top.uptime-map-tooltip:before {
  border-top-color: #0f172a;
}

/* Окно информации при клике */
.leaflet-popup-content-wrapper {
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
  padding: 0;
}

.leaflet-popup-content {
  margin: 14px 16px;
  line-height: 1.4;
}

.leaflet-popup-tip {
  background: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.leaflet-popup-close-button {
  top: 10px !important;
  right: 10px !important;
  color: #94a3b8 !important;
}

.leaflet-popup-close-button:hover {
  color: #0f172a !important;
}

/* Кнопки городов под картой */
.city-chip {
  transition: all 0.15s ease;
  white-space: nowrap;
  line-height: 1rem;
}

.city-chip:hover {
  background-color: #e0f2fe;
  color: #0284c7;
  border-color: #bae6fd;
}

.city-chip.active {
  background-color: #0284c7 !important;
  color: #ffffff !important;
  border-color: #0284c7 !important;
}

/* Контейнер списка городов: ровно 3 строки с элегантной полосой прокрутки */
#cities-chips {
  max-height: 92px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f8fafc;
}

#cities-chips::-webkit-scrollbar {
  width: 5px;
}

#cities-chips::-webkit-scrollbar-track {
  background: #f8fafc;
  border-radius: 9999px;
}

#cities-chips::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

#cities-chips::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Плавный лоадер при первой загрузке карты */
.map-loading-overlay {
  position: absolute;
  inset: 0;
  background-color: #f8fafc;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 500;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.map-loading-overlay.hidden-loader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
