.affcat-price-history {
  margin: 0.85rem 0 0.35rem;
}

.affcat-price-history__inner {
  padding: 0.85rem 0.95rem 0.95rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  background: var(--surface, #f8fafc);
}

.affcat-price-history__title {
  margin: 0 0 0.55rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text, #0f172a);
}

.affcat-price-history__loading,
.affcat-price-history__error {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted, #64748b);
}

.affcat-price-history__summary {
  margin: 0 0 0.75rem;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--text, #0f172a);
}

.affcat-price-history__badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  margin-bottom: 0.65rem;
}

.affcat-price-history__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.affcat-price-history__badge--down {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.affcat-price-history__badge--up {
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
}

.affcat-price-history__badge--stable {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
}

.affcat-price-history__chart-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.affcat-price-history__chart {
  display: block;
  width: 100%;
  height: auto;
}

.affcat-price-history__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin-top: 0.55rem;
  font-size: 0.72rem;
  color: var(--muted, #64748b);
}

.affcat-price-history__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.affcat-price-history__legend-line {
  width: 1.1rem;
  height: 0;
  border-top: 2px solid currentColor;
}

.affcat-price-history__legend-line--dash {
  border-top-style: dashed;
}

.affcat-price-history__disclaimer {
  margin: 0.55rem 0 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--muted, #64748b);
}

html[data-theme="dark"] .affcat-price-history__inner {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(148, 163, 184, 0.22);
}

html[data-theme="dark"] .affcat-price-history__title,
html[data-theme="dark"] .affcat-price-history__summary {
  color: var(--text, #f1f5f9);
}

html[data-theme="dark"] .affcat-price-history__badge--down {
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
}

html[data-theme="dark"] .affcat-price-history__badge--up {
  background: rgba(248, 113, 113, 0.14);
  color: #fca5a5;
}

html[data-theme="dark"] .affcat-price-history__badge--stable {
  background: rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
}
