/* Páginas top — gráfico vanilla inspirado en ChartContainer + tooltip/leyenda Recharts/shadcn */

[data-chart='pages-top'] {
  --color-views: #8c6020;
  --color-views-muted: rgba(140, 96, 32, 0.35);
  --chart-grid: rgba(28, 18, 8, 0.08);
  --chart-tooltip-border: rgba(28, 18, 8, 0.12);
  --chart-tooltip-bg: rgba(250, 248, 244, 0.98);
  --chart-tooltip-shadow: 0 12px 40px rgba(28, 18, 8, 0.12);
}

.page-chart {
  position: relative;
  width: 100%;
  margin-top: 10px;
  aspect-ratio: 16 / 8;
  min-height: 150px;
  max-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-size: 11px;
  color: var(--fg-2);
}

.page-chart__frame {
  position: relative;
  flex: 1;
  min-height: 0;
  width: 100%;
}

.page-chart__svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.page-chart__grid line {
  stroke: var(--chart-grid);
  stroke-width: 1;
}

.page-chart__axis text {
  fill: var(--fg-3);
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10px;
}

.page-chart__path-label {
  fill: var(--fg-2);
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
}

.page-chart__value-label {
  fill: var(--fg);
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
}

.page-chart__bar-wrap {
  transform: scaleX(0);
  transform-box: fill-box;
  transform-origin: left center;
  transition: transform 0.72s cubic-bezier(0.2, 0.75, 0.2, 1);
  cursor: crosshair;
}

.page-chart--in .page-chart__bar-wrap {
  transform: scaleX(1);
}

.page-chart__bar {
  filter: drop-shadow(0 1px 2px rgba(28, 18, 8, 0.08));
}

.page-chart__tip {
  position: absolute;
  z-index: 30;
  min-width: 8.5rem;
  padding: 8px 11px;
  border-radius: 10px;
  border: 1px solid var(--chart-tooltip-border);
  background: var(--chart-tooltip-bg);
  box-shadow: var(--chart-tooltip-shadow);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease;
}

.page-chart__tip.is-on {
  opacity: 1;
  visibility: visible;
}

.page-chart__tip-label {
  font-weight: 600;
  font-size: 11px;
  color: var(--fg);
  margin-bottom: 6px;
  font-family: 'Geist Mono', ui-monospace, monospace;
}

.page-chart__tip-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  line-height: 1.2;
}

.page-chart__tip-row span:first-child {
  color: var(--fg-3);
  font-size: 11px;
}

.page-chart__tip-row span:last-child {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-weight: 600;
  font-size: 11px;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

.page-chart__tip-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--color-views);
  flex-shrink: 0;
}

.page-chart__legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-top: 10px;
  color: var(--fg-3);
  font-size: 11px;
}

.page-chart__legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--color-views);
  flex-shrink: 0;
}
