@import url('https://fonts.googleapis.com/css2?family=Oswald&family=PT+Serif:ital,wght@0,400;0,700;1,400&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,700;1,400;1,700&display=swap');

@media print {
    body {
        margin: 0 !important;
    }
}

.main-container {
    font-family: 'Lato';
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.ck-content {
    font-family: 'Lato';
    line-height: 1.6;
    word-break: break-word;
    min-height: auto !important;
}

.editor-container_classic-editor .editor-container__editor {
    min-width: 795px;
    max-width: 795px;
}

.ck-content h3.category {
    font-family: 'Oswald';
    font-size: 20px;
    font-weight: bold;
    color: #555;
    letter-spacing: 10px;
    margin: 0;
    padding: 0;
}

.ck-content h2.document-title {
    font-family: 'Oswald';
    font-size: 50px;
    font-weight: bold;
    margin: 0;
    padding: 0;
    border: 0;
}

.ck-content h3.document-subtitle {
    font-family: 'Oswald';
    font-size: 20px;
    color: #555;
    margin: 0 0 1em;
    font-weight: bold;
    padding: 0;
}

.ck-content p.info-box {
    --background-size: 30px;
    --background-color: #e91e63;
    padding: 1.2em 2em;
    border: 1px solid var(--background-color);
    background:
        linear-gradient(135deg, var(--background-color) 0%, var(--background-color) var(--background-size), transparent var(--background-size)),
        linear-gradient(135deg,
            transparent calc(100% - var(--background-size)),
            var(--background-color) calc(100% - var(--background-size)),
            var(--background-color));
    border-radius: 10px;
    margin: 1.5em 2em;
    box-shadow: 5px 5px 0 #ffe6ef;
}

.ck-content span.marker {
    background: yellow;
}

.ck-content span.spoiler {
    background: #000;
    color: #000;
}

.ck-content span.spoiler:hover {
    background: #000;
    color: #fff;
}

.ck-content .button {
    display: inline-block;
    width: 260px;
    border-radius: 8px;
    margin: 0 auto;
    padding: 12px;
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.ck-content .button--green {
    background-color: #406b1e;
}

.ck-content .button--black {
    background-color: #141517;
}

.main-container {
    font-family: 'Lato', sans-serif;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 15px;
    box-sizing: border-box;
}

.editor-container_classic-editor .editor-container__editor {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.editor-container_include-word-count.editor-container_classic-editor .editor-container__editor .ck-editor .ck-editor__editable {
    border-radius: 0;

    /* position: relative;
    z-index: 0; */
    isolation: isolate;
}

.ck.ck-toolbar {
    flex-wrap: wrap;
    padding: 5px;
}

@media screen and (max-width: 768px) {
    .main-container {
        padding: 0 10px;
    }

    .editor-container_classic-editor .editor-container__editor {
        min-height: 150px;
    }

    .ck.ck-toolbar {
        font-size: 14px;
    }

    .ck.ck-toolbar .ck.ck-toolbar__items {
        gap: 5px;
    }

    .ck-editor__editable {
        font-size: 14px;
    }
}

@media screen and (max-width: 480px) {
    .main-container {
        padding: 0 5px;
    }

    .ck.ck-toolbar {
        font-size: 12px;
    }

    .ck-editor__editable {
        font-size: 13px;
    }

    .editor-container_classic-editor .editor-container__editor {
        min-height: 120px;
    }
}

.ck.ck-powered-by {
    display: none;
}

.ck.ck-evaluation-badge {
    display: none;
}

.show-format-symbols::selection {
    background: rgba(200, 200, 255, 0.5);
}

.ck.ck-sticky-panel__content.ck-sticky-panel__content_sticky {
    top: 40px !important;
}

@media (max-width: 1199px) {
    .ck.ck-sticky-panel__content.ck-sticky-panel__content_sticky {
        top: 10px !important;
    }
}

/* show-format-symbols */
.editor-container p::after {
    content: " ¶";
    color: gray;
    font-size: 0.8em;
    pointer-events: none;
}

.show-format-symbols::selection {
    background: rgba(200, 200, 255, 0.5);
}

.ck-content.show-format-symbols span.whitespace::after {
    content: '⋅';
    margin-inline-start: -0.2em;
    color: #999;
}

.editor-container span.wrapped-br::before {
    content: '↵';
    color: #999;
}

/* Line-height */
.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw.ck-balloon-panel_visible.ck-balloon-panel_with-arrow {
    border-radius: 10px;
}

.ck-content h1,
.ck-content h2,
.ck-content h3,
.ck-content h4,
.ck-content h5,
.ck-content h6,
.ck-content .h1,
.ck-content .h2,
.ck-content .h3,
.ck-content .h4,
.ck-content .h5,
.ck-content .h6 {
    margin: 1em 0 1em 0;
    padding: 0;
    line-height: normal;
    font-weight: bold;
}

.ck-content code {
    margin: 0;
    padding: 0.15em 0.25em;
    background-color: #f7f8fa;
    border-radius: 2px;
    font-family: monospace;
    font-size: 1em;
    color: #e83e8c;
    word-wrap: break-word;
}

.underline-menu {
    z-index: 1000;
}

.ck-balloon-panel .ck-balloon-rotator .ck-balloon-rotator__content .underline-menu {
    z-index: 9999 !important;
    max-height: calc(100vh - 60px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border: none;
    overflow-y: auto;
}

.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw.ck-balloon-panel_visible.ck-balloon-panel_with-arrow {
    border-radius: 10px;
}

.ck-underline-apply-btn:hover,
.ck-underline-clear-btn:hover {
    background: #0285ff !important;
}

.selected {
    background-color: #aec4ff !important;
}

.hr-style-wrapper:hover,
.hr-style-option:hover {
    background-color: #aec4ff !important;
}

.ck-hr-apply-btn:hover,
.ck-hr-clear-btn:hover {
    background: #0285ff !important;
}

.ck.ck-balloon-panel.ck-balloon-panel_visible.ck-balloon-panel_with-arrow {
    border-radius: 15px;
}

.ck-table-row-resizer {
    bottom: 0;
    cursor: col-resize;
    position: absolute;
    right: var(--ck-table-column-resizer-position-offset);
    top: 0;
    user-select: none;
    width: var(--ck-table-column-resizer-width);
    z-index: var(--ck-z-default);
}

.ck-table-row-resizer:hover {
    background: rgba(0, 0, 255, 0.6);
}

.wrap-text-right~* {
    clear: left !important;
}

.wrap-text-left~* {
    clear: right !important;
}

.ck-content .table .ck-table-resized {
    table-layout: auto !important;
}

/* Paste Form */
.ck.ck-balloon-panel.ck-balloon-panel_arrowless.ck-balloon-panel_visible.popup-before-paste {
    border-radius: 15px;
}

.ck-paste-options-form {
    display: flex;
    flex-direction: column;
    padding: 16px;
    width: 320px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    position: relative !important;
}

.ck-paste-options-form .ck-button {
    justify-content: center;
}

.ck-preview-box {
    border: 1px solid #ddd;
    padding: 10px;
    max-height: 200px;
    overflow-y: auto;
    background-color: #f9f9f9;
    font-family: monospace;
    font-size: 13px;
    white-space: pre-wrap;
}

.ck.ck-paste-overlay {
    max-height: calc(100vh - 200px) !important;
    max-width: 100% !important;
    overflow-y: auto;
    padding: 20px !important;
    border: 1px solid #ccc;
    margin-bottom: 1em;
}

.popup-before-paste {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 9999 !important;
    height: revert !important;
    width: 60% !important;
    max-height: calc(100vh - 60px);
    padding: 2rem;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border: none;
}

.popup-before-paste::-webkit-scrollbar {
    width: 12px;
}

.popup-before-paste::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.popup-before-paste::-webkit-scrollbar-track {
    background-color: transparent;
}

.ck.ck-button.ck-button-paste-styles,
.ck.ck-button.ck-button-paste-plain {
    left: 0;
    width: 100%;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    background: #fff;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    z-index: 10;
    display: inline;
}

.ck-button-paste-styles:hover,
.ck-button-paste-plain:hover {
    background-color: #0056b3;
}

.ck.ck-button.ck-button-paste-styles {
    border-radius: 0px 0px 0px 15px !important;
}

.ck.ck-button.ck-button-paste-plain {
    border-radius: 0px 0px 15px 0px !important;
}

.ck-button-container {
    display: flex;
    gap: 0px;
    height: 50px !important;
    z-index: 1;
}

.ck.ck-sticky-panel__content.ck-sticky-panel__content_sticky {
    top: 80px !important;
}

.ck.ck-button.ck-button-close.ck-off {
    float: right;
    margin: 20px 20px 10px 10px;
    background: #cccccc;
    border-radius: 50px;
    cursor: pointer;
    position: relative;
}

.ck-button-close .ck-off:hover {
    background: #ededed;
}

#paste-buttons-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    background: #fff;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    border-top: 1px solid #ddd;
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.ck.ck-powered-by,
.ck.ck-evaluation-badge {
    display: none;
}

.ck-off.ck-button_with-text {
    position: absolute;
    top: 2%;
}

.ck-paste-title {
    padding: 10px 10px 10px 20px !important;
    position: absolute !important;
    font-size: x-large !important;
    font-weight: bold !important;
}

.ck-paste-divider {
    border: none;
    height: 1px !important;
    background-color: #e0e0e0 !important;
    margin: 8px 0 !important;
    width: 97% !important;
    align-self: center !important;
}

#addTemplate:hover {
    background-color: #43ab43 !important;
    color: white !important;
}

#updateTemplate:hover {
    background-color: #f9b12d !important;
    color: white !important;
}

#deleteTemplate:hover {
    background-color: #f15252 !important;
    color: white !important;
}

#closeModal:hover {
    background-color: #f0f0f0 !important;
}

