/* Reports Visual Enhancements */

/* Hero card gradient */
.report-hero-card.bg-gradient-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Chart container */
.chart-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-container canvas {
  max-width: 100%;
  height: auto !important;
}

/* Progress ring animation */
.progress-ring__circle {
  transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  stroke-linecap: round;
}

/* Insight cards with hover effect */
.insight-card {
  transition: transform 0.2s, box-shadow 0.2s;
}

.insight-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.1) !important;
}

/* Trend indicators */
.trend-up {
  color: #28a745;
  animation: pulse-green 2s infinite;
}

.trend-down {
  color: #dc3545;
  animation: pulse-red 2s infinite;
}

@keyframes pulse-green {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes pulse-red {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Heatmap cells */
.heatmap-cell {
  border-radius: 4px;
  transition: all 0.2s;
}

.heatmap-cell:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Mood legend badges */
.controller-reports .mood-legend .badge {
  min-width: 80px;
  padding: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .report-hero-card {
    text-align: center;
  }

  .report-hero-card .display-6 {
    font-size: 1.5rem;
  }

  .chart-container {
    height: 200px !important;
  }

  /* Activity Details table mobile optimization */
  .controller-reports .table-responsive table.table-sm {
    font-size: 0.8rem;
  }

  .controller-reports .table-responsive table.table-sm th,
  .controller-reports .table-responsive table.table-sm td {
    padding: 0.4rem 0.25rem;
  }

  .controller-reports .table-responsive table.table-sm th:first-child,
  .controller-reports .table-responsive table.table-sm td:first-child {
    padding-left: 0.5rem;
  }

  .controller-reports .table-responsive table.table-sm .badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.3rem;
  }

  .controller-reports .table-responsive table.table-sm .badge i {
    font-size: 0.6rem;
  }
}

/* Extra small devices (360px and below) */
@media (max-width: 400px) {
  .controller-reports .table-responsive table.table-sm {
    font-size: 0.75rem;
  }

  .controller-reports .table-responsive table.table-sm th,
  .controller-reports .table-responsive table.table-sm td {
    padding: 0.3rem 0.2rem;
    white-space: nowrap;
  }

  .controller-reports .table-responsive table.table-sm th:first-child,
  .controller-reports .table-responsive table.table-sm td:first-child {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .controller-reports .table-responsive table.table-sm .badge {
    font-size: 0.6rem;
    padding: 0.15rem 0.25rem;
  }

  /* Compact card headers on mobile */
  .controller-reports .card-header h5 {
    font-size: 0.95rem;
  }

  .controller-reports .card-header h5 i {
    font-size: 0.9rem;
  }

  /* Adjust button text on mobile */
  .controller-reports .btn-sm {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }
}

/* Print styles */
@media print {
  .controller-reports .report-hero-card {
    background: white !important;
    color: black !important;
    border: 1px solid #dee2e6;
  }

  .controller-reports .no-print {
    display: none !important;
  }

  .controller-reports .card {
    page-break-inside: avoid;
  }
}

/* Accessibility - respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .progress-ring__circle,
  .insight-card,
  .heatmap-cell {
    transition: none;
  }

  .trend-up,
  .trend-down {
    animation: none;
  }
}
