/* CKEditor Dark Mode Styles - Tailwind CSS 색상 체계 사용 */

/* 기본 컨테이너 */
.dark .cke_chrome {
    border-color: rgb(75 85 99) !important; /* gray-600 */
}

/* 툴바 영역 */
.dark .cke_top {
    background: linear-gradient(to bottom, rgb(31 41 55), rgb(17 24 39)) !important; /* gray-800 to gray-900 */
    border-bottom-color: rgb(55 65 81) !important; /* gray-700 */
}

/* 툴바 버튼 */
.dark .cke_toolbar .cke_button {
    color: rgb(209 213 219) !important; /* gray-300 */
}

/* 버튼 아이콘 및 라벨 텍스트 */
.dark .cke_button_icon,
.dark .cke_button_label {
    color: rgb(209 213 219) !important; /* gray-300 */
    filter: brightness(1.5) !important; /* 아이콘을 밝게 */
}

/* 아이콘 이미지를 밝게 (스프라이트 이미지) */
.dark .cke_button__bold_icon,
.dark .cke_button__italic_icon,
.dark .cke_button__underline_icon,
.dark .cke_button__strike_icon,
.dark .cke_button__subscript_icon,
.dark .cke_button__superscript_icon,
.dark .cke_button__removeformat_icon,
.dark .cke_button__emojipanel_icon,
.dark .cke_button__image_icon,
.dark .cke_button__table_icon,
.dark .cke_button__horizontalrule_icon,
.dark .cke_button__specialchar_icon,
.dark .cke_button__link_icon,
.dark .cke_button__unlink_icon,
.dark .cke_button__maximize_icon,
.dark .cke_button__source_icon,
.dark .cke_button__about_icon,
.dark .cke_button__bulletedlist_icon,
.dark .cke_button__numberedlist_icon,
.dark .cke_button__outdent_icon,
.dark .cke_button__indent_icon,
.dark .cke_button__blockquote_icon,
.dark .cke_button__justifyleft_icon,
.dark .cke_button__justifycenter_icon,
.dark .cke_button__justifyright_icon,
.dark .cke_button__justifyblock_icon,
.dark .cke_button__undo_icon,
.dark .cke_button__redo_icon,
.dark .cke_button__cut_icon,
.dark .cke_button__copy_icon,
.dark .cke_button__paste_icon,
.dark .cke_button__pastetext_icon,
.dark .cke_button__pastefromword_icon,
.dark .cke_button__find_icon,
.dark .cke_button__replace_icon,
.dark .cke_button__selectall_icon,
.dark .cke_button__preview_icon,
.dark .cke_button__print_icon,
.dark .cke_button_icon {
    filter: invert(1) brightness(1.2) !important; /* 아이콘 색상 반전 */
}

/* 버튼 텍스트 라벨 */
.dark .cke_button__bold_label,
.dark .cke_button__italic_label,
.dark .cke_button__underline_label,
.dark .cke_button__strike_label,
.dark .cke_button__subscript_label,
.dark .cke_button__superscript_label,
.dark .cke_button__removeformat_label,
.dark .cke_button__emojipanel_label,
.dark .cke_button__image_label,
.dark .cke_button__link_label,
.dark .cke_button__unlink_label,
.dark .cke_button__table_label,
.dark .cke_button__horizontalrule_label,
.dark .cke_button__specialchar_label,
.dark .cke_button__maximize_label,
.dark .cke_button__source_label,
.dark .cke_button__about_label,
.dark .cke_toolbar .cke_button_label {
    color: rgb(243 244 246) !important; /* gray-100 */
}

.dark .cke_toolbar .cke_button:hover {
    background-color: rgb(55 65 81) !important; /* gray-700 */
}

.dark .cke_toolbar .cke_button:hover .cke_button_icon,
.dark .cke_toolbar .cke_button:hover .cke_button_label {
    color: rgb(243 244 246) !important; /* gray-100 */
    filter: brightness(1.8) !important;
}