.ck-content ul.bullet-circle,
.ck-content ul.bullet-circle li {
    list-style-type: circle !important;
}

.ck-content ul.bullet-square,
.ck-content ul.bullet-square li {
    list-style-type: square !important;
}

.ck-content ul.bullet-arrow,
.ck-content ul.bullet-star,
.ck-content ul.bullet-diamond,
.ck-content ul.bullet-triangle,
.ck-content ul.custom-check,
.ck-content ul.custom-cross {
    list-style-type: none !important;
}

.ck-content ul.bullet-arrow li,
.ck-content ul.bullet-star li,
.ck-content ul.bullet-diamond li,
.ck-content ul.bullet-triangle li,
.ck-content ul.custom-check li,
.ck-content ul.custom-cross li {
    position: relative;
    list-style-type: none !important;
    padding-left: 1.5em;
    text-indent: 0;
}


.ck-content ul.bullet-arrow li::before,
.ck-content ul.bullet-star li::before,
.ck-content ul.bullet-diamond li::before,
.ck-content ul.bullet-triangle li::before,
.ck-content ul.custom-check li::before,
.ck-content ul.custom-cross li::before {
    position: absolute;
    left: 0;
    font-weight: bold;
}

.ck-content ul.bullet-arrow li p,
.ck-content ul.bullet-star li p,
.ck-content ul.bullet-diamond li p,
.ck-content ul.bullet-triangle li p,
.ck-content ul.custom-check li p,
.ck-content ul.custom-cross li p {
    margin: 0;
    padding: 0;
    display: inline;
}

