/* 문서 속 그림 — static/js/document_figures.js 가 블록(```image, 서버가 그린 차트·도식·SVG) 자리에 넣는 칸.
   색은 사이트 토큰만 쓴다(밝은·어두운 테마가 함께 바뀐다). */

.doc-figure {
  margin: 12px 0;
  text-align: center;
}

.doc-figure__frame {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 그림이 오기 전·못 왔을 때만 판을 그린다 — 온 그림은 판 없이. */
.doc-figure.is-loading .doc-figure__frame,
.doc-figure.is-failed .doc-figure__frame {
  min-height: 96px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--input-bg);
}

.doc-figure--image.is-loading .doc-figure__frame {
  aspect-ratio: 4 / 3;
  max-width: 420px;
  margin: 0 auto;
  animation: doc-figure-pulse 1.6s ease-in-out infinite;
}

.doc-figure__img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.doc-figure--image .doc-figure__img {
  max-height: 520px;
  border-radius: 10px;
}

.doc-figure__status {
  padding: 16px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.doc-figure__caption {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

@keyframes doc-figure-pulse {
  50% { opacity: 0.6; }
}

@media (prefers-reduced-motion: reduce) {
  .doc-figure--image.is-loading .doc-figure__frame { animation: none; }
}
