#map-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  background: #ffffff;
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(220, 7, 7, 0.08);
  border: 1px solid rgba(232, 8, 8, 0.05);
  transition: box-shadow 0.3s ease, transform 0.25s ease;
}

/* Hiệu ứng khi hover */
#map-container:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

/* Thêm hiệu ứng nhẹ khi click */
#map-container:active {
  transform: translateY(0);
}

svg { width: 100%; height: auto; display: block; }

.map-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(0,0,0,0.78);
  color: #fff;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  white-space: normal;
  display: none;
  z-index: 50;
  max-width: 360px;
  max-height: 220px;
  overflow: auto;
}
.map-tooltip ul { margin: 6px 0 0 0; padding-left: 16px; }
.map-tooltip li { margin-bottom: 4px; }

.province-hover { fill: #d6eaff !important; cursor: pointer;}

#map-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 999; /* đảm bảo nút nằm trên bản đồ */
}

#map-controls button {
  background-color: white;
  border: none;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  padding: 8px 12px;
  font-size: 16px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
}

#map-controls button:hover {
  background-color: #f0f0f0;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

#map-controls button:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

#reset-zoom {
  font-size: 13px;
  font-weight: normal;
}

@media (max-width: 768px) {
  #map-container { width: 96%; }
  .map-tooltip { font-size: 12px; padding: 5px 8px; }
}

/* Popup */
.popup {
  position: absolute;
  box-sizing: border-box;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 12px;
  padding: 14px 16px 12px;
  min-width: 200px;
  /* max-width: min(300px, 90%); */
  width: max-content;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  z-index: 1000;
  display: none;
  /* font-family: 'Segoe UI', Tahoma, sans-serif; */
  word-wrap: break-word;
  pointer-events: auto;
  transition: opacity .15s ease, transform .15s ease;
  opacity: 0;
  transform: translateY(-4px);
}
.popup.is-visible {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.popup-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.popup-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #1a73e8;
  line-height: 1.3;
}
.popup-close {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  background: #f2f2f2;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #888;
  font-size: 13px;
  transition: background 0.15s, color 0.15s;
}
.popup-close:hover { background: #ffe0e0; color: #d32f2f; }

.popup-divider {
  height: 1px;
  background: rgba(0,0,0,0.07);
  margin: 0 0 10px;
}
.popup-body {
  font-size: 13px;
  color: #555;
  line-height: 1.6;
  margin: 0;
}
.popup-body ul { margin: 0; padding-left: 14px; }
.popup-body li { margin-bottom: 5px; }

@media (max-width: 480px) {
  .popup.popup--mobile {
    position: fixed !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    bottom: 12px !important;
    top: auto !important;
    right: auto !important;
    max-width: calc(100% - 24px) !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}