/* 小型化上传插件样式 */
.compact-file-upload {
    width: 300px;
    position: relative;
}

.upload-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.upload-btn {
    max-height: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    white-space: nowrap;
    min-width: 100px;
}

.upload-btn:hover {
    background-color: #2980b9;
}

.upload-btn i {
    margin-right: 5px;
}

.file-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.file-name {
    font-size: 0.85rem;
    color: #2c3e50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}

.file-size {
    font-size: 0.75rem;
    color: #7f8c8d;
}

.progress-container {
    display: none;
    margin-top: 10px;
}

.progress-bar {
    height: 6px;
    background-color: #ecf0f1;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #2ecc71;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.75rem;
    color: #7f8c8d;
    text-align: right;
    margin-top: 3px;
}

.upload-status {
    display: none;
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 10px;
    font-size: 0.85rem;
}

.status-success {
    background-color: #d5f4e6;
    color: #27ae60;
    border-left: 3px solid #2ecc71;
}

.status-error {
    background-color: #fadbd8;
    color: #c0392b;
    border-left: 3px solid #e74c3c;
}

.hidden-field {
    display: none;
}

.clear-btn {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0 5px;
    display: none;
}

@media (max-width: 768px) {
    .demo-section {
        flex-direction: column;
    }

    .compact-file-upload {
        width: 100%;
        max-width: 300px;
    }
}