/*
 * Tiptap Content Rendering Styles for Journal Module
 * Admin 모듈의 tiptap-editor.css에서 렌더링에 필요한 스타일만 추출
 */

.tiptap-content {
    line-height: 1.6;
    color: #1f2937;
}

/* Typography - post.css와 충돌하지 않도록 조정 */
.tiptap-content h1 { font-size: 1.875em; font-weight: 700; margin-top: 1.5em; margin-bottom: 0.5em; }
.tiptap-content h2 { font-size: 1.5em; font-weight: 700; margin-top: 1.5em; margin-bottom: 0.5em; }
.tiptap-content h3 { font-size: 1.25em; font-weight: 600; margin-top: 1.2em; margin-bottom: 0.5em; }
.tiptap-content ul { list-style-type: disc !important; padding-left: 1.5rem; margin-bottom: 1em; }
.tiptap-content ul li { list-style: disc; margin-bottom: 0.5em; }
.tiptap-content ol { list-style-type: decimal !important; padding-left: 1.5rem; margin-bottom: 1em; }
.tiptap-content ol li { list-style: decimal; margin-bottom: 0.5em; }
.tiptap-content blockquote { border-left: 4px solid #e5e7eb; padding-left: 1rem; color: #4b5563; font-style: italic; margin: 1em 0; }

/* Image Styles - common.css의 img { width: 100% } 오버라이드 */
.tiptap-content img {
    /* 에디터에서 설정한 인라인 style(width, height)이 작동하도록 auto 설정 */
    width: auto; 
    height: auto;
    max-width: 100%; /* 부모 영역을 넘지 않도록 제한 */
    display: inline-block;
    vertical-align: middle;
    margin: 10px 0;
}

/* Table Styles - 에디터에서 작성한 표가 정상적으로 보이도록 함 */
.tiptap-content table { border-collapse: collapse; table-layout: fixed; width: 100%; margin: 1.5em 0; overflow: hidden; }
.tiptap-content table td, .tiptap-content table th { min-width: 1em; border: 1px solid #ced4da; padding: 8px 12px; vertical-align: top; position: relative; }
.tiptap-content table th { background-color: #f8f9fa; font-weight: bold; text-align: left; }

/* Resizable Image Wrapper - 에디터의 리사이즈 기능을 사용하는 경우 */
.tiptap-content .resizable-image-wrapper { 
    position: relative; 
    display: inline-block; 
    max-width: 100%; 
    margin: 10px 0; 
}
.tiptap-content .resizable-image-wrapper img { 
    display: block; 
    width: 100%;
    height: auto;
    max-width: 100%; 
    border-radius: 4px; 
}

/* Footnote Styles (이미 post.css와 맞췄으나 보강) */
.tiptap-content .footnote-ref { vertical-align: super; font-size: 0.75em; margin: 0 2px; color: #2563eb; font-weight: bold; cursor: pointer; padding: 0 2px; background-color: #eff6ff; border-radius: 4px; text-decoration: none; }
.tiptap-content .footnote_wrap { border-top: 1px solid #e5e7eb; margin-top: 2rem; padding-top: 1rem; font-size: 0.875em; color: #4b5563; }
.tiptap-content .footnote_wrap li { margin-bottom: 0.5rem; list-style-type: decimal !important; }
.tiptap-content .footnote_wrap li::marker { font-weight: bold; color: #2563eb; }

/* Highlight effect for jump */
.highlight-flash { background-color: #fef08a !important; transition: background-color 0.5s; }