.dark .cke_toolbar .cke_button_on,
.dark .cke_toolbar .cke_button_on:hover {
    background-color: rgb(30 58 138) !important; /* blue-900 */
}

.dark .cke_toolbar .cke_button_on .cke_button_icon,
.dark .cke_toolbar .cke_button_on .cke_button_label {
    color: rgb(147 197 253) !important; /* blue-300 */
    filter: brightness(1.2) !important;
}

/* 비활성화된 버튼 */
.dark .cke_toolbar .cke_button_disabled .cke_button_icon,
.dark .cke_toolbar .cke_button_disabled .cke_button_label {
    opacity: 0.5 !important;
    filter: brightness(1) !important;
}

.dark .cke_toolbar_separator {
    background-color: rgb(75 85 99) !important; /* gray-600 */
}

/* 하단 영역 */
.dark .cke_bottom {
    background-color: rgb(31 41 55) !important; /* gray-800 */
    border-top-color: rgb(55 65 81) !important; /* gray-700 */
}

.dark .cke_resizer {
    border-color: rgb(75 85 99) !important; /* gray-600 */
}

/* 경로 표시 */
.dark .cke_path {
    color: rgb(156 163 175) !important; /* gray-400 */
}

.dark .cke_path_item {
    color: rgb(209 213 219) !important; /* gray-300 */
}

.dark .cke_path_item:hover {
    background-color: rgb(55 65 81) !important; /* gray-700 */
    color: rgb(243 244 246) !important; /* gray-100 */
}

/* 에디터 콘텐츠 영역 */
.dark .cke_contents {
    background-color: rgb(17 24 39) !important; /* gray-900 */
}

.dark .cke_wysiwyg_frame,
.dark .cke_wysiwyg_div {
    background-color: rgb(17 24 39) !important; /* gray-900 */
}

/* 패널과 드롭다운 */
.dark .cke_panel {
    background-color: rgb(31 41 55) !important; /* gray-800 */
    border-color: rgb(55 65 81) !important; /* gray-700 */
}

.dark .cke_panel_block {
    background-color: rgb(31 41 55) !important; /* gray-800 */
}

.dark .cke_panel_list a {
    color: rgb(209 213 219) !important; /* gray-300 */
}

.dark .cke_panel_list a:hover,
.dark .cke_menu_item a:hover {
    background-color: rgb(30 58 138) !important; /* blue-900 */
    color: rgb(147 197 253) !important; /* blue-300 */
}

/* 다이얼로그 */
.dark .cke_dialog {
    background-color: rgb(31 41 55) !important; /* gray-800 */
}

.dark .cke_dialog_title {
    background-color: rgb(17 24 39) !important; /* gray-900 */
    color: rgb(243 244 246) !important; /* gray-100 */
}

.dark .cke_dialog_contents {
    background-color: rgb(31 41 55) !important; /* gray-800 */
}

.dark .cke_dialog_contents_body {
    color: rgb(209 213 219) !important; /* gray-300 */
}

.dark .cke_dialog_footer {
    background-color: rgb(17 24 39) !important; /* gray-900 */
    border-top-color: rgb(55 65 81) !important; /* gray-700 */
}

.dark .cke_dialog_footer_buttons button {
    background-color: rgb(55 65 81) !important; /* gray-700 */
    color: rgb(243 244 246) !important; /* gray-100 */
    border-color: rgb(75 85 99) !important; /* gray-600 */
}

.dark .cke_dialog_footer_buttons button:hover {
    background-color: rgb(75 85 99) !important; /* gray-600 */
}

/* 입력 필드 */
.dark .cke_dialog_ui_input_text,
.dark .cke_dialog_ui_input_textarea,
.dark .cke_dialog_ui_input_select {
    background-color: rgb(17 24 39) !important; /* gray-900 */
    border-color: rgb(75 85 99) !important; /* gray-600 */
    color: rgb(243 244 246) !important; /* gray-100 */
}

