/* 地图容器样式 */
.map-container {
  position: relative;
  flex: 1;
  height: 420px;
  overflow: hidden;
  background: linear-gradient(135deg, #f8fafe 0%, #e8f4ff 100%);
}

.amap-container {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
}

/* 地图加载动画 */
.map-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.map-loading .spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e8f4ff;
  border-top: 4px solid #4a90e2;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 12px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.map-loading .loading-text {
  color: #4a90e2;
  font-size: 14px;
  font-weight: 500;
}

/* 左下角点位列表浮层样式 */
.map-points-overlay {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  z-index: 1;
  width: 320px;
  max-height: 180px;
  transition: all 0.4s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

.map-points-overlay.expanded {
  max-height: 420px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.2);
}

.overlay-header {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(74, 144, 226, 0.1);
  background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
  color: white;
  position: relative;
}

.overlay-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
  opacity: 0.5;
}

.expand-btn {
  cursor: pointer;
  margin-right: 10px;
  padding: 6px;
  border-radius: 50%;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.2);
  position: relative;
  z-index: 1;
}

.expand-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.expand-btn img {
  width: 14px;
  height: 14px;
  transition: transform 0.4s ease;
  filter: brightness(0) invert(1);
}

.map-points-overlay.expanded .expand-btn img {
  transform: rotate(180deg);
}

.overlay-title {
  font-size: 15px;
  font-weight: 600;
  color: white;
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.overlay-content {
  max-height: 120px;
  overflow-y: auto;
  background: white;
}

.map-points-overlay.expanded .overlay-content {
  max-height: 340px;
}

.overlay-content::-webkit-scrollbar {
  width: 4px;
}

.overlay-content::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.overlay-content::-webkit-scrollbar-thumb {
  background-color: var(--gray-100);
  border-radius: 2px;
}

.overlay-content::-webkit-scrollbar-thumb:hover {
  background-color: var(--gray-300);
}

.points-list {
  padding: 0;
  margin: 0;
}

.point-item {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  background: white;
}

.point-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.point-item:last-child {
  border-bottom: none;
}

.point-item:hover {
  background: linear-gradient(135deg, #f8fafe 0%, #e8f4ff 100%);
  padding-left: 22px;
}

.point-item:hover::before {
  transform: scaleX(1);
}

.point-item.active {
  background: linear-gradient(135deg, #e8f4ff 0%, #d0e7ff 100%);
  padding-left: 22px;
  box-shadow: inset 0 2px 4px rgba(74, 144, 226, 0.1);
}

.point-item.active::before {
  transform: scaleX(1);
}

.point-name {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
  line-height: 1.4;
  transition: color 0.3s ease;
}

.point-item:hover .point-name,
.point-item.active .point-name {
  color: #4a90e2;
}

.point-address {
  font-size: 12px;
  color: #666;
  line-height: 1.4;
  transition: color 0.3s ease;
}

.point-item:hover .point-address,
.point-item.active .point-address {
  color: #5a5a5a;
}

.no-data {
  padding: 30px 20px;
  text-align: center;
  color: #999;
  font-size: 14px;
  background: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.no-data::before {
  content: '📍';
  font-size: 24px;
  margin-bottom: 8px;
  opacity: 0.5;
}

.map-category-item:hover,
.map-category-item.active {
  background-color: var(--primary);
  color: white;
}

.map-category-item:nth-child(1) .map-category-icon {
  background-image: url('/szcdc/icon_map1.png');
}
.map-category-item:nth-child(1):hover .map-category-icon,
.map-category-item:nth-child(1).active .map-category-icon {
  background-image: url('/szcdc/icon_map5.png');
}

.map-category-item:nth-child(2) .map-category-icon {
  background-image: url('/szcdc/icon_map2.png');
}
.map-category-item:nth-child(2):hover .map-category-icon,
.map-category-item:nth-child(2).active .map-category-icon {
  background-image: url('/szcdc/icon_map6.png');
}

.map-category-item:nth-child(3) .map-category-icon {
  background-image: url('/szcdc/icon_map3.png');
}
.map-category-item:nth-child(3):hover .map-category-icon,
.map-category-item:nth-child(3).active .map-category-icon {
  background-image: url('/szcdc/icon_map7.png');
}

.map-category-item:nth-child(4) .map-category-icon {
  background-image: url('/szcdc/icon_map4.png');
}
.map-category-item:nth-child(4):hover .map-category-icon,
.map-category-item:nth-child(4).active .map-category-icon {
  background-image: url('/szcdc/icon_map8.png');
}

.map-region-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.map-region-item:hover {
  background: linear-gradient(135deg, #f8fafe 0%, #e8f4ff 100%);
  padding-left: 16px;
}

.map-region-item:hover::before {
  transform: scaleX(1);
}
