/**
 * Word 文档编辑器 - 附加样式
 * 与 Tailwind CSS 配合使用
 */

/* ===== 编辑器光标颜色 ===== */
#editor {
    caret-color: #4472C4;
}

/* ===== 代码块样式 ===== */
#editor pre {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 4px;
    font-family: 'Consolas', monospace;
    overflow-x: auto;
}

#editor hr {
    border: none;
    border-top: 1px solid #ccc;
    margin: 20px 0;
}

/* ===== 链接样式增强 ===== */
#editor a:hover {
    color: #2b5797;
}

/* ===== 列表样式增强 ===== */
#editor ul ul {
    list-style-type: circle;
}

#editor ul ul ul {
    list-style-type: square;
}

#editor ol ol {
    list-style-type: lower-alpha;
}

#editor ol ol ol {
    list-style-type: lower-roman;
}

/* ===== 表格样式增强 ===== */
#editor table.bordered td,
#editor table.bordered th {
    border: 1px solid #000;
}

#editor table.striped tr:nth-child(even) {
    background: #f9f9f9;
}

#editor table.minimal td,
#editor table.minimal th {
    border: none;
    border-bottom: 1px solid #eee;
}

/* ===== 图片样式增强 ===== */
#editor img.float-left {
    float: left;
    margin-right: 15px;
}

#editor img.float-right {
    float: right;
    margin-left: 15px;
}

#editor img.centered {
    margin-left: auto;
    margin-right: auto;
}

/* ===== 页眉页脚 ===== */
#editor .editor-header,
#editor .editor-footer {
    position: relative;
    z-index: 10;
}

#editor .editor-header {
    margin-bottom: 20px;
}

#editor .editor-footer {
    margin-top: 20px;
}

/* ===== 搜索高亮 ===== */
.search-highlight {
    background: #ffff00;
    padding: 1px 2px;
    border-radius: 2px;
}

/* ===== 响应式调整 ===== */
@media (max-width: 768px) {
    #editor h1 {
        font-size: 1.5em;
    }
    
    #editor h2 {
        font-size: 1.3em;
    }
    
    #editor h3 {
        font-size: 1.1em;
    }
}

/* ===== 打印优化 ===== */
@media print {
    #editor .watermark {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}

/* ===== 暗色模式增强 ===== */
.dark-mode #editor a {
    color: #6ba3ff;
}

.dark-mode #editor blockquote {
    border-left-color: #555;
    color: #aaa;
}

.dark-mode #editor table th {
    background: #3d3d3d;
}

.dark-mode #editor table.striped tr:nth-child(even) {
    background: #383838;
}

/* ===== 加载动画 ===== */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(68, 114, 196, 0.3);
    border-radius: 50%;
    border-top-color: #4472C4;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}