/* Report accordion — uses --r-* report tokens */

.report-scope .report-accordion {
  border: 1px solid var(--r-border, rgba(0,0,0,0.08));
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  background: var(--r-surface-1, #FFFFFF);
  margin: 0 0 0.5rem 0;
  box-shadow: var(--r-shadow, 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06));
}

/* Severity accent border (left) — set via inline style or data-severity */
.report-scope .report-accordion[data-severity="good"] {
  border-left: var(--r-card-accent-width, 3px) solid var(--r-good, #22c55e);
}
.report-scope .report-accordion[data-severity="warn"] {
  border-left: var(--r-card-accent-width, 3px) solid var(--r-warn, #f59e0b);
}
.report-scope .report-accordion[data-severity="bad"] {
  border-left: var(--r-card-accent-width, 3px) solid var(--r-bad, #ef4444);
}

.report-scope .report-accordion__header {
  width: 100%;
  background: var(--r-surface-2, #F8FAFC);
  border: none;
  color: var(--r-text, #111827);
  padding: 0.9rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  gap: 0.75rem;
  transition: background-color 0.2s ease;
}
.report-scope .report-accordion__header:focus-visible {
  outline: 2px solid var(--color-primary, var(--accent-primary));
  outline-offset: 2px;
}
.report-scope .report-accordion__header:hover {
  background: var(--r-accordion-hover, rgba(0,0,0,0.03));
}
.report-scope .report-accordion__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex: 1;
}
.report-scope .report-accordion__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--r-text-faint, #9ca3af);
  font-weight: 600;
  flex-shrink: 0;
}

/* Score badge */
.report-scope .report-accordion__score-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--r-border, rgba(0,0,0,0.08));
  background: var(--r-accordion-hover, rgba(0,0,0,0.03));
  color: var(--r-text-muted, #6B7280);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* Score color variants */
.report-scope .report-accordion__score-badge--good {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.35);
  color: var(--r-good, #22c55e);
}
.report-scope .report-accordion__score-badge--warning {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
  color: var(--r-warn, #f59e0b);
}
.report-scope .report-accordion__score-badge--poor {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: var(--r-bad, #ef4444);
}

/* Light theme adjustments for badge contrast */
html[data-theme="light"] .report-scope .report-accordion__score-badge--good,
.white-theme .report-scope .report-accordion__score-badge--good {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}
html[data-theme="light"] .report-scope .report-accordion__score-badge--warning,
.white-theme .report-scope .report-accordion__score-badge--warning {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
}
html[data-theme="light"] .report-scope .report-accordion__score-badge--poor,
.white-theme .report-scope .report-accordion__score-badge--poor {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

/* Chevron */
.report-scope .report-accordion__chevron {
  font-size: 0.85rem;
  color: var(--r-text-faint, #9ca3af);
  transition: transform 0.2s ease;
}
.report-scope .report-accordion__chevron--open {
  transform: rotate(180deg);
}

/* Body */
.report-scope .report-accordion__body {
  display: none;
  padding: 1.25rem;
  color: var(--r-text-muted, #6B7280);
  background: var(--r-bg, #FFFFFF);
}
.report-scope .report-accordion__body--open {
  display: block;
}

/* PRO pill */
.report-scope .report-accordion__pro-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(var(--accent-primary-rgb), 0.4);
  background: rgba(var(--accent-primary-rgb), 0.1);
  color: var(--color-primary, var(--accent-primary));
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}
