/* Cow Behavior Analytics Styles */

.page-title {
  background: linear-gradient(135deg, #526bbe 0%, #203954 100%);
  color: white;
  padding: 80px 0 40px;
  margin-top: 70px;
}

.page-title h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.page-title p {
  font-size: 1.1rem;
  opacity: 0.9;
}

.dashboard {
  padding: 60px 0;
  background-color: #f8f9fa;
}

/* Filter Controls */
.filter-controls {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.filter-controls label {
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
}

/* Stats Cards */
.stats-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  transition: transform 0.3s ease;
}

.stats-card:hover {
  transform: translateY(-5px);
}

.stats-card-body {
  padding: 25px;
  text-align: center;
}

.stats-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #666;
  margin-bottom: 10px;
}

.stats-card-title i {
  margin-right: 8px;
  color: #667eea;
  font-size: 1.2rem;
}

.stats-card-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 5px;
}

.stats-card-desc {
  font-size: 0.8rem;
  color: #888;
}

/* Microphone Stats Card */
.mic-card {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.mic-card .stats-card-title,
.mic-card .stats-card-desc {
  color: rgba(255, 255, 255, 0.95);
}

.mic-card .stats-card-title i {
  color: white;
}

.mic-card .stats-card-value {
  color: white;
  font-size: 2.2rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* Temperature Stats Card */
.temp-card {
  background: linear-gradient(135deg, #ff9a56 0%, #ff6b6b 100%);
}

.temp-card .stats-card-title,
.temp-card .stats-card-desc {
  color: rgba(255, 255, 255, 0.95);
}

.temp-card .stats-card-title i {
  color: white;
}

.temp-card .stats-card-value {
  color: white;
  font-size: 2.2rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* Gyroscope Stats Card */
.gyro-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gyro-card .stats-card-title,
.gyro-card .stats-card-desc {
  color: rgba(255, 255, 255, 0.95);
}

.gyro-card .stats-card-title i {
  color: white;
}

.gyro-card .stats-card-value {
  color: white;
  font-size: 1.4rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  line-height: 1.6;
}

.gyro-card .stats-card-value small {
  font-size: 0.7rem;
  opacity: 0.9;
}

/* Barn Environment Stats Cards */
.barn-ch4-card {
  background: linear-gradient(135deg, #f5af19 0%, #f12711 100%);
}

.barn-ch4-card .stats-card-title,
.barn-ch4-card .stats-card-desc {
  color: rgba(255, 255, 255, 0.95);
}

.barn-ch4-card .stats-card-title i {
  color: white;
}

.barn-ch4-card .stats-card-value {
  color: white;
  font-size: 1.8rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.barn-nh3-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.barn-nh3-card .stats-card-title,
.barn-nh3-card .stats-card-desc {
  color: rgba(255, 255, 255, 0.95);
}

.barn-nh3-card .stats-card-title i {
  color: white;
}

.barn-nh3-card .stats-card-value {
  color: white;
  font-size: 1.8rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.barn-co2-card {
  background: linear-gradient(135deg, #6b6b83 0%, #3d3d5c 100%);
}

.barn-co2-card .stats-card-title,
.barn-co2-card .stats-card-desc {
  color: rgba(255, 255, 255, 0.95);
}

.barn-co2-card .stats-card-title i {
  color: white;
}

.barn-co2-card .stats-card-value {
  color: white;
  font-size: 1.8rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.barn-temp-card {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.barn-temp-card .stats-card-title,
.barn-temp-card .stats-card-desc {
  color: rgba(255, 255, 255, 0.95);
}

.barn-temp-card .stats-card-title i {
  color: white;
}

.barn-temp-card .stats-card-value {
  color: white;
  font-size: 1.8rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.barn-humidity-card {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.barn-humidity-card .stats-card-title,
.barn-humidity-card .stats-card-desc {
  color: rgba(255, 255, 255, 0.95);
}

.barn-humidity-card .stats-card-title i {
  color: white;
}

.barn-humidity-card .stats-card-value {
  color: white;
  font-size: 1.8rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* Barn Environment Container */
.barn-environment-container {
  height: auto !important;
  padding-bottom: 30px;
}

.barn-environment-container .stats-card {
  margin-bottom: 15px;
}

.barn-chart-wrapper {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 15px;
  height: 300px;
}

.barn-chart-wrapper h6 {
  font-weight: 600;
  color: #333;
  margin-bottom: 15px;
  font-size: 0.95rem;
}

.barn-chart-wrapper h6 i {
  margin-right: 8px;
  color: #667eea;
}

.barn-chart-wrapper canvas {
  max-height: 240px;
}

/* Health Status Colors */
.health-healthy {
  color: #28a745 !important;
}

.health-sick {
  color: #dc3545 !important;
}

/* Activity Colors */
.activity-grazing {
  color: #28a745;
}

.activity-standing-ruminating {
  color: #17a2b8;
}

.activity-lying-ruminating {
  color: #6f42c1;
}

.activity-lying-resting {
  color: #6c757d;
}

.activity-walking {
  color: #fd7e14;
}

.activity-standing-resting {
  color: #20c997;
}

/* Chart Containers */
.chart-container {
  background: white;
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  height: 400px;
}

.chart-container h5 {
  font-weight: 600;
  color: #333;
  margin-bottom: 20px;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 10px;
}

.chart-container h5 i {
  margin-right: 8px;
  color: #667eea;
}

.chart-container canvas {
  max-height: 320px;
}

/* Activity Log */
.activity-log {
  background: white;
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.activity-log h5 {
  font-weight: 600;
  color: #333;
  margin-bottom: 20px;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 10px;
}

.activity-log h5 i {
  margin-right: 8px;
  color: #667eea;
}

/* Export Buttons */
.export-buttons {
  display: flex;
  gap: 8px;
}

.export-buttons .btn {
  padding: 6px 12px;
  font-size: 0.875rem;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.export-buttons .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.export-buttons .btn i {
  margin-right: 5px;
}

@media (max-width: 768px) {
  .export-buttons {
    flex-direction: column;
    gap: 5px;
  }
  
  .export-buttons .btn {
    font-size: 0.8rem;
    padding: 5px 10px;
  }
}

.activity-log table {
  margin-bottom: 0;
}

.activity-log th {
  background-color: #f8f9fa;
  border-top: none;
  font-weight: 600;
  color: #333;
}

.activity-log td {
  vertical-align: middle;
}

/* Status Badges */
.status-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-ideal {
  background-color: #d4edda;
  color: #155724;
}

.status-not-ideal {
  background-color: #f8d7da;
  color: #721c24;
}

.status-healthy {
  background-color: #d1ecf1;
  color: #0c5460;
}

.status-sick {
  background-color: #f5c6cb;
  color: #721c24;
}

.status-adult {
  background-color: #e2e3e5;
  color: #383d41;
}

.status-pregnant {
  background-color: #ffeaa7;
  color: #856404;
}

.status-estrus {
  background-color: #fadbd8;
  color: #721c24;
}

/* Loading States */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Error States */
.error-message {
  background-color: #f8d7da;
  color: #721c24;
  padding: 15px;
  border-radius: 5px;
  margin: 10px 0;
  border: 1px solid #f5c6cb;
}

.success-message {
  background-color: #d4edda;
  color: #155724;
  padding: 15px;
  border-radius: 5px;
  margin: 10px 0;
  border: 1px solid #c3e6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
  .page-title {
    padding: 60px 0 30px;
  }
  
  .page-title h1 {
    font-size: 2rem;
  }
  
  .dashboard {
    padding: 40px 0;
  }
  
  .filter-controls {
    padding: 15px;
  }
  
  .stats-card-body {
    padding: 20px;
  }
  
  .chart-container {
    padding: 20px;
    height: auto;
  }
  
  .chart-container canvas {
    max-height: 250px;
  }
  
  .activity-log {
    padding: 20px;
  }
  
  .table-responsive {
    font-size: 0.9rem;
  }
}

/* Custom Scrollbar */
.activity-log .table-responsive::-webkit-scrollbar {
  height: 8px;
}

.activity-log .table-responsive::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.activity-log .table-responsive::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}

.activity-log .table-responsive::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Video Container Styles */
.video-chart {
  height: auto !important;
  min-height: 500px;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  border-radius: 10px;
  background: #000;
  margin-bottom: 15px;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 10px;
}
