/* Chart Container Styles */
.chart-item {
  border: 1px solid #eee;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  background-color: white;
  margin-bottom: 2rem;
  transition: all 0.3s ease;
}

.chart-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.chart-header {
  padding: 1rem;
  background-color: #f8f9fa;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chart-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--primary-color);
}

.chart-body {
  padding: 1rem;
  position: relative;
  height: 400px;
}

/* Chart Controls */
.chart-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  justify-content: center;
  background-color: #f8f9fa;
  border-top: 1px solid #eee;
}

.chart-control-btn {
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--dark-text);
}

.chart-control-btn:hover {
  background-color: var(--secondary-color);
  color: white;
  border-color: var(--secondary-color);
}

.chart-control-btn i {
  margin-right: 5px;
}

/* Tooltip Styles */
.chart-tooltip {
  background-color: rgba(44, 62, 80, 0.9);
  color: #fff;
  padding: 10px;
  border-radius: 4px;
  font-size: 12px;
  pointer-events: none;
  z-index: 1000;
}

.chart-tooltip-title {
  font-weight: bold;
  margin-bottom: 5px;
  font-size: 14px;
}

.chart-tooltip-label {
  display: flex;
  align-items: center;
  margin: 2px 0;
}

.chart-tooltip-color {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 50%;
}

/* Legend Styles */
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
}

.chart-legend-item {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  cursor: pointer;
}

.chart-legend-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 6px;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .chart-body {
    height: 300px;
  }
  
  .chart-controls {
    padding: 8px;
    gap: 4px;
  }
  
  .chart-control-btn {
    padding: 5px 8px;
    font-size: 0.75rem;
  }
  
  .chart-header h3 {
    font-size: 1rem;
  }
}

/* Loading Indicator */
.chart-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

.chart-loading::after {
  content: "";
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--secondary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Chart Grid Container */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

@media (max-width: 768px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }
} 