/* 
 * EcoMonitor - Main Stylesheet
 * Dark theme using Replit Bootstrap dark theme variables
 */

:root {
  --main-bg-color: #0e1525;
  --card-bg-color: #1c2333;
  --highlight-color: #43a047;
  --text-color: #f0f5f9;
  --muted-text-color: #a0aec0;
  --border-color: #2d3748;
  --success-color: #43a047;
  --warning-color: #fb8c00;
  --danger-color: #e53935;
  --info-color: #1976d2;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--main-bg-color);
  color: var(--text-color);
}

main {
  flex: 1;
}

/* Card styles */
.eco-card {
  background-color: var(--card-bg-color);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.eco-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.eco-card-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.eco-card-title {
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/* Stat cards */
.stat-card {
  border-left: 4px solid var(--highlight-color);
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 700;
}

.stat-card .stat-label {
  color: var(--muted-text-color);
  font-size: 0.9rem;
}

.stat-card .stat-icon {
  font-size: 2.5rem;
  opacity: 0.2;
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

/* Status colors */
.status-good {
  color: var(--success-color);
}

.status-moderate {
  color: var(--info-color);
}

.status-warning {
  color: var(--warning-color);
}

.status-danger {
  color: var(--danger-color);
}

/* Navbar */
.navbar-brand i {
  margin-right: 0.5rem;
}

/* Forms */
.form-control, .btn {
  border-radius: 6px;
}

.form-control:focus {
  border-color: var(--highlight-color);
  box-shadow: 0 0 0 0.25rem rgba(67, 160, 71, 0.25);
}

/* Charts containers */
.chart-container {
  position: relative;
  height: 300px;
  margin-bottom: 1.5rem;
}

/* Tables */
.eco-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

.eco-table th {
  background-color: rgba(0, 0, 0, 0.2);
  padding: 12px 15px;
  border-bottom: 2px solid var(--border-color);
}

.eco-table td {
  padding: 12px 15px;
  border-bottom: 1px solid var(--border-color);
}

.eco-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

/* Footer */
footer {
  background-color: var(--card-bg-color);
  padding: 2rem 0;
  margin-top: 3rem;
}

/* Spinner */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(14, 21, 37, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* Media queries */
@media (max-width: 768px) {
  .chart-container {
    height: 250px;
  }
  
  .stat-card .stat-value {
    font-size: 1.5rem;
  }
  
  .stat-card .stat-icon {
    font-size: 1.8rem;
  }
}

@media (max-width: 576px) {
  .eco-card {
    padding: 1rem;
  }
  
  .chart-container {
    height: 200px;
  }
}

/* AQI Page Styles */
.aqi-info-card {
  height: 100%;
}

.aqi-scale {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.aqi-level {
  display: flex;
  justify-content: space-between;
  padding: 5px 10px;
  border-radius: 4px;
  color: #000;
  font-weight: 500;
}

.aqi-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2rem 0;
}

.aqi-circle {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
  border: 6px solid #ccc;
}

.aqi-value {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
}

.aqi-label {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.aqi-category {
  font-size: 1.5rem;
  font-weight: 600;
  padding: 5px 15px;
  border-radius: 20px;
  margin-top: 10px;
}

.pollutant-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.pollutant-name {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pollutant-value {
  font-weight: 600;
}

.health-card {
  height: 100%;
  border-left: 4px solid var(--info-color);
}

/* AQI colors */
.aqi-good {
  background-color: #00e400 !important;
  color: #000 !important;
}

.aqi-moderate {
  background-color: #ffff00 !important;
  color: #000 !important;
}

.aqi-unhealthy-sensitive {
  background-color: #ff7e00 !important;
  color: #000 !important;
}

.aqi-unhealthy {
  background-color: #ff0000 !important;
  color: #fff !important;
}

.aqi-very-unhealthy {
  background-color: #99004c !important;
  color: #fff !important;
}

.aqi-hazardous {
  background-color: #7e0023 !important;
  color: #fff !important;
}