.ck-content ul.bullet-arrow li::before {
    content: "➤";
    font-weight: bold;
    display: inline-block;
}

.ck-content ul.bullet-star li::before {
    content: "★";
    font-weight: bold;
    display: inline-block;
}

.ck-content ul.bullet-diamond li::before {
    content: "♦";
    font-weight: bold;
    display: inline-block;
}

.ck-content ul.bullet-triangle li::before {
    content: "►";
    font-weight: bold;
    display: inline-block;
}

.ck-content ul.custom-check li::before {
    content: "✓";
    font-weight: bold;
    display: inline-block;
}

.ck-content ul.custom-cross li::before {
    content: "✗";
    font-weight: bold;
    display: inline-block;
}

.ck-underline-apply-btn:hover {
    background-color: #0165cf !important;
}

.ck-underline-clear-btn:hover {
    background-color: #d63737 !important;
}

/* ============================================
   TABLE COLUMN/ROW HOVER STYLES - PRODUCTION
   For CKEditor 5 Table Styling Plugin
   ============================================ */

/* Base table container */
.ck-widget.table {
    position: relative;
}

.ck-widget.table table {
    position: relative;
    border-collapse: separate;
    border-spacing: 0;
}

/* ============================================
   COLUMN HOVER EFFECTS
   ============================================ */

/* Column hover highlighting */
.ck-widget.table table td:hover,
.ck-widget.table table th:hover {
    background-color: rgba(0, 102, 204, 0.15) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: inset 0 0 0 2px rgba(0, 102, 204, 0.4) !important;
    position: relative !important;
    z-index: 10 !important;
}

