/**
 * EOND Board — Toast UI Editor 커스텀 스타일
 */

/* 에디터 컨테이너 */
#eond-toastui-editor {
    border: 1px solid var(--eb-border, #e2e8f0);
    border-radius: var(--eb-radius, 4px);
    overflow: hidden;
}

/* 에디터 내부 본문 */
#eond-toastui-editor .toastui-editor-contents {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: var(--eb-text, #333);
}

/* 포커스 상태 */
#eond-toastui-editor .toastui-editor-defaultUI {
    border: none;
}

#eond-toastui-editor:focus-within {
    border-color: var(--eb-focus-border, #3182ce);
    box-shadow: 0 0 0 3px var(--eb-focus-ring, rgba(49, 130, 206, 0.1));
}

/* 툴바 스타일 */
#eond-toastui-editor .toastui-editor-toolbar {
    background: var(--eb-bg-subtle, #f7fafc);
    border-bottom: 1px solid var(--eb-border, #e2e8f0);
}

/* 에디터 모드 탭 */
#eond-toastui-editor .toastui-editor-mode-switch {
    border-top: 1px solid var(--eb-border, #e2e8f0);
    background: var(--eb-bg-subtle, #f7fafc);
}

#eond-toastui-editor .tab-item {
    padding: 0;
}

/* 이미지 업로드 중 표시 */
#eond-toastui-editor.eond-toastui-uploading {
    position: relative;
}

#eond-toastui-editor.eond-toastui-uploading::after {
    content: '업로드 중...';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    color: var(--eb-text-muted, #718096);
    z-index: 10;
}

/* 에디터 내 이미지 */
#eond-toastui-editor .toastui-editor-contents img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* 에디터 내 리스트 */
#eond-toastui-editor .toastui-editor-contents ul {
    list-style: disc;
    padding-left: 24px;
    margin: 8px 0;
}

#eond-toastui-editor .toastui-editor-contents ol {
    list-style: decimal;
    padding-left: 24px;
    margin: 8px 0;
}

#eond-toastui-editor .toastui-editor-contents li {
    margin: 4px 0;
    display: list-item;
}

#eond-toastui-editor .toastui-editor-contents ul ul {
    list-style: circle;
}

#eond-toastui-editor .toastui-editor-contents ul ul ul {
    list-style: square;
}

/* 에디터 내 체크박스(task list) */
#eond-toastui-editor .toastui-editor-contents ul.task-list-item {
    list-style: none;
    padding-left: 0;
}

/* 마크다운 에디터 영역 리스트 */
#eond-toastui-editor .toastui-editor-md-preview ul {
    list-style: disc;
    padding-left: 24px;
}

#eond-toastui-editor .toastui-editor-md-preview ol {
    list-style: decimal;
    padding-left: 24px;
}

#eond-toastui-editor .toastui-editor-md-preview li {
    margin: 4px 0;
    display: list-item;
}

/* 에디터 내 코드블록 */
#eond-toastui-editor .toastui-editor-contents pre {
    background: var(--eb-bg-subtle, #f7fafc);
    border-radius: 4px;
    padding: 12px 16px;
}

/* 에디터 내 인용 */
#eond-toastui-editor .toastui-editor-contents blockquote {
    border-left: 4px solid var(--eb-accent, #1a1a1a);
    padding-left: 16px;
    color: var(--eb-text-muted, #718096);
}

/* 에디터 내 테이블 */
#eond-toastui-editor .toastui-editor-contents table {
    border-color: var(--eb-border, #e2e8f0);
}

/* WP Editor 스타일 조정 (.eond-board 내부) */
.eond-board .wp-editor-wrap {
    border: 1px solid var(--eb-border, #e2e8f0);
    border-radius: var(--eb-radius, 4px);
    overflow: hidden;
}

.eond-board .wp-editor-wrap .mce-toolbar-grp {
    background: var(--eb-bg-subtle, #f7fafc);
    border-bottom: 1px solid var(--eb-border, #e2e8f0);
}

/* 커스텀 툴바 아이템 wrapper — 드롭다운에서 표준 버튼과 동일하게 렌더링 */
.toastui-editor-dropdown-toolbar .toastui-editor-toolbar-item-wrapper {
    display: contents;
}

/* 회색 글씨 버튼 */
.eond-toolbar-gray-text {
    background-image: none !important;
    width: 32px;
    height: 32px;
    margin: 0;
    border: 1px solid transparent;
    border-radius: 3px;
    color: #9ca3af;
    font-weight: 700;
    font-size: 14px;
    font-family: 'Pretendard', -apple-system, sans-serif;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-sizing: border-box;
    transition: color 0.15s, background 0.15s;
}
.eond-toolbar-gray-text:hover {
    color: #6b7280;
    background: rgba(156, 163, 175, 0.15);
    border-color: #e2e8f0;
}

/* 반응형 */
@media (max-width: 768px) {
    #eond-toastui-editor {
        min-height: 300px;
    }
}
