@charset "UTF-8";

/* Reset & Base - Scoped to editor only */
.editor-container,
.editor-container * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Editor uses Inter font - but exclude Font Awesome icons */
.editor-container,
.editor-container *:not(i):not(.fa):not(.fas):not(.far):not(.fab):not(.fal):not(.fad):not(.fa-*) {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Ensure Font Awesome icons use correct font */
.editor-container i,
.editor-container .fa,
.editor-container .fas,
.editor-container .far,
.editor-container .fab,
.editor-container .fal,
.editor-container .fad,
.editor-container [class*="fa-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "FontAwesome" !important;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
}


/* Editor Container */
.editor-container {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    overflow: visible;
    position: relative;
    border: 1px solid #a4a9af;
}

/* Header */
.editor-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.editor-title {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.editor-title i {
    color: #a78bfa;
}

.editor-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
}

.action-btn:hover {
    transform: scale(1.2);
}

.action-btn.close { background: #ff5f57; }
.action-btn.minimize { background: #febc2e; }
.action-btn.maximize { background: #28c840; }

/* Toolbar */
.toolbar {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0 8px;
    border-right: 1px solid #e2e8f0;
}

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

/* Mode Bar - Sticky within container */
.editor-mode-bar {
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    padding: 8px 16px;
    display: flex;
    gap: 4px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.mode-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #64748b;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mode-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.mode-btn.active {
    background: #A34148;
    color: #fff;
}

/* Sticky Toolbar - Sticky within container */
.sticky-toolbar {
    position: sticky;
    top: 40px; /* Height of mode-bar */
    z-index: 99;
    transition: all 0.3s ease;
}

.sticky-toolbar.is-sticky {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Style Selector Modals */
.style-selector-modal {
    position: absolute;
    z-index: 1000;
    background: #fff;
    border: 1px solid #dde1e7;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
    display: none;
    width: 260px;
    max-height: 360px;
    overflow-y: auto;
    padding: 10px;
}

.selector-content {
    background: transparent;
    border-radius: 0;
    padding: 0;
    max-width: 100%;
    width: 100%;
    box-shadow: none;
}

.selector-content h4 {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding-bottom: 6px;
    border-bottom: 1px solid #f0f2f5;
}

.selector-content h4 i {
    color: #A34148;
    font-size: 11px;
}

.style-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
    gap: 6px;
}

.style-option {
    border: 1.5px solid #e8eaed;
    border-radius: 7px;
    padding: 8px 6px 6px;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
    background: #fafbfc;
}

.style-option:hover {
    border-color: #A34148;
    background: #fff5f5;
    box-shadow: 0 0 0 2px rgba(163, 65, 72, 0.08);
    transform: translateY(-1px);
}

.style-preview {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
    padding: 4px 6px;
    background: #f4f6f8;
    border-radius: 5px;
}

/* HR Preview styles - force display */
.style-preview hr {
    width: 100%;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    margin: 0 !important;
}

.style-label {
    display: block;
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
    line-height: 1.3;
}


.toolbar-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 14px;
    transition: all 0.2s ease;
    position: relative;
}

.toolbar-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.toolbar-btn.active {
    background: #A34148;
    color: #fff;
}

.toolbar-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 100;
}

.toolbar-btn:hover::after {
    opacity: 1;
}

.toolbar-select {
    height: 36px;
    padding: 0 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #1e293b;
    font-size: 13px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
    min-width: 140px;
}

.toolbar-select:hover {
    border-color: #A34148;
}

.toolbar-select:focus {
    border-color: #A34148;
    box-shadow: 0 0 0 3px rgba(163, 65, 72, 0.1);
}

.color-picker {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    overflow: hidden;
}

.color-picker::-webkit-color-swatch-wrapper {
    padding: 4px;
}

.color-picker::-webkit-color-swatch {
    border-radius: 4px;
    border: none;
}


/* Color Group Enhancements */
.color-group {
    display: flex;
    align-items: center;
    gap: 4px !important;
}

.color-reset-btn {
    width: 24px !important;
    height: 24px !important;
    font-size: 10px;
    margin-left: -4px;
}

/* HTML Source View */
.html-highlight-wrapper {
    position: relative;
    width: 100%;
    background: #1e293b;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

.html-highlight-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 24px;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #e2e8f0;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-y: hidden; 
    overflow-x: hidden;
    pointer-events: none;
    z-index: 1;
}

.html-source {
    position: relative;
    z-index: 2;
    width: 100%;
    min-height: 400px;
    padding: 24px;
    border: none;
    outline: none;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: transparent !important;
    caret-color: #e2e8f0;
    background: transparent !important;
    resize: vertical;
}

.hl-bracket { color: #94a3b8; }
.hl-tag { color: #f87171; }
.hl-attr { color: #38bdf8; }
.hl-val { color: #fde047; }
.hl-comment { color: #64748b; font-style: italic; }

.html-source::-webkit-scrollbar {
    width: 10px;
}
.html-source::-webkit-scrollbar-track {
    background: #0f172a;
}
.html-source::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 5px;
}

/* Table Picker Dropdown */
.table-picker-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 12px;
    margin-top: 8px;
    display: none;
    width: 220px;
}

.table-picker-dropdown.show {
    display: block;
}

.table-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 2px;
    margin-bottom: 12px;
}

.table-cell {
    width: 18px;
    height: 18px;
    border: 1px solid #e2e8f0;
    background: #fff;
    cursor: pointer;
}

.table-cell.table-cell-selected {
    background: #ffe0e0;
    border-color: #A34148;
}

.table-status {
    text-align: center;
    font-size: 14px;
    color: #64748b;
    margin-bottom: 12px;
    font-weight: 500;
}

.table-options {
    border-top: 1px solid #e2e8f0;
    padding-top: 12px;
}

.table-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #334155;
    cursor: pointer;
}

.table-options input[type="checkbox"] {
    accent-color: #A34148;
}

/* Color Picker Dropdown */
.color-picker-dropdown {
    position: absolute;
    z-index: 1000;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 12px;
    width: 230px;
    display: none;
}

.color-picker-dropdown.show {
    display: block;
}

.color-tabs {
    display: flex;
    margin-bottom: 12px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 8px;
}

.color-tab {
    flex: 1;
    border: none;
    background: transparent;
    padding: 6px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 6px;
    color: #64748b;
    font-weight: 600;
    transition: all 0.2s;
}

.color-tab.active {
    background: #fff;
    color: #A34148;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.color-swatch {
    width: 95%;
    aspect-ratio: 1;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.1);
    transition: transform 0.1s;
}

.color-swatch:hover {
    transform: scale(1.1);
    z-index: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.custom-color-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #64748b;
}

.custom-color-row input[type="color"] {
    flex: 1;
    height: 36px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    padding: 2px;
    background: #fff;
}

.btn-reset-color {
    width: 100%;
    padding: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #64748b;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-reset-color:hover {
    background: #fff1f2;
    color: #e11d48;
    border-color: #fda4af;
}

/* Image Manager Modal */
.image-manager-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-manager-content {
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.image-manager-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.image-manager-header h3 {
    font-size: 18px;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.image-manager-header h3 i {
    color: #A34148;
}

.close-manager {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.2s;
}

.close-manager:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.image-manager-body {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
}

.upload-area {
    text-align: center;
    padding: 32px 40px;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    margin-bottom: 24px;
    background: #f8fafc;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    user-select: none;
}

.upload-area:hover {
    border-color: #A34148;
    background: #fff9f9;
}

.upload-area.upload-area-dragover {
    border-color: #A34148;
    background: linear-gradient(135deg, rgba(163,65,72,0.06) 0%, rgba(163,65,72,0.02) 100%);
    box-shadow: inset 0 0 0 3px rgba(163,65,72,0.12);
    transform: scale(1.005);
}

.upload-hint {
    margin-top: 10px;
    font-size: 12px;
    color: #94a3b8;
    pointer-events: none;
}

.upload-trigger {
    padding: 12px 24px;
    background: #A34148;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.upload-trigger:hover {
    background: #83140a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(163, 65, 72, 0.3);
}

.upload-hint {
    margin-top: 12px;
    font-size: 13px;
    color: #64748b;
}

.image-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.image-item {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    transition: all 0.2s;
    cursor: move;
    position: relative;
}

.image-item.selected {
    border-color: #A34148;
    box-shadow: 0 0 0 3px rgba(163, 65, 72, 0.1);
}

.image-item.dragging {
    opacity: 0.5;
}

.image-preview {
    width: 100%;
    height: 150px;
    overflow: hidden;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-info {
    padding: 12px;
}

.image-name {
    font-size: 13px;
    color: #334155;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 6px;
    padding: 0;
}

.btn-select-image,
.btn-delete-image {
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-select-image {
    background: #f1f5f9;
    color: #64748b;
}

.btn-select-image:hover {
    background: #A34148;
    color: #fff;
}

.image-item.selected .btn-select-image {
    background: #A34148;
    color: #fff;
}

.btn-delete-image {
    background: #fee2e2;
    color: #dc2626;
}

.btn-delete-image:hover {
    background: #dc2626;
    color: #fff;
}

.image-manager-footer {
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-insert-images,
.btn-close-manager {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-insert-images {
    background: #A34148;
    color: #fff;
}

.btn-insert-images:hover {
    background: #83140a;
}

.btn-close-manager {
    background: #f1f5f9;
    color: #64748b;
}

.btn-close-manager:hover {
    background: #e2e8f0;
    color: #1e293b;
}


/* Editor Area */
.editor-body {
    min-height: 400px;
    padding: 24px;
    outline: none;
    font-size: 16px;
    line-height: 1.8;
    color: #334155;
}

.editor-body:focus {
    background: #fafbfc;
}

.editor-body h1 {
    font-size: 2em;
    margin-bottom: 16px;
    color: #1e293b;
}

.editor-body h2 {
    font-size: 1.5em;
    margin-bottom: 12px;
    color: #334155;
}

.editor-body p {
    margin-bottom: 16px;
}

.editor-body blockquote {
    border-left: 4px solid #A34148;
    padding-left: 20px;
    margin: 20px 0;
    color: #64748b;
    font-style: italic;
    background: #f8fafc;
    padding: 16px 20px;
    border-radius: 0 8px 8px 0;
}

/* Force override for lists - counteract reset */
.editor-body ul, 
.editor-body ol {
    margin: 16px 0 !important;
    padding-left: 40px !important;
    display: block !important;
}

.editor-body ul {
    list-style-type: disc !important;
}

.editor-body ol {
    list-style-type: decimal !important;
}

.editor-body li {
    display: list-item !important;
    margin-bottom: 8px !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
    list-style-position: outside !important;
}

.editor-body ul > li {
    list-style-type: disc !important;
}

.editor-body ol > li {
    list-style-type: decimal !important;
}

/* Force override for HR - counteract reset */
.editor-body hr {
    display: block !important;
    margin: 24px 0 !important;
    border: none !important;
    height: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.editor-body a {
    color: #A34148;
    text-decoration: underline;
}

.editor-body img {
    max-width: 100%;
    border-radius: 8px;
    margin: 16px 0;
}

/* Image resize wrapper - editor context */
.editor-body .img-resize-wrapper {
    display: inline-block;
    position: relative;
    line-height: 0;
    max-width: 100%;
    vertical-align: bottom;
    margin: 8px 0;
    cursor: default;
    transition: none !important;
}
.editor-body .img-resize-wrapper img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 0;
    transition: none !important;
}
.editor-body .img-resize-wrapper.img-resize-active {
    outline: 1.5px dashed #A34148;
    outline-offset: 3px;
}
.img-resize-handle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #fff;
    border: 1.5px solid #A34148;
    border-radius: 2px;
    z-index: 10;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
    transition: none !important;
}

/* Drag-file-over state for editor body */
.editor-body.drag-file-over {
    background: linear-gradient(135deg, rgba(163,65,72,0.04) 0%, rgba(163,65,72,0.02) 100%);
    outline: 2px dashed #A34148;
    outline-offset: -4px;
    transition: background 0.2s, outline 0.2s;
}


.editor-body code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    color: #e11d48;
}

.editor-body pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 16px 0;
}

.editor-body pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* File attachment card */
.file-attachment {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin: 8px 4px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    color: #1e293b;
    transition: all 0.2s;
    cursor: pointer;
    max-width: 300px;
}

.file-attachment:hover {
    border-color: #A34148;
    box-shadow: 0 4px 12px rgba(163, 65, 72, 0.2);
    transform: translateY(-2px);
}

.file-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #A34148 0%, #8b5cf6 100%);
    border-radius: 8px;
    color: #fff;
    font-size: 18px;
    flex-shrink: 0;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.file-size {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.file-download-btn {
    padding: 6px 12px;
    background: #A34148;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.file-download-btn:hover {
    background: #83140a;
}


/* Footer / Status Bar */
.editor-footer {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #64748b;
}

.word-count {
    display: flex;
    gap: 16px;
}

.word-count span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.word-count i {
    color: #A34148;
}

.save-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #22c55e;
}

.save-status i {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Modern Scrollbars */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f8fafc;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
    border: 2px solid #f8fafc;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 20px 10px;
    }
    
    .toolbar {
        justify-content: center;
    }
    
    .toolbar-group {
        border-right: none;
        padding: 4px;
    }
    
    .editor-body {
        padding: 16px;
    }
    
    .editor-footer {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

/* Editor Body List Styles - Essential for visibility during editing */
.editor-body ul,
.editor-body ol {
    margin: 16px 0 !important;
    padding-left: 40px !important;
    display: block !important;
}

.editor-body ul {
    list-style-type: disc !important;
}

.editor-body ol {
    list-style-type: decimal !important;
}

.editor-body li {
    display: list-item !important;
    margin-bottom: 8px !important;
    list-style-position: outside !important;
}

/* Ensure nested lists look right */
.editor-body ul ul,
.editor-body ol ul,
.editor-body ul ol,
.editor-body ol ol {
    margin: 4px 0 !important;
}

/* HR Wrapper and Controls */
.hr-wrapper {
    position: relative;
    display: block !important;
    margin: 24px 0 !important;
    padding: 0;
    user-select: none;
    cursor: move;
    width: 100% !important;
    transition: all 0.2s;
    border: 1px solid transparent; /* Prevent layout jump */
}

/* Force HR display */
.hr-wrapper hr {
    display: block !important;
    width: 100% !important;
    height: auto;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Hover effect */
.hr-wrapper:hover {
    background: rgba(163, 65, 72, 0.05);
    border-radius: 8px;
    padding: 8px !important;
    margin: 16px 0 !important; /* Adjust margin to account for padding */
}

/* Controls */
.hr-controls {
    position: absolute;
    top: -30px; /* Move slightly higher */
    right: 0;
    display: none;
    gap: 4px;
    z-index: 100 !important;
    background: #fff;
    border-radius: 6px;
    padding: 4px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
}

.hr-wrapper:hover .hr-controls {
    display: flex !important;
}

.hr-control-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    padding: 0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.hr-control-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
    transform: translateY(-1px);
}

.hr-control-btn[title="삭제"]:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* Drag State */
.hr-wrapper[style*="opacity: 0.4"] {
    background: #f1f5f9;
    border: 2px dashed #cbd5e1;
}

/* When dragging over another HR */
.hr-wrapper.drag-over {
    border-top: 2px solid #a34148 !important;
}
