/* DS随心转 AI聊天页面 - 编辑器面板样式 */

/* 右侧编辑器面板 */
.editor-panel {
    flex: 1.5;
    min-width: 400px;
    height: 100vh;
    background: #fff;
    border-left: 1px solid #e8e8e8;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: width 0.3s ease, min-width 0.3s ease, opacity 0.3s ease;
}

.editor-panel.collapsed {
    width: 0;
    min-width: 0;
    opacity: 0;
    overflow: hidden;
}

/* 右侧编辑器展开按钮 */
.editor-expand-btn {
    position: fixed;
    right: 0;
    top: 4%;
    transform: translateY(-50%);
    width: 30px;
    height: 40px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px 0 0 8px;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
}

.editor-expand-btn:hover {
    background: #f8f9fa;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.15);
    width: 35px;
}

.editor-expand-btn i {
    font-size: 14px;
    color: #666;
    transition: transform 0.3s ease;
}

/* 编辑器控制区域 */
.editor-controls {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px 0 30px;
    border-bottom: 1px solid #e8e8e8;
    background: #fafbfc;
}

.editor-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

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

.editor-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #e8e8e8;
    background: #fff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.editor-btn:hover {
    background: #f8f9fa;
    border-color: #d1d5db;
}

.editor-btn i {
    font-size: 14px;
    color: #666;
}

/* 编辑器收起按钮 */
#editorCollapseBtn {
    position: absolute;
    top: 15px;
    left: -18px;
    width: 30px;
    height: 35px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 50%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

#editorCollapseBtn:hover {
    background: #f8f9fa;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#editorCollapseBtn i {
    font-size: 14px;
    color: #666;
    transition: transform 0.3s ease;
}

/* 编辑器内容区域 */
.editor-content {
    flex: 1;
    padding: 4px 20px;
    overflow-y: auto;
}

#react-editor-root {
    height: 100%;
    min-height: 300px;
}

/* 编辑器全屏模态窗口 */
#editorFullscreenModal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99998 !important;
    background-color: rgba(0, 0, 0, 0.8) !important;
}

.editor-fullscreen-content {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 80vw !important;
    height: 95vh !important;
    background: white !important;
    border-radius: 8px;
    z-index: 99999 !important;
    margin: 2.5vh auto;
    display: flex;
    flex-direction: column;
}

.editor-fullscreen-header {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px solid #e8e8e8;
    background: #fafbfc;
    border-radius: 8px 8px 0 0;
}

.editor-fullscreen-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.editor-fullscreen-close {
    width: 36px;
    height: 36px;
    border: 1px solid #e8e8e8;
    background: #fff;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.editor-fullscreen-close:hover {
    background: #f8f9fa;
    border-color: #d1d5db;
}

.editor-fullscreen-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

#react-editor-root-fullscreen {
    height: 100%;
    width: 60%;
    margin-left: auto;
    margin-right: auto;
}

/* 编辑器内容恢复模态窗口样式 */
#restoreEditorModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.38);
    z-index: 100000;
    backdrop-filter: blur(6px);
}

#restoreEditorModal .restore-editor-modal-content {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 92%;
    max-width: 520px;
    background: linear-gradient(165deg, #FAF9F6 0%, #FFFFFF 50%, #F7F5F0 100%) !important;
    border: 1px solid #E5E7EB;
    border-radius: 18px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 100001 !important;
    overflow: hidden;
    animation: modalSlideIn 0.26s ease-out;
}

.restore-editor-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px 18px;
    border-bottom: 1px solid #E5E7EB;
}

.restore-editor-modal-title-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.restore-editor-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #2B2B2B;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.3;
    font-family: "Noto Serif SC", "Source Han Serif", serif;
}

.restore-editor-modal-title-icon {
    color: #2563EB;
    font-size: 22px;
}

.restore-editor-modal-close {
    width: 34px;
    height: 34px;
    background: #F7F5F0;
    border: 1px solid #E5E7EB;
    padding: 0;
    cursor: pointer;
    color: #666666;
    transition: all 0.2s ease;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.restore-editor-modal-close:hover {
    background-color: #EFF6FF;
    border-color: #BFDBFE;
    color: #2563EB;
}

.restore-editor-modal-close .layui-icon {
    font-size: 16px;
}

.restore-editor-modal-body {
    padding: 26px 24px 24px;
    text-align: center;
    background: transparent;
}

.restore-editor-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 74px;
    height: 74px;
    margin: 0 auto 18px;
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    border: 1px solid #BFDBFE;
    border-radius: 18px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.restore-editor-icon .layui-icon {
    font-size: 38px;
    color: #2563EB;
}

.restore-editor-message {
    font-size: 18px;
    color: #2B2B2B;
    margin: 0 0 8px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: 0.01em;
    font-family: "Noto Serif SC", "Source Han Serif", serif;
}

.restore-editor-submessage {
    margin: 0 0 22px;
    font-size: 14px;
    color: #666666;
    line-height: 1.6;
    font-family: "Inter", system-ui, -apple-system, "PingFang SC", sans-serif;
}

.restore-editor-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

.restore-editor-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #E5E7EB;
    min-width: 172px;
    gap: 8px;
    font-family: "Inter", system-ui, -apple-system, "PingFang SC", sans-serif;
}

.restore-editor-btn .layui-icon {
    font-size: 15px;
}

.restore-editor-btn-secondary {
    background: #F7F5F0;
    color: #2B2B2B;
}

.restore-editor-btn-secondary:hover {
    background: #FFFFFF;
    border-color: #D1D5DB;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.restore-editor-btn-primary {
    border-color: #1D4ED8;
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    color: #FFFFFF;
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.28);
}

.restore-editor-btn-primary:hover {
    background: linear-gradient(135deg, #1D4ED8 0%, #1E40AF 100%);
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(37, 99, 235, 0.33);
}

.restore-editor-btn:active {
    transform: translateY(0);
}

/* 修复 Layui 由于重置样式导致的编辑器列表符号丢失问题 */
.ProseMirror ul li {
    list-style: disc;
}

.ProseMirror ol li {
    list-style: decimal;
}

.ProseMirror ul,
.ProseMirror ol {
    padding-left: 24px;
}