/* 图表样式 */

.chart-container {
  width: 100%;
  height: 350px;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #f0f0f0;
  transition: all 0.3s ease;
}

.chart-container:hover {
  border-color: #e0e0e0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ECharts 图表样式优化 */
.chart-container canvas {
  border-radius: 8px;
}

/* 图表加载状态 */
.chart-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #f0f0f0;
}

.chart-loading .loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #4a90e2;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.chart-loading .loading-text {
  margin-left: 15px;
  color: #666666;
  font-size: 0.9rem;
}

/* 图表错误状态 */
.chart-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: #ffffff;
  border-radius: 8px;
  color: #666666;
  text-align: center;
  padding: 20px;
  border: 1px solid #f0f0f0;
}

.chart-error .error-icon {
  font-size: 2rem;
  margin-bottom: 10px;
  color: #dc3545;
}

.chart-error .error-text {
  font-size: 0.9rem;
  margin: 0;
}

/* 图表工具提示样式 */
.chart-tooltip {
  background: rgba(0, 0, 0, 0.9) !important;
  border-radius: 8px !important;
  padding: 12px 18px !important;
  color: white !important;
  font-size: 0.85rem !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(10px) !important;
}

/* 图表图例样式 */
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 15px;
  padding: 15px;
  background: #fafafa;
  border-radius: 8px;
  border: 1px solid #f0f0f0;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #ffffff;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.85rem;
  color: #333333;
}

.legend-item:hover {
  background: #f8f9fa;
  border-color: #4a90e2;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* 图表控制按钮 */
.chart-controls {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.chart-control-btn {
  padding: 8px 16px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  color: #666666;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Noto Serif SC', serif;
}

.chart-control-btn:hover {
  background: #f8f9fa;
  border-color: #4a90e2;
  color: #4a90e2;
  transform: translateY(-1px);
}

.chart-control-btn.active {
  background: #4a90e2;
  border-color: #4a90e2;
  color: white;
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.2);
}

/* 图表数据标签 */
.chart-data-label {
  position: absolute;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.8rem;
  color: #333333;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
  pointer-events: none;
  z-index: 1000;
  max-width: 200px;
  word-wrap: break-word;
}

/* 中国地图特殊样式 */
#china-map-chart {
  background: #ffffff;
  border: 1px solid #f0f0f0;
  position: relative;
}

#china-map-chart::before {
  display: none;
}

#china-map-chart.loaded {
  background: #ffffff;
  border-color: #e0e0e0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

#china-map-chart .loading-spinner {
  z-index: 10;
}

/* 中国地图的加载动画 */
#china-map-chart .chart-loading {
  background: #ffffff;
  border-radius: 8px;
}

/* 中国地图的特殊标题 */
.china-map-title {
  color: #333;
  font-weight: 600;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .chart-container {
    height: 300px;
  }
  
  .charts-row {
    grid-template-columns: 1fr !important;
  }
  
  .chart-controls {
    flex-direction: column;
    align-items: center;
  }
  
  .chart-control-btn {
    width: 100%;
    max-width: 200px;
  }
  
  /* 移动设备上的拍摄日期折线图 */
  #shoottime-line-chart {
    height: 400px;
  }
  
  /* 移动设备上的累计趋势图 */
  #cumulative-line-chart {
    height: 400px;
  }
}

@media (max-width: 480px) {
  .chart-container {
    height: 250px;
  }
  
  .chart-loading .loading-spinner {
    width: 30px;
    height: 30px;
    border-width: 3px;
  }
  
  .chart-loading .loading-text {
    font-size: 0.8rem;
  }
  
  .legend-item {
    font-size: 0.8rem;
    padding: 6px 10px;
  }
  
  .chart-control-btn {
    font-size: 0.75rem;
    padding: 6px 10px;
  }
  
  /* 小屏幕上的拍摄日期折线图 */
  #shoottime-line-chart {
    height: 350px;
  }
  
  /* 小屏幕上的累计趋势图 */
  #cumulative-line-chart {
    height: 350px;
  }
}

/* 拍摄日期折线图特殊样式 */
#shoottime-line-chart {
  height: 450px;
}

#shoottime-line-chart .chart-container {
  height: 100%;
}

/* 累计车站数量趋势图特殊样式 */
#cumulative-line-chart {
  height: 450px;
}

#cumulative-line-chart .chart-container {
  height: 100%;
}

/* 无数据状态样式 */
.no-data {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #999;
  font-size: 0.9rem;
  text-align: center;
  padding: 20px;
}

.no-data::before {
  content: "📅";
  font-size: 2rem;
  margin-bottom: 10px;
  opacity: 0.5;
} 