/* Visual column indicator on top border */
.ck-widget.table table td:hover::before,
.ck-widget.table table th:hover::before {
    content: "";
    position: absolute;
    top: -5px;
    /* left: -2px; */
    right: -2px;
    height: 5px;
    background: linear-gradient(90deg, #0066cc, #4da6ff);
    z-index: 15;
    border-radius: 3px 3px 0 0;
    pointer-events: none;
}

/* Column highlight classes */
.ck-widget.table table td.column-highlight,
.ck-widget.table table th.column-highlight {
    background-color: rgba(0, 102, 204, 0.08) !important;
    border-left: 2px solid rgba(0, 102, 204, 0.4) !important;
    border-right: 2px solid rgba(0, 102, 204, 0.4) !important;
}

.ck-widget.table table td.column-highlight:first-child,
.ck-widget.table table th.column-highlight:first-child {
    border-left: 3px solid #0066cc !important;
}

.ck-widget.table table td.column-highlight:last-child,
.ck-widget.table table th.column-highlight:last-child {
    border-right: 3px solid #0066cc !important;
}

/* Style indicators for styled columns */
.ck-widget.table table th[data-column-styled="true"]::after {
    content: "●";
    position: absolute;
    top: 2px;
    right: 2px;
    color: #0066cc;
    font-size: 10px;
    z-index: 10;
    background: white;
    border-radius: 50%;
    width: 12px;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ============================================
   ROW HOVER EFFECTS
   ============================================ */

/* Row hover highlighting */
.ck-widget.table table tr:hover {
    background-color: rgba(34, 197, 94, 0.12) !important;
    box-shadow: inset 0 0 0 2px rgba(34, 197, 94, 0.4) !important;
    position: relative !important;
    /* transform: translateX(2px); */
}

/* Row highlight classes */
.ck-widget.table table td.row-highlight,
.ck-widget.table table th.row-highlight {
    background-color: rgba(34, 197, 94, 0.1) !important;
    border-top: 1px solid rgba(34, 197, 94, 0.3) !important;
    border-bottom: 1px solid rgba(34, 197, 94, 0.3) !important;
}

/* Row styling area */
.ck-widget.table table tbody tr {
    border-left: 3px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.ck-widget.table table tbody tr:hover {
    border-left: 3px solid #22c55e;
    box-shadow: -3px 0 10px rgba(34, 197, 94, 0.2);
}

/* Style indicators for styled rows */
.ck-widget.table table tr[data-row-styled="true"]::before {
    content: "●";
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    color: #22c55e;
    font-size: 12px;
    z-index: 10;
    background: white;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 1px solid #22c55e;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ============================================
   ENHANCED VISUAL FEEDBACK
   ============================================ */

.ck-widget.table table {
    border-collapse: separate !important;
}

/* Table cell base styling */
.ck-widget.table table tbody tr td,
.ck-widget.table table tbody tr th {
    transition: all 0.2s ease !important;
    /* border: 1px solid rgba(0, 0, 0, 0.1) !important; */
    border: 1px solid rgba(0, 0, 0, 0.1);
    position: relative !important;
    border-right: 1px solid rgba(0, 102, 204, 0.1);
}

.ck-widget.table table tr {
    transition: all 0.2s ease !important;
}

/* Special styling for first row */
.ck-widget.table table tr:first-child td:hover {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.2), rgba(0, 102, 204, 0.1)) !important;
    border-top: 3px solid #0066cc !important;
    transform: translateY(-1px);
    font-weight: 600 !important;
    color: #0066cc !important;
}

/* ============================================
   UNIFIED FORM MENU STYLING
   ============================================ */

/* Base menu styling - ĐỒNG BỘ CHO CẢ 2 MENUS */
.column-menu,
.row-menu,
.cell-menu {
    padding: 10px !important;
    font-size: 14px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 300px !important;
    background: white !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    max-height: 600px !important;
    overflow-y: auto !important;
}

/* Menu headers - ĐỒNG BỘ - GRAY BACKGROUND FOR BOTH */
.column-menu>label:first-child,
.row-menu>label:first-child,
.cell-menu>label:first-child,
.column-menu>div:first-child,
.row-menu>div:first-child,
.cell-menu>div:first-child {
    font-size: 20px !important;
    width: 100% !important;
    text-align: center !important;
    font-weight: 1000 !important;
    color: #1f2937 !important;
    margin-bottom: 5px !important;
    padding: 8px 0 !important;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%) !important;
    border-radius: 6px !important;
    border: 1px solid #d1d5db !important;
}

/* HR separators - ĐỒNG BỘ */
.column-menu hr,
.row-menu hr,
.cell-menu hr {
    height: 2px !important;
    border: none !important;
    background: #ccc !important;
    margin: 8px 0 !important;
}

/* Form rows - ĐỒNG BỘ */
.column-menu>div[style*="display: flex"],
.row-menu>div[style*="display: flex"],
.cell-menu>div[style*="display: flex"] {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 8px !important;
}

/* Labels - ĐỒNG BỘ */
.column-menu label,
.row-menu label,
.cell-menu label {
    font-size: 13px !important;
    text-align: center !important;
    color: #374151 !important;
    font-weight: 500 !important;
    min-width: 80px !important;
}

/* Input fields - ĐỒNG BỘ */
.column-menu input[type="text"],
.row-menu input[type="text"],
.cell-menu input[type="text"] {
    flex: 1 !important;
    padding: 4px !important;
    font-size: 13px !important;
    text-align: center !important;
    border: 1px solid #dedede !important;
    border-radius: 4px !important;
    background: white !important;
    transition: border-color 0.2s ease !important;
}

.column-menu input[type="text"]:focus,
.row-menu input[type="text"]:focus,
.cell-menu input[type="text"]:focus {
    border-color: #3b82f6 !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1) !important;
}

.column-menu input[type="text"]:hover,
.row-menu input[type="text"]:hover,
.cell-menu input[type="text"]:hover {
    border-color: #9ca3af !important;
}

/* Select dropdowns - ĐỒNG BỘ */
.column-menu select,
.row-menu select,
.cell-menu select {
    padding: 4px !important;
    font-size: 13px !important;
    border: 1px solid #dedede !important;
    border-radius: 4px !important;
    background: white !important;
    cursor: pointer !important;
    transition: border-color 0.2s ease !important;
    min-width: 60px !important;
}

.column-menu select:focus,
.row-menu select:focus,
.cell-menu select:focus {
    border-color: #3b82f6 !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1) !important;
}

.column-menu select:hover,
.row-menu select:hover,
.cell-menu select:hover {
    border-color: #9ca3af !important;
}

/* Buttons - ĐỒNG BỘ */
.ck-column-apply-btn,
.ck-column-clear-btn,
.ck-row-apply-btn,
.ck-row-clear-btn,
.ck-cell-apply-btn,
.ck-cell-clear-btn {
    flex: 1 !important;
    padding: 6px !important;
    cursor: pointer !important;
    text-align: center !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
    text-transform: capitalize !important;
}

/* Apply buttons - ĐỒNG BỘ */
.ck-column-apply-btn,
.ck-row-apply-btn,
.ck-cell-apply-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
    color: white !important;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3) !important;
}

