/* 文件上传和预览样式 */

.image-preview {
    margin-top: 15px;
    padding: 15px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    gap: 15px;
}

.preview-image img {
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 200px;
    max-height: 150px;
    object-fit: cover;
}

.preview-info {
    flex: 1;
}

.preview-info .file-name {
    font-weight: 500;
    color: #333;
    margin: 0 0 5px 0;
    font-size: 14px;
}

.preview-info .file-size {
    color: #666;
    margin: 0 0 5px 0;
    font-size: 12px;
}

.preview-info .client-side-tag {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    margin: 0;
    display: inline-block;
}

.preview-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.remove-btn {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
}

.remove-btn:hover {
    background: linear-gradient(135deg, #c82333, #bd2130);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.remove-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
}

/* 文件上传区域样式 */
.file-upload-area {
    position: relative;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    background: #fafafa;
}

.file-upload-area:hover {
    border-color: #007bff;
    background: #f8f9ff;
}

.file-upload-area.dragover {
    border-color: #007bff;
    background: #e3f2fd;
    transform: scale(1.02);
}

.file-upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

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

.upload-text {
    color: #6c757d;
    font-size: 14px;
    margin: 0;
}

.upload-hint {
    color: #adb5bd;
    font-size: 12px;
    margin: 5px 0 0 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .image-preview {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .preview-image img {
        max-width: 150px;
        max-height: 100px;
    }
    
    .preview-actions {
        flex-direction: row;
        justify-content: center;
    }
}

/* 上传进度指示器 */
.upload-progress {
    margin-top: 10px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    height: 4px;
}

.upload-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #0056b3);
    transition: width 0.3s ease;
    width: 0%;
}

/* 错误状态 */
.upload-error {
    border-color: #dc3545;
    background: #f8d7da;
}

.upload-error .upload-text {
    color: #721c24;
}

/* 成功状态 */
.upload-success {
    border-color: #28a745;
    background: #d4edda;
}

.upload-success .upload-text {
    color: #155724;
}
