/**
 * 多文件上传组件样式 - 横向布局版本
 */

/* 组件容器 */
.multi-file-upload {
    width: 100%;
}

/* 主容器 - 横向排列 */
.mfu-main-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-start;
}

/* 上传按钮 - 小正方形 +号 */
.mfu-upload-btn {
    width: 100px;
    height: 100px;
    border: 2px dashed #d0d0d0;
    border-radius: 8px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    flex-shrink: 0;
}

.mfu-upload-btn:hover {
    border-color: #000000;
    background: #fafafa;
}

.mfu-upload-btn.dragover {
    border-color: #000000;
    background: #f0f0f0;
    border-style: solid;
}

/* + 号图标 */
.mfu-plus-icon {
    width: 32px;
    height: 32px;
    color: #666666;
    margin-bottom: 4px;
}

.mfu-plus-icon svg {
    width: 100%;
    height: 100%;
}

/* 上传提示文字 */
.mfu-upload-text-small {
    font-size: 11px;
    color: #666666;
}

/* 隐藏的文件输入框 */
.mfu-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

/* 文件列表容器 - 横向排列 */
.mfu-file-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    flex: 1;
}

/* 文件卡片 - 白色背景 */
.mfu-file-item {
    width: 100px;
    height: 100px;
    padding: 8px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.2s ease;
    animation: mfu-fadeIn 0.3s ease;
}

@keyframes mfu-fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.mfu-file-item:hover {
    border-color: #000000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 文件预览 */
.mfu-file-preview {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.mfu-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mfu-file-icon {
    width: 20px;
    height: 20px;
    color: #666666;
}

.mfu-file-icon svg {
    width: 100%;
    height: 100%;
}

/* 文件名 */
.mfu-file-name {
    font-size: 11px;
    color: #333333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
    text-align: center;
}

/* 文件大小 */
.mfu-file-size {
    font-size: 10px;
    color: #999999;
    margin-top: 2px;
}

/* 删除按钮 */
.mfu-remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    padding: 0;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666666;
    transition: all 0.2s;
    z-index: 5;
}

.mfu-remove-btn:hover {
    background: #000000;
    border-color: #000000;
    color: #ffffff;
}

.mfu-remove-btn svg {
    width: 10px;
    height: 10px;
}

/* 统计信息 */
.mfu-stats {
    display: flex;
    justify-content: space-between;
    padding: 10px 16px;
    margin-top: 12px;
    background: #f5f5f5;
    border-radius: 6px;
    font-size: 13px;
    color: #666666;
}

.mfu-stats strong {
    color: #000000;
    font-weight: 600;
}

/* 错误提示 */
.mfu-error {
    margin-top: 12px;
    padding: 10px 14px;
    background: #ffebe9;
    border: 1px solid #ff8182;
    border-radius: 6px;
    color: #cf222e;
    font-size: 12px;
    display: none;
}

.mfu-error.show {
    display: block;
}

/* 进度条 */
.mfu-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #e0e0e0;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

.mfu-progress-fill {
    height: 100%;
    width: 0;
    background: #000000;
    transition: width 0.3s;
}

/* 响应式 */
@media (max-width: 640px) {
    .mfu-upload-btn,
    .mfu-file-item {
        width: 80px;
        height: 80px;
    }
    
    .mfu-file-preview {
        width: 32px;
        height: 32px;
    }
    
    .mfu-file-name {
        max-width: 60px;
        font-size: 10px;
    }
}
