/**
 * SpacesUploader - Estilos do componente de upload
 */

.spaces-uploader {
    width: 100%;
    max-width: 100%;
}

/* Área de Upload */
.upload-area {
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background: #f7fafc;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.upload-area:hover {
    border-color: #4299e1;
    background: #ebf8ff;
}

.upload-area.drag-over {
    border-color: #3182ce;
    background: #bee3f8;
    transform: scale(1.02);
}

.upload-icon {
    color: #4299e1;
    margin-bottom: 16px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.upload-text {
    color: #4a5568;
}

.upload-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #2d3748;
}

.upload-subtitle {
    font-size: 14px;
    margin: 0;
    color: #718096;
}

/* Lista de Arquivos */
.upload-files {
    margin-top: 20px;
}

.upload-file-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.upload-file-item:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.upload-file-item.status-success {
    border-color: #48bb78;
    background: #f0fff4;
}

.upload-file-item.status-error {
    border-color: #f56565;
    background: #fff5f5;
}

/* Informações do Arquivo */
.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.file-preview {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #edf2f7;
}

.file-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-icon {
    font-size: 24px;
}

.file-details {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    font-size: 13px;
    color: #718096;
}

/* Barra de Progresso */
.file-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 200px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4299e1, #3182ce);
    border-radius: 4px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.progress-text {
    font-size: 13px;
    font-weight: 600;
    color: #4299e1;
    min-width: 45px;
    text-align: right;
}

.status-success .progress-fill {
    background: linear-gradient(90deg, #48bb78, #38a169);
}

.status-success .progress-text {
    color: #48bb78;
}

.status-error .progress-fill {
    background: linear-gradient(90deg, #f56565, #e53e3e);
}

.status-error .progress-text {
    color: #f56565;
}

/* Ações */
.file-actions {
    display: flex;
    gap: 8px;
}

.btn-remove {
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remove:hover {
    color: #f56565;
    background: #fff5f5;
}

/* Responsivo */
@media (max-width: 768px) {
    .upload-area {
        padding: 30px 15px;
    }

    .upload-file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .file-info {
        width: 100%;
    }

    .file-progress {
        width: 100%;
        min-width: auto;
    }

    .file-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Estados de Loading */
.upload-area.uploading {
    pointer-events: none;
    opacity: 0.6;
}

.upload-area.uploading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #e2e8f0;
    border-top-color: #4299e1;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Mensagens de Feedback */
.upload-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 12px;
    font-size: 14px;
    animation: slideIn 0.3s ease;
}

.upload-message.success {
    background: #f0fff4;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.upload-message.error {
    background: #fff5f5;
    color: #742a2a;
    border: 1px solid #fc8181;
}

.upload-message.info {
    background: #ebf8ff;
    color: #2c5282;
    border: 1px solid #90cdf4;
}