/* 콤보박스 */
.dark .cke_combo_text {
    color: rgb(243 244 246) !important; /* gray-100 */
}

.dark .cke_combo_label {
    color: rgb(209 213 219) !important; /* gray-300 */
}

.dark .cke_combo_button {
    background-color: rgb(55 65 81) !important; /* gray-700 */
    border-color: rgb(75 85 99) !important; /* gray-600 */
}

.dark .cke_combo_button:hover {
    background-color: rgb(75 85 99) !important; /* gray-600 */
}

.dark .cke_combo_open {
    background-color: rgb(30 58 138) !important; /* blue-900 */
}

.dark .cke_combo_arrow {
    border-top-color: rgb(209 213 219) !important; /* gray-300 */
}

/* 이모지 패널 특별 스타일 */
.dark .cke_emoji-panel {
    background-color: rgb(31 41 55) !important; /* gray-800 */
}

.dark .cke_emoji-inner_panel {
    background-color: rgb(31 41 55) !important; /* gray-800 */
}

.dark .cke_emoji-navigation_item a {
    color: rgb(156 163 175) !important; /* gray-400 */
}

.dark .cke_emoji-navigation_item a:hover {
    background-color: rgb(55 65 81) !important; /* gray-700 */
}

.dark .cke_emoji-navigation_item.active {
    background-color: rgb(30 58 138) !important; /* blue-900 */
}

.dark .cke_emoji-search input {
    background-color: rgb(17 24 39) !important; /* gray-900 */
    border-color: rgb(75 85 99) !important; /* gray-600 */
    color: rgb(243 244 246) !important; /* gray-100 */
}

.dark .cke_emoji-search input::placeholder {
    color: rgb(107 114 128) !important; /* gray-500 */
}

.dark .cke_emoji-outer_emoji_block {
    background-color: rgb(31 41 55) !important; /* gray-800 */
}

.dark .cke_emoji-outer_emoji_block h2 {
    color: rgb(209 213 219) !important; /* gray-300 */
}

.dark .cke_emoji-item a:hover {
    background-color: rgb(55 65 81) !important; /* gray-700 */
}

.dark .cke_emoji-status_bar {
    background-color: rgb(17 24 39) !important; /* gray-900 */
    border-top-color: rgb(55 65 81) !important; /* gray-700 */
    color: rgb(209 213 219) !important; /* gray-300 */
}

/* 컨텍스트 메뉴 */
.dark .cke_contextmenu {
    background-color: rgb(31 41 55) !important; /* gray-800 */
    border-color: rgb(55 65 81) !important; /* gray-700 */
}

.dark .cke_contextmenu a {
    color: rgb(209 213 219) !important; /* gray-300 */
}

.dark .cke_contextmenu a:hover {
    background-color: rgb(55 65 81) !important; /* gray-700 */
    color: rgb(243 244 246) !important; /* gray-100 */
}

/* 툴팁 */
.dark .cke_tooltip {
    background-color: rgb(17 24 39) !important; /* gray-900 */
    color: rgb(243 244 246) !important; /* gray-100 */
    border-color: rgb(55 65 81) !important; /* gray-700 */
}

/* 알림 */
.dark .cke_notification {
    background-color: rgb(31 41 55) !important; /* gray-800 */
    color: rgb(243 244 246) !important; /* gray-100 */
    border-color: rgb(55 65 81) !important; /* gray-700 */
}

.dark .cke_notification_warning {
    background-color: rgb(146 64 14) !important; /* yellow-800 */
    border-color: rgb(202 138 4) !important; /* yellow-600 */
}

.dark .cke_notification_info {
    background-color: rgb(30 58 138) !important; /* blue-900 */
    border-color: rgb(37 99 235) !important; /* blue-600 */
}

.dark .cke_notification_error {
    background-color: rgb(127 29 29) !important; /* red-900 */
    border-color: rgb(220 38 38) !important; /* red-600 */
}