.ck-column-apply-btn:hover,
.ck-row-apply-btn:hover,
.ck-cell-apply-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4) !important;
}

/* Clear buttons - ĐỒNG BỘ */
.ck-column-clear-btn,
.ck-row-clear-btn,
.ck-cell-clear-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: white !important;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3) !important;
}

.ck-column-clear-btn:hover,
.ck-row-clear-btn:hover,
.ck-cell-clear-btn:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.4) !important;
}

/* Button container - ĐỒNG BỘ */
.column-menu>div:last-child,
.row-menu>div:last-child,
.cell-menu>div:last-child {
    display: flex !important;
    gap: 10px !important;
    justify-content: space-between !important;
    margin-top: 8px !important;
    padding-top: 8px !important;
    border-top: 1px solid #e5e7eb !important;
}

/* Info boxes cho từng menu - KHÁC BIỆT MÀU SẮC */
.column-menu>div:nth-child(2) {
    font-size: 12px !important;
    color: #0066cc !important;
    text-align: center !important;
    padding: 8px !important;
    background: #e0f2fe !important;
    border: 1px solid #81d4fa !important;
    border-radius: 4px !important;
    margin-bottom: 10px !important;
}

.row-menu>div:nth-child(2) {
    font-size: 12px !important;
    color: #22c55e !important;
    text-align: center !important;
    padding: 8px !important;
    background: #f0fdf4 !important;
    border: 1px solid #86efac !important;
    border-radius: 4px !important;
    margin-bottom: 10px !important;
}

.cell-menu>div:nth-child(2) {
    font-size: 12px !important;
    color: #8b5cf6 !important;
    text-align: center !important;
    padding: 8px !important;
    background: #faf5ff !important;
    border: 1px solid #c084fc !important;
    border-radius: 4px !important;
    margin-bottom: 10px !important;
}

/* Enhanced placeholders - ĐỒNG BỘ */
.column-menu input::placeholder,
.row-menu input::placeholder,
.cell-menu input::placeholder {
    color: #9ca3af !important;
    font-style: italic !important;
    font-size: 12px !important;
}

/* Section dividers - special styling cho row menu có nhiều sections */
.row-menu>div:nth-child(even) {
    border-top: 1px solid #f3f4f6 !important;
    padding-top: 8px !important;
    margin-top: 8px !important;
}

/* ============================================
   ANIMATIONS - ĐỒNG BỘ
   ============================================ */

