.chart-frame {
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 12px;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.chart-frame canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

.chart-frame canvas:active {
  cursor: grabbing;
}

.chart-frame canvas[hidden],
.chart-frame img[hidden] {
  display: none;
}

.chart-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
  display: block;
  cursor: zoom-in;
  transition: transform 0.3s ease;
}

.chart-frame img:hover {
  transform: scale(1.01);
}

.chart-frame.is-loading {
  position: relative;
  overflow: hidden;
}

.chart-frame.is-loading::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(15, 23, 42, 0.05),
    rgba(109, 94, 252, 0.18),
    rgba(15, 23, 42, 0.05)
  );
  background-size: 200% 100%;
  animation: chart-sheen 1.2s ease-in-out infinite;
  z-index: 1;
}

.chart-frame.is-loading::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(109, 94, 252, 0.12),
    rgba(109, 94, 252, 0.45),
    rgba(109, 94, 252, 0.12)
  );
  background-size: 200% 100%;
  animation: chart-sheen 1.2s ease-in-out infinite;
  z-index: 2;
}

.chart-frame.is-loading canvas,
.chart-frame.is-loading img {
  opacity: 0;
}

@keyframes chart-sheen {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chart-frame.is-loading::before,
  .chart-frame.is-loading::after {
    animation: none;
  }
}
