/**
 * RA0 Editor Styles
 */

.ra0-editor-wrapper {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

/* 툴바 */
.ra0-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
}

.toolbar-group {
    display: flex;
    gap: 4px;
    align-items: center;
    padding-right: 6px;
    border-right: 1px solid #ddd;
}

.toolbar-group:last-child {
    border-right: none;
}

.toolbar-btn {
    min-width: 32px;
    height: 32px;
    padding: 4px 8px;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.toolbar-btn:hover {
    background: #e9ecef;
    border-color: #999;
}

.toolbar-btn:active {
    background: #dee2e6;
    transform: translateY(1px);
}

/* 폰트 선택 버튼 (넓게) */
.toolbar-btn-wide {
    min-width: 80px;
    padding: 4px 12px;
    gap: 6px;
}

.toolbar-btn-wide .btn-text {
    font-size: 13px;
    font-weight: 500;
}

.toolbar-btn-wide .fa-caret-down {
    font-size: 12px;
    margin-left: auto;
}

/* 색상 피커 */
.color-picker-wrapper {
    position: relative;
}

.color-palette {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    padding: 8px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 1000;
    grid-template-columns: repeat(4, 24px);
    gap: 4px;
}

.color-palette.show {
    display: grid;
}

.color-palette span {
    width: 24px;
    height: 24px;
    border-radius: 3px;
    cursor: pointer;
    transition: transform 0.2s;
}

.color-palette span:hover {
    transform: scale(1.2);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* 뷰어 영역 */
.ra0-editor-viewer {
    padding: 20px;
    min-height: 300px;
    max-height: 600px;
    overflow-y: auto;
    outline: none;
}

.ra0-editor-viewer:focus {
    background: #fafbfc;
}

.ra0-editor-viewer:empty:before {
    content: '여기에 내용을 입력하세요...';
    color: #999;
}

/* HTML 소스 */
.ra0-editor-source {
    width: 100%;
    padding: 20px;
    border: none;
    outline: none;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
}

/* 도움말 */
.ra0-editor-help {
    padding: 8px 12px;
    background: #f8f9fa;
    border-top: 1px solid #ddd;
    font-size: 12px;
    color: #666;
}

/* 드롭다운 메뉴 */
.dropdown-menu.show {
    display: flex;
    flex-direction: column;
}

.dropdown-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    text-align: center;
    padding: 10px 12px;
    background: #fff;
    border: none;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: #f0f0f0;
}

/* 폰트 메뉴 */
.font-menu {
    max-height: 300px;
    overflow-y: auto;
}

.font-preview {
    font-size: 14px;
    color: #333;
    padding: 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.font-item:hover .font-preview {
    font-weight: 600;
}

/* 인용 미리보기 */
.quote-preview {
    font-size: 32px;
    color: #333;
    padding: 8px 0;
    font-family: Georgia, Times, serif;
    line-height: 1;
}

.quote-type1-preview {
    font-size: 48px;
}

.quote-type2-preview {
    font-size: 28px;
}

.quote-type3-preview {
    font-size: 28px;
}

.quote-block-preview {
    font-size: 13px;
    color: #666;
    font-style: italic;
    font-family: inherit;
}

/* 구분선 미리보기 */
.hr-preview {
    height: 2px;
    width: 100%;
    flex-shrink: 0;
}

.hr-full-preview {
    background: #dee2e6;
}

.hr-short-preview {
    width: 40%;
    margin: 0 auto;
    background: #dee2e6;
}

.hr-dot-full-preview {
    border-top: 2px dotted #999;
    background: transparent;
}

.hr-dot-short-preview {
    width: 40%;
    margin: 0 auto;
    border-top: 2px dotted #999;
    background: transparent;
}

/* 이미지 태그 플레이스홀더 
.image-tag {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: color-mix(in srgb, var(--info-color) 10%, transparent);
    color: var(--info-color);
    border: 1px dashed var(--info-color);
    border-radius: 0.25rem;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.875rem;
    margin: 0.25rem;
} */

/* 리스트 스타일 (레벨별 다른 마커) */
#wr_content_viewer ul {
    list-style-type: disc;
    padding-left: 30px;
    margin: 3px 0;
}

#wr_content_viewer ol {
    list-style-type: decimal;
    padding-left: 30px;
    margin: 3px 0;
}

#wr_content_viewer li {
}

/* 중첩 리스트 마커 스타일 */
#wr_content_viewer ul ul {
    list-style-type: circle;
}

#wr_content_viewer ul ul ul {
    list-style-type: square;
}

#wr_content_viewer ul ul ul ul {
    list-style-type: disc;
}

/* 번호 매기기 중첩 스타일 */
#wr_content_viewer ol ol {
    list-style-type: lower-alpha;
}

#wr_content_viewer ol ol ol {
    list-style-type: lower-roman;
}

/* 반응형 */
@media (max-width: 768px) {
    .ra0-editor-toolbar {
        gap: 4px;
        padding: 8px;
    }

    .toolbar-group {
        gap: 2px;
        padding-right: 4px;
    }

    .toolbar-btn {
        min-width: 28px;
        height: 28px;
        padding: 2px 6px;
        font-size: 13px;
    }

    .ra0-editor-viewer {
        padding: 15px;
        font-size: 14px;
    }
}
