/* aggregate-chart.css (Night 32)
   Visual container + legend + attribution for page-level TradingView
   Lightweight Charts. Works with the standard dark terminal palette.
*/

.chart-section {
  padding: 20px 0 8px;
  margin: 8px 0 24px;
}

.chart-section__title {
  font-family: var(--font-mono, "JetBrains Mono", ui-monospace, monospace);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #6b7280;
  margin: 0 0 10px;
  padding: 0 4px;
}

[data-aggregate-chart] {
  position: relative;
  margin: 0;
  border: 1px solid rgba(64, 64, 64, 0.4);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(13, 13, 26, 0.5);
  min-height: 220px;
}

[data-aggregate-chart] canvas,
[data-aggregate-chart] table {
  display: block;
}

.agg-chart__legend {
  position: absolute;
  top: 8px;
  left: 12px;
  z-index: 2;
  font-family: var(--font-mono, "JetBrains Mono", ui-monospace, monospace);
  font-size: 11px;
  color: #a3a3a3;
  pointer-events: none;
  padding: 4px 8px;
  background: rgba(10, 10, 10, 0.55);
  border-radius: 4px;
  backdrop-filter: blur(2px);
}

.agg-chart__legend span {
  font-size: 10px;
  margin-right: 2px;
}

.agg-chart__attribution {
  position: absolute;
  bottom: 4px;
  right: 10px;
  z-index: 2;
  font-size: 10px;
  color: #4b5563;
  pointer-events: auto;
}
.agg-chart__attribution a {
  color: #6b7280;
  text-decoration: none;
}
.agg-chart__attribution a:hover {
  color: #9ca3af;
  text-decoration: underline;
}

.agg-chart__error {
  color: #6b7280;
  font-family: var(--font-mono, "JetBrains Mono", ui-monospace, monospace);
  font-size: 12px;
  text-align: center;
  padding: 48px 16px;
}

@media (max-width: 640px) {
  .chart-section {
    padding: 16px 0 4px;
    margin: 4px 0 16px;
  }
  .chart-section__title {
    font-size: 10px;
    letter-spacing: 0.1em;
  }
  [data-aggregate-chart] {
    border-radius: 6px;
    min-height: 180px;
  }
}
