.chart-data {
  position: relative;
  border-top: 1px solid
    light-dark(var(--color-gray-200), var(--color-zinc-700));
}

.chart-data__summary {
  display: flex;
  width: fit-content;
  margin: 0.75rem 1rem;
  align-items: center;
  gap: 0.25rem;
  color: light-dark(var(--color-blue-600), var(--color-blue-400));
  font-size: 0.875rem;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.chart-data__summary::-webkit-details-marker {
  display: none;
}

.chart-data__summary-label--open {
  display: none;
}

.chart-data[open]:not(.chart-data--closing)
  .chart-data__summary-label--closed {
  display: none;
}

.chart-data[open]:not(.chart-data--closing)
  .chart-data__summary-label--open {
  display: inline;
}

.chart-data__summary-icon {
  width: 0.75rem;
  height: 0.75rem;
  transition: transform 150ms ease;
}

.chart-data[open]:not(.chart-data--closing) .chart-data__summary-icon {
  transform: rotate(180deg);
}

.chart-data__download {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}

.chart-data__table-wrapper {
  max-height: 24rem;
  overflow: auto;
}

.chart-data--animating .chart-data__table-wrapper {
  overflow: hidden;
}

.chart-data__table {
  min-width: 34rem;
}

.chart-data__table .table__thead {
  position: sticky;
  z-index: 1;
  top: 0;
}

.chart-data__time {
  font-weight: 400;
  text-align: left;
  white-space: nowrap;
}

.chart-data__table .table__tbody .table__cell {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.chart--ready .chart__container {
  transition: height 200ms ease-out;
}

@media (min-width: 768px) {
  .chart-data__summary {
    margin-inline: 1.5rem;
  }

  .chart-data__download {
    right: 1.5rem;
  }
}
