/* PDF发票合并工具样式 */
.tool-content {
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    border: 1px solid #ddd;
    padding: 1.2em;
    border-radius: .6em;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.2em;
}

.tool-content .item-tool {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tool-content .operate-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.item-result {
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-result img {
    width: 100%;
    max-width: 800px;
    border: solid 1px #ddd;
}

/* 按钮样式 */
.btn {
    outline: none;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 12px;
    color: #333;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);
    font-family: inherit;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn svg {
    width: 0.92em;
    height: 0.92em;
    margin-right: 5px;
}

.btn-purple {
    color: #fff;
    background-color: rgb(93 79 248 / 95%);
    border-color: rgb(93 79 248 / 95%);
}

.btn-purple:hover {
    background-color: rgb(93 79 248 / 100%);
    border-color: rgb(93 79 248 / 100%);
}

.btn-green {
    color: #fff;
    background-color: rgba(34, 197, 94, 0.95);
    border-color: rgba(34, 197, 94, 0.95);
}

.btn-green:hover {
    background-color: rgba(34, 197, 94, 100%);
    border-color: rgba(34, 197, 94, 100%);
}

/* 文件上传区域 */
.file-upload {
    border: solid 2px #ced4da;
    background-color: #f8f9fa;
    min-width: 100%;
    max-width: 100%;
    width: 100%;
    min-height: 250px;
    line-height: 30px;
    padding: 20px;
    border-radius: 12px;
    font-family: inherit;
    outline: none;
    font-size: 15px;
    color: #495057;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 15px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.file-upload:hover {
    border-color: #17a2b8;
    background-color: #f0f8ff;
}

.file-upload.dragover {
    border-color: #5a4df8;
    background-color: #f0edff;
    color: #5a4df8;
}

.file-upload .upload-prompt {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 15px;
}

.file-upload .upload-icon {
    font-size: 48px;
    color: #6c757d;
}

.file-upload .upload-text {
    text-align: center;
    color: #495057;
}

.file-upload .upload-text p {
    margin: 5px 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .tool-content {
        padding: .8em !important;
        box-shadow: unset;
    }

    .operate-buttons .btn {
        line-height: 32px !important;
        height: 32px !important;
        padding: 0 8px !important;
    }

    .file-upload {
        min-height: 180px;
        padding: 10px;
    }

    .file-upload .upload-icon {
        font-size: 36px;
    }

    .file-upload .upload-text p {
        font-size: 14px;
    }
}

/* 文件列表样式 */
.file-list {
    margin-top: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 5px;
    font-size: 14px;
}

.file-item .file-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-item .file-name {
    color: #333;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-item .file-size {
    color: #6c757d;
    font-size: 12px;
}

.file-item .file-remove {
    color: #dc3545;
    cursor: pointer;
    font-size: 16px;
}

.file-item .file-remove:hover {
    color: #c82333;
}

/* 预览区域 */
.preview-container {
    margin-top: 15px;
    text-align: center;
}

.preview-container img {
    max-width: 100%;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 加载状态 */
.loading {
    display: none;
    text-align: center;
    padding: 20px;
    color: #6c757d;
}

.loading.active {
    display: block;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #17a2b8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 错误消息 */
.error-message {
    color: #dc3545;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 10px 15px;
    margin-top: 10px;
    display: none;
}

.error-message.active {
    display: block;
}