@keyframes slideInMenu {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }

    70% {
        transform: scale(0.9);
        opacity: 0.9;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Apply animations - ĐỒNG BỘ */
.column-menu,
.row-menu,
.cell-menu {
    animation: slideInMenu 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

.ck-widget.table table th[data-column-styled="true"]::after,
.ck-widget.table table tr[data-row-styled="true"]::before {
    animation: bounceIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards !important;
}

.ck-column-apply-btn:active,
.ck-column-clear-btn:active,
.ck-row-apply-btn:active,
.ck-row-clear-btn:active,
.ck-cell-apply-btn:active,
.ck-cell-clear-btn:active {
    transform: translateY(0) scale(0.98) !important;
    transition: all 0.1s ease !important;
}

/* ============================================
   RESPONSIVE DESIGN - ĐỒNG BỘ
   ============================================ */

@media (max-width: 768px) {

    .column-menu,
    .row-menu,
    .cell-menu {
        width: 280px !important;
        max-width: 90vw !important;
        margin: 10px !important;
        font-size: 13px !important;
    }

    .ck-widget.table table th,
    .ck-widget.table table td {
        min-width: 44px !important;
        min-height: 44px !important;
        padding: 8px !important;
    }

    .ck-widget.table table td:hover,
    .ck-widget.table table th:hover {
        background-color: rgba(0, 102, 204, 0.05) !important;
        box-shadow: inset 0 0 0 1px rgba(0, 102, 204, 0.2) !important;
    }

    .ck-widget.table table tr:hover {
        background-color: rgba(34, 197, 94, 0.05) !important;
        box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.2) !important;
    }

    .ck-column-apply-btn,
    .ck-column-clear-btn,
    .ck-row-apply-btn,
    .ck-row-clear-btn,
    .ck-cell-apply-btn,
    .ck-cell-clear-btn {
        padding: 8px 12px !important;
        font-size: 13px !important;
    }
}

@media (max-width: 480px) {

    .ck-widget.table table th[data-column-styled="true"]::after,
    .ck-widget.table table tr[data-row-styled="true"]::before {
        display: none !important;
    }

    .column-menu,
    .row-menu,
    .cell-menu {
        padding: 8px !important;
        width: 260px !important;
        gap: 8px !important;
    }
}

/* ============================================
   ACCESSIBILITY - ĐỒNG BỘ
   ============================================ */

@media (prefers-contrast: high) {

    .ck-widget.table table td:hover,
    .ck-widget.table table th:hover {
        background-color: rgba(0, 0, 0, 0.1) !important;
        border: 2px solid #000;
        box-shadow: none;
    }

    .ck-widget.table table tr:hover {
        background-color: rgba(0, 0, 0, 0.05) !important;
        border: 2px solid #000;
        box-shadow: none;
    }
}

@media (prefers-reduced-motion: reduce) {

    .ck-widget.table table td,
    .ck-widget.table table th,
    .ck-widget.table table tr {
        transition: none;
    }

    .column-menu,
    .row-menu,
    .cell-menu {
        animation: none !important;
    }
}

/* Focus states for keyboard navigation - ĐỒNG BỘ */
.ck-widget.table table td:focus,
.ck-widget.table table th:focus {
    outline: 2px solid #0066cc;
    outline-offset: -2px;
    background-color: rgba(0, 102, 204, 0.1) !important;
}

.ck-widget.table table tr:focus {
    outline: 2px solid #22c55e;
    outline-offset: -2px;
    background-color: rgba(34, 197, 94, 0.1) !important;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Disable hover effects when needed */
.table-styling-disabled .ck-widget.table table td:hover,
.table-styling-disabled .ck-widget.table table th:hover,
.table-styling-disabled .ck-widget.table table tr:hover {
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

/* Enhanced styling for tables with custom styles */
.ck-widget.table[data-has-column-styles] {
    border-top: 3px solid #0066cc;
}

.ck-widget.table[data-has-row-styles] {
    border-left: 3px solid #22c55e;
}

.ck-widget.table[data-has-both-styles] {
    border: 3px solid #8b5cf6;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {

    .ck-widget.table table th[data-column-styled="true"]::after,
    .ck-widget.table table tr[data-row-styled="true"]::before {
        display: none !important;
    }

    .ck-widget.table table td:hover,
    .ck-widget.table table th:hover,
    .ck-widget.table table tr:hover {
        background-color: transparent !important;
        box-shadow: none !important;
        border: none !important;
    }

    .column-menu,
    .row-menu,
    .cell-menu {
        display: none !important;
    }
}

/* ==========================================================================
   Table of Contents Plugin Styles
   ========================================================================== */

/* Modal Overlay */
.toc-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.toc-modal-overlay.toc-modal-show {
    opacity: 1;
}

/* Modal Content */
.toc-modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 1200px;
    height: 80%;
    max-height: 800px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease-in-out;
}

.toc-modal-show .toc-modal-content {
    transform: scale(1) translateY(0);
}

/* Modal Header */
.toc-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.toc-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.toc-close-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toc-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.toc-close-btn svg {
    fill: currentColor;
}

/* Modal Body */
.toc-modal-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.toc-left-panel,
.toc-right-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.toc-left-panel {
    width: 350px;
    background: #f8f9fa;
    border-right: 1px solid #e9ecef;
}

.toc-right-panel {
    flex: 1;
    background: white;
}

.toc-panel-section {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.toc-panel-section h3,
.toc-panel-section h4 {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.toc-panel-section h4 {
    font-size: 16px;
    margin-bottom: 12px;
}

/* Panel Actions */
.toc-panel-actions {
    padding: 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Style Grid */
.toc-style-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.toc-style-card {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.toc-style-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.toc-style-card.toc-selected {
    border-color: #667eea;
    background: #f0f4ff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.toc-style-preview {
    margin-bottom: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 12px;
}

.toc-style-info h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

.toc-style-info p {
    margin: 0;
    font-size: 12px;
    color: #6c757d;
    line-height: 1.4;
}

/* Style List */
.toc-styles-list {
    flex: 1;
    overflow-y: auto;
}

.toc-style-item {
    padding: 16px;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.toc-style-item:hover {
    background: #f0f4ff;
}

.toc-style-item.toc-selected {
    background: #e3f2fd;
    border-left: 4px solid #667eea;
}

.toc-style-item-content h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 500;
    color: #2c3e50;
}

.toc-style-item-content p {
    margin: 0;
    font-size: 14px;
    color: #6c757d;
    line-height: 1.4;
}

/* Headings Detection */
.toc-headings-detected {
    margin-bottom: 20px;
}

.toc-no-headings,
.toc-headings-found {
    text-align: center;
    padding: 24px;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
}

.toc-icon {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
}

.toc-no-headings p,
.toc-headings-found p {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #495057;
}

.toc-headings-found {
    text-align: left;
    background: #e8f5e8;
    border-color: #28a745;
}

.toc-headings-list {
    margin-top: 12px;
}

.toc-heading-item {
    padding: 4px 8px;
    font-family: monospace;
    font-size: 12px;
    color: #495057;
    border-left: 3px solid #28a745;
    margin-bottom: 2px;
    background: rgba(255, 255, 255, 0.7);
}

.toc-heading-item.toc-level-1 {
    border-left-color: #e74c3c;
}

.toc-heading-item.toc-level-2 {
    border-left-color: #3498db;
}

.toc-heading-item.toc-level-3 {
    border-left-color: #2ecc71;
}

.toc-heading-item.toc-level-4 {
    border-left-color: #f39c12;
}

.toc-heading-item.toc-level-5 {
    border-left-color: #9b59b6;
}

.toc-heading-item.toc-level-6 {
    border-left-color: #1abc9c;
}

/* Settings Section */
.toc-settings {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.toc-setting-group {
    margin-bottom: 12px;
}

.toc-setting-group:last-child {
    margin-bottom: 0;
}

.toc-setting-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    margin-bottom: 6px;
}

.toc-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
}

.toc-checkbox input[type="checkbox"] {
    margin: 0;
}

.toc-checkbox span {
    font-size: 14px;
    color: #495057;
}

.toc-number-input {
    width: 100px;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

/* Preview Section */
.toc-preview {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
}

.toc-preview-content {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 16px;
    min-height: 200px;
}

/* Forms */
.toc-search-group {
    margin-bottom: 16px;
}

.toc-search-input,
.toc-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.toc-search-input:focus,
.toc-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.toc-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.toc-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.toc-textarea.toc-code {
    font-family: 'Courier New', Monaco, monospace;
    font-size: 13px;
    line-height: 1.4;
}

.toc-form-group {
    margin-bottom: 20px;
}

.toc-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    margin-bottom: 6px;
}

.toc-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
}

/* Style Editor */
.toc-style-editor {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.toc-preview-section {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.toc-live-preview {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 16px;
    min-height: 150px;
}

/* Empty State */
.toc-empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #6c757d;
}

.toc-empty-state .toc-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.toc-empty-state h3 {
    margin: 0 0 8px 0;
    color: #495057;
    font-size: 20px;
}

.toc-empty-state p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

/* Buttons */
.toc-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    min-width: 120px;
}

.toc-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.toc-btn-primary {
    background: #667eea;
    color: white;
}

.toc-btn-primary:hover:not(:disabled) {
    background: #5a6fd8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.toc-btn-secondary {
    background: #6c757d;
    color: white;
}

.toc-btn-secondary:hover:not(:disabled) {
    background: #5a6268;
    transform: translateY(-1px);
}

.toc-btn-success {
    background: #28a745;
    color: white;
}

.toc-btn-success:hover:not(:disabled) {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.toc-btn-warning {
    background: #ffc107;
    color: #212529;
}

.toc-btn-warning:hover:not(:disabled) {
    background: #e0a800;
    transform: translateY(-1px);
}

.toc-btn-danger {
    background: #dc3545;
    color: white;
}

.toc-btn-danger:hover:not(:disabled) {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Modal Footer */
.toc-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.toc-modal-footer>div {
    display: flex;
    gap: 12px;
}

/* Notifications */
.toc-notification {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.toc-notification-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.toc-notification-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.toc-notification-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.toc-notification-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.toc-notification-content {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 12px;
}

.toc-notification-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.toc-notification-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

.toc-notification-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    color: currentColor;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.toc-notification-close:hover {
    opacity: 1;
}

/* ==========================================================================
   TOC Container Styles (for rendered TOCs)
   ========================================================================== */

.toc-container {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

.toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toc-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toc-title .toc-icon {
    font-size: 20px;
}

.toc-toggle {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 12px;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.toc-toggle:hover {
    background: #e9ecef;
    border-color: #ced4da;
}

.toc-toggle-icon {
    transition: transform 0.2s ease;
    fill: currentColor;
}

.toc-content {
    margin-top: 16px;
}

.toc-content.toc-collapsible.toc-collapsed {
    max-height: 100px;
    overflow: hidden;
    position: relative;
}

.toc-content.toc-collapsible.toc-collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(transparent, white);
}

.toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.toc-item {
    margin: 0;
}

.toc-link {
    display: block;
    padding: 6px 12px;
    text-decoration: none;
    color: #495057;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 14px;
}

.toc-link:hover {
    background: #f8f9fa;
    color: #2c3e50;
    text-decoration: none;
}

.toc-number {
    color: #6c757d;
    margin-right: 8px;
    font-weight: 500;
}

.toc-text {
    /* Text styles */
}

/* Level Indentation */
.toc-level-1 .toc-link {
    font-weight: 600;
    padding-left: 12px;
}

.toc-level-2 .toc-link {
    padding-left: 24px;
    font-size: 13px;
}

.toc-level-3 .toc-link {
    padding-left: 36px;
    font-size: 13px;
}

.toc-level-4 .toc-link {
    padding-left: 48px;
    font-size: 12px;
}

.toc-level-5 .toc-link {
    padding-left: 60px;
    font-size: 12px;
}

.toc-level-6 .toc-link {
    padding-left: 72px;
    font-size: 12px;
}

/* Empty TOC */
.toc-empty .toc-content {
    text-align: center;
    padding: 32px 16px;
    color: #6c757d;
}

.toc-empty-state .toc-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
}

/* Default TOC Style */
.toc-default {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toc-default .toc-header {
    background: #f8f9fa;
    padding: 16px 20px;
    border-bottom: 1px solid #dee2e6;
    border-radius: 8px 8px 0 0;
}

.toc-default .toc-content {
    padding: 16px 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .toc-modal-content {
        width: 95%;
        height: 90%;
        margin: 20px;
    }

    .toc-modal-body {
        flex-direction: column;
    }

    .toc-left-panel {
        width: 100%;
        max-height: 300px;
    }

    .toc-right-panel {
        flex: 1;
    }

    .toc-style-grid {
        grid-template-columns: 1fr;
    }

    .toc-modal-footer {
        flex-direction: column;
        gap: 12px;
    }

    .toc-modal-footer>div {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .toc-modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
        margin: 0;
    }

    .toc-modal-header {
        border-radius: 0;
    }

    .toc-btn {
        min-width: auto;
        flex: 1;
    }
}

/* Animation Classes */
.toc-fade-in {
    animation: tocFadeIn 0.3s ease-in-out;
}

.toc-slide-up {
    animation: tocSlideUp 0.3s ease-in-out;
}

@keyframes tocFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes tocSlideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Print Styles */
@media print {
    .toc-toggle {
        display: none;
    }

    .toc-content.toc-collapsible.toc-collapsed {
        max-height: none;
        overflow: visible;
    }

    .toc-content.toc-collapsible.toc-collapsed::after {
        display: none;
    }

    .toc-container {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

[class*="col-md-3"] {
    position: static !important;
}

/* FIX 021 */
.ck-content .image.align-left {
    float: left;
}

.ck-content .image.align-right {
    float: right;
}

.ck-content .image.no-wrap~* {
    clear: both;
}

/* FIX 009, FIX 010 */
.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks li:not(:has(> p)) {
    outline: 1px dashed var(--ck-show-blocks-border-color);
    position: relative;
    padding-top: 15px;
}

.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks li {
    margin-bottom: 4px;
}

.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks li:has(> p) {
    outline: none !important;
    position: relative;
}

.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks li>p {
    outline: 1px dashed var(--ck-show-blocks-border-color);
    padding-top: 15px !important;
    position: relative;
}

.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks li:not(:has(> p))::before,
.ck.ck-editor__editable.ck-editor__editable_inline.ck-show-blocks li>p::before {
    content: 'LI';
    background-color: #e5e5e5;
    position: absolute;
    top: 1px;
    left: 1px;
    font-size: 0.5rem;
    padding: 1px 6px 1px 1px;
    color: #000;
    letter-spacing: 1.5px;
    text-indent: 0 !important;
}

.ck.ck-content li>p {
    margin-bottom: 0;
}

/* Accordion */

.ck-content .is-accordion {
    position: relative;
    --btn-h: 32px;
    --btn-bottom: 0px;
    background-color: #FFF9FA !important;
    border-radius: 5px;
    padding: 20px;
    overflow: hidden;
    transition: all 0.2s ease;
    max-height: 120px;
    padding-bottom: 40px !important;
    box-sizing: content-box;
}

.ck-content .is-accordion > * {
    opacity: 0.8;
    transition: opacity 0.4s ease;
}

.ck-content .is-accordion.is-open > * {
    opacity: 1;
}

.ck-content .is-accordion * {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    line-height: 1.6 !important;
}

.ck-content .is-accordion:not(.is-open) {
    --btn-h: 70px;
    box-sizing: content-box;
    padding-bottom: 20px;
}

.ck-content .is-accordion.is-open {
    -webkit-mask-image: none;
    mask-image: none;
    padding-bottom: 45px !important;
}

.ck-content .is-accordion::after {
    content: "全部見る ▾";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: var(--btn-bottom);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 54px;
    font-size: 14px;
    cursor: pointer;
    color: rgba(0, 0, 0, .35);
    background: linear-gradient(to top,
            rgba(255, 249, 250, 1) 80%,
            rgba(255, 249, 250, 0.8) 80%,
            rgba(255, 249, 250, 0.7) 100%);
    z-index: 2;
    pointer-events: auto;
}

.ck-content .is-accordion.is-open::after {
    content: "閉じる ▴";
    background: none;
}


.ck-content a.ck-pagination {
    display: inline-block;
    padding: 4px 10px;
    margin: 8px 0;

    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;

    color: #eeb7c4;
    background-color: #f3e5e8;

    border: 1px dashed #eeb7c4;
    border-radius: 4px;

    cursor: default;
    text-decoration: none;

    user-select: none;
}

.ck-content a.ck-pagination:hover {
    background-color: #f0d2d9;
}

.ck-content a.ck-pagination::selection {
    background: transparent;
}

.ck-content .ck-nextpage {
    font-size: 1.2rem !important;
    color: #5a8ec9 !important;

    text-decoration: none !important;
    position: relative;
}

.ck-content .ck-nextpage::after {
    content: "≫";
    display: inline-block;
    width: 12px;
    font-size: 1.5rem;
    margin-left: 12px;
    vertical-align: middle;
}

.ck-content .ck-nextpage::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 1px;
    background-color: #5a8ec9;
    left: 0;
    bottom: 0;
}

.ck-content .block-left {
    margin-left: 0 !important;
}

.ck-content .block-center {
    margin-left: auto !important;
    margin-right: auto !important;
}

.ck-content .block-right {
    margin-left: auto !important;
    margin-right: 0 !important;
}
