/*
 * Propshaft does not process Sprockets `*= require` directives. Every file in
 * app/assets/stylesheets is loaded by `stylesheet_link_tag :app` in the layouts,
 * so add new styles as their own file (e.g. custom.css, ai_chat.css).
 */

/* START: AI Insights dashboard panel */
.ai-insights-card {
  border: 0;
  border-radius: 14px;
  overflow: hidden;
}

.ai-insights-header {
  background: linear-gradient(90deg, #f3f0ff 0%, #eef4ff 100%);
  border-bottom: 1px solid #e6ebf5;
  gap: 0.5rem;
}

.ai-insights-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: #1f2d3d;
}

.ai-insights-spark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #7048e8, #3b5bdb);
  font-size: 0.9rem;
  box-shadow: 0 2px 6px rgba(59, 91, 219, 0.35);
}

.ai-insight-item {
  border-left: 4px solid transparent;
  padding-left: 1rem;
  transition: background-color 0.15s ease;
}

.ai-insight-item:hover {
  background-color: #fafbff;
}

.ai-insight--critical { border-left-color: #d63939; }
.ai-insight--warning  { border-left-color: #f59f00; }
.ai-insight--good     { border-left-color: #2fb344; }
.ai-insight--info     { border-left-color: #4c8dd6; }

.ai-insight-group {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  font-weight: 600;
  color: #6c7a91;
  text-transform: uppercase;
}

.ai-insight-title {
  margin-top: 0.35rem;
  font-weight: 700;
  color: #1f2d3d;
}

.ai-insight-text {
  margin-top: 0.15rem;
  color: #5b6b83;
  line-height: 1.5;
}

.ai-insight-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.ai-insight-metric {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: #eef4ff;
  border: 1px solid #dbe7ff;
}

.ai-insight-metric-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6c7a91;
}

.ai-insight-metric-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1f2d3d;
}

.ai-insights-generate {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding-inline: 0.9rem;
}

.ai-insights-generate:disabled {
  opacity: 0.75;
}

.ai-insights-generate.ai-insights-loading .icon {
  animation: ai-insights-spin 1s linear infinite;
}

@keyframes ai-insights-spin {
  to { transform: rotate(360deg); }
}

.ai-insights-chevron {
  transition: transform 0.2s ease;
}

.ai-insights-toggle[aria-expanded="false"] .ai-insights-chevron {
  transform: rotate(-90deg);
}

.ai-insights-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
/* END: AI Insights dashboard panel */
