/* 打印单据弹窗样式 - 所有类名使用 Print-Documents 前缀避免冲突 */

.Print-Documents-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.Print-Documents-overlay.Print-Documents-active {
    display: flex;
}

.Print-Documents-modal {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 1200px;
    height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* 头部 */
.Print-Documents-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.Print-Documents-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.Print-Documents-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.3s;
}

.Print-Documents-close-btn:hover {
    background-color: #f5f5f5;
    color: #333;
}

/* 主体内容 */
.Print-Documents-body {
    flex: 1;
    display: flex;
    overflow: hidden;
    padding: 20px 24px;
    gap: 24px;
}

/* 左侧预览区域 */
.Print-Documents-preview-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.Print-Documents-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.Print-Documents-preview-label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.Print-Documents-batch-indicator {
    margin-left: 8px;
    font-size: 12px;
    color: #666;
}

.Print-Documents-preview-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    padding: 4px 8px;
}

.Print-Documents-nav-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    color: #595959;
    font-size: 16px;
}

.Print-Documents-nav-btn:hover {
    background: #f5f5f5;
    color: #1890ff;
}

.Print-Documents-nav-btn:active {
    background: #e6e6e6;
}

.Print-Documents-nav-btn:disabled {
    cursor: not-allowed;
    opacity: 0.4;
    color: #bfbfbf;
}

.Print-Documents-nav-btn:disabled:hover {
    background: white;
    color: #bfbfbf;
}

.Print-Documents-divider {
    width: 1px;
    height: 16px;
    background-color: #d9d9d9;
    margin: 0 4px;
}

.Print-Documents-zoom-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    color: #595959;
    font-size: 16px;
}

.Print-Documents-zoom-btn:hover {
    background: #f5f5f5;
    color: #1890ff;
}

.Print-Documents-zoom-btn:active {
    background: #e6e6e6;
}

.Print-Documents-zoom-btn:disabled {
    cursor: not-allowed;
    opacity: 0.4;
    color: #bfbfbf;
}

.Print-Documents-zoom-btn:disabled:hover {
    background: white;
    color: #bfbfbf;
}

.Print-Documents-zoom-percentage {
    min-width: 50px;
    text-align: center;
    font-size: 13px;
    color: #595959;
    font-weight: 500;
    user-select: none;
}

.Print-Documents-preview-container {
    flex: 1;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    overflow: auto;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.Print-Documents-preview-content {
    background: white;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform-origin: center center;
    transition: transform 0.3s ease;
}

/* 右侧配置区域 */
.Print-Documents-config-section {
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.Print-Documents-form-group {
    display: flex;
    flex-direction: column;
}

.Print-Documents-form-label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.Print-Documents-form-label .Print-Documents-required {
    color: #ff4d4f;
    margin-right: 4px;
}

.Print-Documents-select,
.Print-Documents-input {
    height: 36px;
    padding: 0 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s;
    outline: none;
}

.Print-Documents-select:hover,
.Print-Documents-input:hover {
    border-color: #40a9ff;
}

.Print-Documents-select:focus,
.Print-Documents-input:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

.Print-Documents-select {
    cursor: pointer;
    background: white;
}

.Print-Documents-input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.Print-Documents-input[type="number"]::-webkit-outer-spin-button,
.Print-Documents-input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

/* 底部操作按钮 */
.Print-Documents-footer {
    padding: 16px 24px;
    border-top: 1px solid #e8e8e8;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.Print-Documents-btn {
    height: 36px;
    padding: 0 20px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid #d9d9d9;
    background: white;
    transition: all 0.3s;
    font-weight: 500;
}

.Print-Documents-btn:hover {
    border-color: #40a9ff;
    color: #40a9ff;
}

.Print-Documents-btn-cancel {
    color: #595959;
}

.Print-Documents-btn-cancel:hover {
    border-color: #595959;
    color: #595959;
}

.Print-Documents-btn-primary {
    background: #1890ff;
    border-color: #1890ff;
    color: white;
}

.Print-Documents-btn-primary:hover {
    background: #40a9ff;
    border-color: #40a9ff;
    color: white;
}

.Print-Documents-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .Print-Documents-modal {
        width: 95%;
        height: 90vh;
    }

    .Print-Documents-body {
        flex-direction: column;
    }

    .Print-Documents-preview-section {
        height: 300px;
    }

    .Print-Documents-config-section {
        width: 100%;
    }
}

/* 模板预览样式 */
.Print-Documents-template-content {
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

.Print-Documents-template-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #333;
    padding-bottom: 15px;
}

.Print-Documents-template-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.Print-Documents-template-subtitle {
    font-size: 14px;
    color: #666;
}

.Print-Documents-template-info {
    margin-bottom: 20px;
}

.Print-Documents-template-info-row {
    display: flex;
    margin-bottom: 8px;
    font-size: 14px;
}

.Print-Documents-template-info-label {
    font-weight: bold;
    width: 120px;
}

.Print-Documents-template-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.Print-Documents-template-table th,
.Print-Documents-template-table td {
    border: 1px solid #333;
    padding: 8px;
    font-size: 13px;
}

.Print-Documents-template-table th {
    background-color: #f0f0f0;
    font-weight: bold;
    text-align: center;
}

.Print-Documents-template-table td {
    text-align: center;
}

.Print-Documents-template-footer {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.Print-Documents-template-signature {
    width: 30%;
}

.Print-Documents-template-signature-label {
    font-weight: bold;
    margin-bottom: 30px;
}
