/* ==========================================
   CKEditor 이미지 스타일 확장 (색상 기능 제거됨)
   ========================================== */

/* 기본 텍스트 정렬을 가운데로 설정 */
.ck-content,
.ck-content p,
.ck-content h1,
.ck-content h2,
.ck-content h3,
.ck-content h4,
.ck-content h5,
.ck-content h6 {
    text-align: center;
}

/* 포스트 표시 영역도 가운데 정렬 */
.post-body,
.post-body p,
.post-body h1,
.post-body h2,
.post-body h3,
.post-body h4,
.post-body h5,
.post-body h6 {
    text-align: center;
}

/* 포스트 상세보기 내용도 가운데 정렬 */
.post-detail-content,
.post-detail-content p,
.post-detail-content h1,
.post-detail-content h2,
.post-detail-content h3,
.post-detail-content h4,
.post-detail-content h5,
.post-detail-content h6 {
    text-align: center;
}

/* 리스트는 중앙 정렬하되 텍스트는 왼쪽 정렬 */
.ck-content ul,
.ck-content ol,
.post-body ul,
.post-body ol,
.post-detail-content ul,
.post-detail-content ol {
    text-align: center;
    display: inline-block;
}

.ck-content li,
.post-body li,
.post-detail-content li {
    text-align: left;
}

/* 테이블은 가운데 정렬 */
.ck-content table,
.post-body table,
.post-detail-content table {
    margin: 0 auto;
    text-align: center;
}

/* 테이블 셀 내용도 가운데 정렬 */
.ck-content table td,
.ck-content table th,
.post-body table td,
.post-body table th,
.post-detail-content table td,
.post-detail-content table th {
    text-align: center;
    vertical-align: middle;
}

/* 이미지 업로드 프로그레스 */
.ck-progress-bar {
    height: 2px;
    width: 100%;
    background: var(--border-color);
    position: relative;
    overflow: hidden;
    border-radius: 1px;
}

.ck-progress-bar .ck-progress-bar__value {
    height: 100%;
    background: var(--primary-gold);
    transition: width 0.3s ease;
    border-radius: 1px;
}

/* 이미지 업로드 중 표시 */
.ck-content .image-uploading {
    opacity: 0.6;
    position: relative;
}

.ck-content .image-uploading::after {
    content: '이미지 업로드 중...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.9rem;
}

/* 에디터 내 이미지 스타일 개선 */
.ck-content .image {
    margin: 1rem 0;
}

.ck-content .image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ck-content .image.image-style-side {
    max-width: 50%;
    margin: 0.5rem;
}

/* 텍스트와 이미지 간격 조정 */
.ck-content p + .image,
.ck-content .image + p {
    margin-top: 1.5rem;
}

/* 업로드 드래그 앤 드롭 스타일 */
.ck-editor__editable.ck-editor__editable_focused.ck-dropzone {
    border: 2px dashed var(--primary-blue);
    background: rgba(44, 95, 138, 0.05);
}

.ck-editor__editable.ck-editor__editable_focused.ck-dropzone::before {
    content: '이미지를 여기에 드래그하세요';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--primary-blue);
    font-weight: 500;
    z-index: 1;
}