/* Energy Intelligence Dashboard - Standalone Styles */
/* This file contains only the energy dashboard section styles to prevent conflicts */

/* Energy Dashboard Section */
#energy-dashboard {
  position: relative;
  background: #ffffff;
  overflow: hidden;
}

/* Clean white background - no additional elements */
#energy-dashboard::before {
  display: none;
}

/* Energy Flow Animation */
@keyframes energyFlow {
  0%, 100% {
    background-position: 0 0, 100px 100px, 50px 150px;
  }
  33% {
    background-position: 50px 25px, 150px 125px, 100px 175px;
  }
  66% {
    background-position: -25px 50px, 75px 75px, 25px 125px;
  }
}

/* Energy Dashboard Content */
#energy-dashboard .max-w-7xl {
  position: relative;
  z-index: 10;
}

/* Energy Dashboard Badge */
.energy-dashboard-badge {
  background: linear-gradient(135deg, #3b82f6, #22c55e);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: white;
}

/* Energy Dashboard Titles */
.energy-dashboard-title {
  color: #1f2937;
  text-shadow: none;
}

.energy-dashboard-subtitle {
  color: #6b7280;
  text-shadow: none;
}

/* Chart period buttons */
.chart-period-btn {
  @apply px-4 py-2 rounded-lg text-sm font-medium transition-all duration-200;
  background: rgba(107, 114, 128, 0.1);
  color: #6b7280;
  border: 1px solid rgba(107, 114, 128, 0.2);
}

.chart-period-btn:hover {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.3);
}

.chart-period-btn.active {
  background: linear-gradient(135deg, #3b82f6, #22c55e);
  color: white;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Appliance cards */
.appliance-card {
  @apply bg-white rounded-xl p-4 border border-gray-200 hover:border-blue-300 hover:shadow-md transition-all duration-300 cursor-pointer;
  min-height: 120px;
}

.appliance-card .flex {
  gap: 1rem;
  align-items: flex-start;
}

.appliance-card .font-semibold {
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.appliance-card .text-sm {
  margin-bottom: 0.75rem;
}

.appliance-card .text-lg {
  margin-bottom: 0.25rem;
}

.appliance-card .text-xs {
  line-height: 1.3;
}

.appliance-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.1);
}

/* Energy dashboard specific appliance cards */
#energy-dashboard .appliance-card {
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.95) 0%, 
    rgba(248, 250, 252, 0.95) 100%);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

#energy-dashboard .appliance-card:hover {
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 1) 0%, 
    rgba(240, 249, 255, 1) 100%);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.15);
}

/* Chart container enhancements */
#energyDashboardChart {
  border-radius: 16px;
}

/* Animation for appliance cards */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.appliance-card {
  animation: fadeInUp 0.6s ease-out;
}

.appliance-card:nth-child(1) { animation-delay: 0.1s; }
.appliance-card:nth-child(2) { animation-delay: 0.2s; }
.appliance-card:nth-child(3) { animation-delay: 0.3s; }
.appliance-card:nth-child(4) { animation-delay: 0.4s; }
.appliance-card:nth-child(5) { animation-delay: 0.5s; }
.appliance-card:nth-child(6) { animation-delay: 0.6s; }

/* Chart container glow effect */
.chart-container-glow {
  position: relative;
}

.chart-container-glow::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, #3b82f6, #22c55e, #f59e0b);
  border-radius: 18px;
  opacity: 0.1;
  filter: blur(8px);
  z-index: -1;
}

/* Loading state for chart */
.chart-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 400px;
  background: linear-gradient(135deg, 
    rgba(248, 250, 252, 0.8) 0%, 
    rgba(241, 245, 249, 0.8) 100%);
  border-radius: 16px;
}

.chart-loading::after {
  content: '';
  width: 40px;
  height: 40px;
  border: 4px solid #e2e8f0;
  border-top: 4px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .appliance-card {
    @apply p-3;
    min-height: 130px;
  }
  
  .appliance-card .flex {
    gap: 0.75rem;
  }
  
  .appliance-card .font-semibold {
    font-size: 0.9rem;
    line-height: 1.3;
    margin-bottom: 0.4rem;
  }
  
  .appliance-card .text-sm {
    margin-bottom: 0.6rem;
  }
  
  .appliance-card .text-lg {
    margin-bottom: 0.2rem;
  }
  
  .appliance-card .text-xs {
    font-size: 0.7rem;
    line-height: 1.2;
  }
  
  .chart-period-btn {
    @apply px-3 py-1 text-xs;
  }
  
  #energyDashboardChart {
    height: 300px !important;
  }
}

@media (max-width: 640px) {
  .appliance-card {
    padding: 1rem !important;
    min-height: 140px;
  }
  
  .appliance-card .flex {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 1rem;
  }
  
  .appliance-card .text-right {
    text-align: left !important;
    width: 100%;
  }
  
  .appliance-card .font-semibold {
    font-size: 0.875rem !important;
    line-height: 1.3;
    margin-bottom: 0.4rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  
  .appliance-card .text-sm {
    margin-bottom: 0.75rem;
  }
  
  .appliance-card .text-lg {
    margin-bottom: 0.3rem;
  }
  
  .appliance-card .text-xs {
    font-size: 0.75rem !important;
    line-height: 1.2;
    white-space: nowrap;
  }
} 