/* Analytics Dashboard Styles
 * Extracted from inline styles and refactored to use design system
 * Uses Tailwind utilities where possible, custom CSS only where needed
 */

/* Chart Canvas Sizing - Custom CSS needed for Chart.js */
.analytics-chart-canvas {
  width: 100% !important;
  max-width: 100%;
  height: 100% !important;
  max-height: 100%;
  object-fit: contain;
}

/* Alert Item Severity Border Accent - Custom CSS for left border styling */
.alert-item-critical {
  border-left: 4px solid #dc2626;
}

.alert-item-high {
  border-left: 4px solid #f97316;
}

.alert-item-medium {
  border-left: 4px solid #fbbf24;
}

.alert-item-low {
  border-left: 4px solid #3b82f6;
}

/* Collector Item Status Border Accent - Custom CSS for left border styling */
.collector-item-active {
  border-left: 4px solid #10b981;
}

.collector-item-inactive {
  border-left: 4px solid #6b7280;
}

.collector-item-error {
  border-left: 4px solid #dc2626;
}

/* Error Alert Styles - Custom styling for error messages */
.analytics-error-alert {
  background-color: #fee;
  border: 1px solid #fcc;
  color: #c00;
  padding: 15px;
  border-radius: var(--themes-border-border-radius-rounded-sm);
  margin-bottom: 20px;
}

/* Loading State - Custom styling for HTMX loading states */
.analytics-loading {
  text-align: center;
  color: #6b7280;
  padding: 40px 20px;
  font-size: 14px;
}

/* Smooth Transitions - Apply to interactive elements */
.analytics-transition {
  transition: all 0.2s ease;
}

/* Hover Effects for Cards - Subtle lift on hover */
.analytics-card-hover:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* Chart Container - Ensure proper containment */
.chart-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.chart-container canvas {
  max-width: 100%;
  max-height: 100%;
  box-sizing: border-box;
}

/* Chart Container Responsive Sizing */
@media (max-width: 768px) {
  .chart-container {
    height: 250px !important;
  }
}

/* Grid Gap Utilities - Consistent with design system spacing */
.analytics-grid-gap {
  gap: var(--primitives-spacing-5);
}

/* Widget Spacing - Consistent bottom margin */
.analytics-widget-spacing {
  margin-bottom: 30px;
}

/* No Data States - Centered empty state styling */
.analytics-no-data {
  text-align: center;
  color: #6b7280;
  font-size: 14px;
  padding: var(--primitives-spacing-5);
}
