@use '../../../_chart-shared';

.author-universe-container {
  width: 100%;
}

.author-title-icon {
  font-size: 1.5rem;
  color: #8b5cf6;
}

.author-count-badge {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(139, 92, 246, 0.1));
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 20px;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #a78bfa;
  white-space: nowrap;
}

.chart-legend-info {
  margin-bottom: 1rem;

  .legend-note {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary-color);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;

    i {
      color: #8b5cf6;
    }
  }
}

.chart-wrapper {
  position: relative;
  height: 350px;
  width: 100%;
}

.insights-section {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

.insight-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(139, 92, 246, 0.05));
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  transition: all 0.2s ease;

  &:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(139, 92, 246, 0.08));
    border-color: rgba(139, 92, 246, 0.35);
    transform: translateY(-1px);
  }

  .insight-icon {
    color: #f59e0b;
    font-size: 0.85rem;
    flex-shrink: 0;
  }

  .insight-text {
    font-size: 0.85rem;
    color: var(--text-color, #ffffff);
    line-height: 1.3;
  }
}

@media (max-width: 768px) {
  .chart-wrapper {
    height: 300px;
  }

  .insights-grid {
    grid-template-columns: 1fr;
  }

  .chart-legend-info {
    .legend-note {
      font-size: 0.75rem;
    }
  }
}

@media (max-width: 480px) {
  .chart-wrapper {
    height: 260px;
  }

  .author-count-badge {
    font-size: 0.8rem;
    padding: 0.3rem 0.75rem;
  }

  .insight-card {
    padding: 0.5rem 0.7rem;

    .insight-text {
      font-size: 0.8rem;
    }
  }
}
