.market-share-chart-panel {
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
}

.market-share-reset-button {
  padding: 0.25rem 0.75rem;
  border: 1px solid rgba(125, 76, 219, 0.3);
  border-radius: var(--radius-sm);
  background: rgba(125, 76, 219, 0.1);
  color: var(--color-accent-soft);
  font-size: 0.75rem;
  transition: background-color var(--transition-fast);
}

.market-share-reset-button:hover {
  background: rgba(125, 76, 219, 0.2);
}

.market-share-hover-context {
  margin-bottom: 2rem;
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.market-share-key-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.market-share-key-dot--oss {
  color: #84cc16;
  background: #84cc16;
}

.market-share-key-dot--proprietary {
  color: #f97316;
  background: #f97316;
}

.market-share-data-fragment {
  position: absolute;
  top: -9999px;
  left: -9999px;
}

.market-share-legend-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  transition: color var(--transition-fast), opacity var(--transition-fast);
}

.market-share-legend-item:hover {
  color: var(--color-text-soft);
}

.market-share-tooltip {
  position: fixed;
  z-index: var(--z-modal);
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: 12px;
  pointer-events: none;
  transition: opacity 100ms ease;
}

.market-share-tooltip__title {
  margin-bottom: 4px;
  color: var(--color-text);
  font-weight: 600;
}

.market-share-tooltip__value {
  margin-bottom: 2px;
  color: var(--color-text-soft);
}

.market-share-tooltip__delta--positive {
  margin-top: 4px;
  color: var(--color-positive);
}

.market-share-tooltip__delta--negative {
  margin-top: 4px;
  color: var(--color-negative);
}

@media (min-width: 768px) {
  .market-share-chart-panel {
    padding: 1.5rem;
  }
}

.market-share-legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--legend-color);
  border-radius: 50%;
  background: var(--legend-color);
}
