/**
 * RealClean Dashboard — Custom Styles
 * Extends Tailwind CSS with component-specific styles.
 */

/* Score threshold badges */
.score-green {
  color: #22c55e;
}

.score-orange {
  color: #f59e0b;
}

.score-red {
  color: #ef4444;
}

.score-badge-green {
  background-color: #dcfce7;
  color: #166534;
}

.score-badge-orange {
  background-color: #fef3c7;
  color: #92400e;
}

.score-badge-red {
  background-color: #fee2e2;
  color: #991b1b;
}

/* Chart containers */
.chart-container {
  position: relative;
  width: 100%;
  margin: 0 auto;
}

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

/* Taller chart on mobile for readability */
@media (max-width: 640px) {
  .chart-container canvas {
    min-height: 220px;
  }
}

/* Site cards */
.site-card {
  background: #ffffff;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  padding: 1.5rem;
  transition: box-shadow 0.2s ease;
}

.site-card:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
}

.site-card.highlighted {
  box-shadow: 0 0 0 3px #009bde, 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* KPI cards */
.kpi-card {
  background: #ffffff;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  padding: 1.5rem;
}

/* Site toggle pills for multi-site chart */
.site-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  background: #f9fafb;
  color: #9ca3af;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.site-toggle:hover {
  color: #6b7280;
  background: #f3f4f6;
}

.site-toggle.active {
  color: #374151;
}

.site-toggle .site-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* All / None action buttons */
.site-toggle-action {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  color: #009bde;
  background: transparent;
  border: 1px solid #009bde;
  cursor: pointer;
  transition: all 0.15s ease;
}

.site-toggle-action:hover {
  background: #009bde;
  color: #ffffff;
}

/* Loading spinner animation (supplement to Tailwind animate-spin) */
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Smooth view transitions */
.view-enter {
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Mobile nav overlay */
.mobile-nav-overlay {
  background: rgba(9, 63, 137, 0.95);
}

/* Form inputs */
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #009bde;
  box-shadow: 0 0 0 3px rgba(0, 155, 222, 0.2);
}
