/*
 * TinyMCE 콘텐츠 스타일 — 에디터 내부 + 템플릿 렌더링 공통
 *
 * 참고: https://www.tiny.cloud/docs/tinymce/latest/editor-content-css/
 * 에디터: body_class: "tinymce-content" → iframe <body>에 클래스 부여
 * 템플릿: <div class="tinymce-content"> 래퍼로 스코프 적용
 *
 * 모든 규칙이 .tinymce-content 클래스 안에서만 적용됩니다.
 */

.tinymce-content {
  font-family:
    "Pretendard",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #333;
}

.tinymce-content p {
  margin: 0.4rem 0;
  min-height: 1em;
}

/* FAQ 답변은 표준데이터 관리 화면처럼 A 레이블과 첫 문장 기준선을 맞춘다. */
.tinymce-content.faq-answer-content {
  color: #73787e;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.tinymce-content.faq-answer-content > :first-child {
  margin-top: 0;
}

.tinymce-content.faq-answer-content > :last-child {
  margin-bottom: 0;
}

.tinymce-content ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin: 0.4rem 0;
}

.tinymce-content ol {
  list-style-type: decimal;
  padding-left: 1.5rem;
  margin: 0.4rem 0;
}

.tinymce-content li {
  margin: 0.25rem 0;
}

.tinymce-content h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0.75rem 0;
}
.tinymce-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0.75rem 0;
}
.tinymce-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0.5rem 0;
}
.tinymce-content h4 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0.5rem 0;
}
.tinymce-content h5 {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0.5rem 0;
}
.tinymce-content h6 {
  font-size: 0.75rem;
  font-weight: 600;
  margin: 0.5rem 0;
}

.tinymce-content a {
  color: #1a6fcf;
  text-decoration: underline;
}

.tinymce-content strong,
.tinymce-content b {
  font-weight: 700;
}

.tinymce-content em,
.tinymce-content i {
  font-style: italic;
}

.tinymce-content blockquote {
  border-left: 2px solid #ccc;
  margin: 0.5rem 0 0.5rem 1.5rem;
  padding-left: 1rem;
  color: #666;
}

.tinymce-content code {
  font-family: ui-monospace, monospace;
  font-size: 0.8125rem;
  background-color: #e8e8e8;
  border-radius: 3px;
  padding: 0.1rem 0.2rem;
}

.tinymce-content pre {
  font-family: ui-monospace, monospace;
  font-size: 0.8125rem;
  background-color: #e8e8e8;
  border-radius: 3px;
  padding: 1rem;
  overflow-x: auto;
  white-space: pre-wrap;
}

.tinymce-content hr {
  border: none;
  border-top: 1px solid #ccc;
  margin: 1rem 0;
}

.tinymce-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 0.5rem 0;
}

.tinymce-content table:not([cellpadding]) td,
.tinymce-content table:not([cellpadding]) th {
  padding: 0.4rem;
}

.tinymce-content table[border]:not([border="0"]) td,
.tinymce-content table[border]:not([border="0"]) th {
  border: 1px solid #ccc;
}

.tinymce-content figure {
  display: table;
  margin: 1rem auto;
}

.tinymce-content figure figcaption {
  color: #999;
  display: block;
  margin-top: 0.25rem;
  text-align: center;
  font-size: 0.8125rem;
}

.tinymce-content img {
  max-width: 100%;
  height: auto;
}
