/* 诊断书编辑器弹窗样式 - wordbianjiqi_tanchuang.css */

/* 编辑器弹窗容器 */
.word-editor-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.word-editor-container {
    width: 95%;
    max-width: 1400px;
    height: 90vh;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
}

/* 编辑器头部 */
.word-editor-header {
    padding: 15px 20px;
    background-color: #2c3e50;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #34495e;
}

.word-editor-title {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
}

.word-editor-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.word-editor-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 编辑器主内容区 */
.word-editor-main {
    flex: 1;
    display: flex;
    overflow: hidden;
    background-color: #f8f9fa;
}

/* 左侧设置面板 */
.word-editor-settings {
    width: 220px;
    background-color: white;
    border-right: 1px solid #e0e0e0;
    padding: 15px;
    overflow-y: auto;
}

.settings-title {
    font-size: 16px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #3498db;
}

.settings-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.section-title {
    font-size: 14px;
    font-weight: bold;
    color: #2980b9;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.section-title::before {
    content: "▸";
    margin-right: 5px;
    font-size: 12px;
}

.setting-group {
    margin-bottom: 10px;
}

.setting-label {
    font-size: 12px;
    color: #555;
    margin-bottom: 4px;
    display: block;
    font-weight: 500;
}

.setting-select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    background-color: white;
    color: #333;
}

.setting-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.setting-fixed {
    padding: 6px 8px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
    text-align: center;
    font-style: italic;
}

/* 中间A4纸区域 */
.word-editor-content {
    flex: 1;
    padding: 20px;
    overflow: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* A4纸张容器 */
.a4-container {
    background-color: white;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    position: relative;
}

.a4-paper {
    position: relative;
    background-color: white;
    overflow: hidden;
}

/* 编辑器内的A4纸 */
.a4-editor {
    padding: 40px;
    box-sizing: border-box;
}

/* 标题区域 */
.editor-title-section {
    margin-bottom: 25px;
    text-align: center;
}

.editor-title-input {
    width: 100%;
    border: none;
    border-bottom: 2px solid #3498db;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    padding: 8px 0;
    background: transparent;
    color: #2c3e50;
    outline: none;
}

.editor-title-input::placeholder {
    color: #aaa;
}

.title-divider {
    height: 2px;
    background-color: #ddd;
    margin-top: 10px;
}

/* 内容区域 */
.editor-content-section {
    margin: 20px 0;
    min-height: 400px;
}

.editor-content-area {
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 15px;
    background-color: #fafafa;
}

.editor-content-input {
    width: 100%;
    min-height: 350px;
    border: none;
    background: transparent;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    resize: none;
    outline: none;
    font-family: 'Microsoft YaHei', 'SimSun', sans-serif;
}

.editor-content-input::placeholder {
    color: #999;
}

.editor-content-hint {
    text-align: center;
    padding: 40px 20px;
    color: #777;
    font-style: italic;
    font-size: 15px;
}

/* 页脚区域 */
.content-footer-divider {
    height: 2px;
    background-color: #666;
    margin: 15px 0 20px 0;
}

.editor-footer-section {
    margin-top: 20px;
}

.editor-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.editor-footer-input {
    flex: 1;
    border: none;
    border-bottom: 1px solid #ccc;
    padding: 6px 0;
    font-size: 14px;
    background: transparent;
    outline: none;
    color: #333;
    margin-right: 20px;
}

.editor-footer-input::placeholder {
    color: #aaa;
}

.editor-time-text {
    font-size: 12px;
    color: #666;
    margin-right: 20px;
}

.editor-page-text {
    font-size: 12px;
    color: #666;
    font-weight: bold;
}

/* 预览模式下的A4纸 */
.a4-preview {
    transform-origin: top center;
    transition: transform 0.2s ease;
}

.preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

/* 预览模式的标题和内容 */
.preview-title {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    color: #2c3e50;
    margin-bottom: 25px;
}

.preview-content {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    white-space: pre-wrap;
}

.preview-footer {
    font-size: 14px;
    color: #333;
}

/* 右侧操作按钮栏 */
.word-editor-sidebar {
    width: 100px;
    background-color: white;
    border-left: 1px solid #e0e0e0;
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 缩放按钮组 */
.zoom-button-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.zoom-button-row {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 8px;
    width: 100%;
}

.zoom-text {
    font-size: 12px;
    font-weight: bold;
    color: #666;
    margin: 5px 0;
    text-align: center;
}

/* 操作按钮通用样式 */
.editor-action-btn {
    width: 80px;
    padding: 10px 0;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    margin-bottom: 10px;
    color: white;
}

.editor-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.editor-action-btn:active {
    transform: translateY(0);
}

/* 具体按钮样式 */
.zoom-in-btn {
    background-color: #6c757d;
}

.zoom-out-btn {
    background-color: #6c757d;
}

.zoom-reset-btn {
    background-color: #17a2b8;
}

.edit-mode-btn {
    background-color: #1976d2;
}

.edit-mode-btn.active {
    background-color: #1565c0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.preview-mode-btn {
    background-color: #6c757d;
}

.preview-mode-btn.active {
    background-color: #5a6268;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.print-btn {
    background-color: #ff6b35;
}

.print-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.save-btn {
    background-color: #28a745;
}

.close-btn {
    background-color: #dc3545;
}

/* 保存提示 */
.save-message {
    background-color: #28a745;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    margin-top: 10px;
    animation: fadeInOut 2s ease-in-out;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    10%, 90% { opacity: 1; }
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .word-editor-container {
        width: 98%;
        height: 95vh;
    }
    
    .word-editor-settings {
        width: 200px;
        padding: 10px;
    }
    
    .word-editor-sidebar {
        width: 80px;
        padding: 15px 5px;
    }
    
    .editor-action-btn {
        width: 70px;
        padding: 8px 0;
        font-size: 11px;
    }
}

@media (max-width: 768px) {
    .word-editor-main {
        flex-direction: column;
    }
    
    .word-editor-settings {
        width: 100%;
        height: 200px;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .settings-section {
        display: inline-block;
        width: 250px;
        margin-right: 20px;
        vertical-align: top;
    }
    
    .word-editor-sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        padding: 10px;
        border-left: none;
        border-top: 1px solid #e0e0e0;
    }
    
    .editor-action-btn {
        width: 70px;
        margin-bottom: 0;
    }
    
    .zoom-button-group {
        flex-direction: row;
        margin-bottom: 0;
        justify-content: center;
        gap: 10px;
    }
    
    .zoom-text {
        margin: 0 10px;
    }
}