/**
 * Modern Upload Component for FileTransfer
 * Integrates seamlessly with Bootstrap 5 design
 */

.upload-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 3rem;
    margin: 2rem 0;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.upload-zone {
    background: rgba(255, 255, 255, 0.95);
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 4rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-zone::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s;
}

.upload-zone:hover::before {
    left: 100%;
}

.upload-zone:hover {
    border-color: #764ba2;
    background: rgba(255, 255, 255, 1);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.upload-zone.drag-over {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.05);
    transform: scale(1.02);
}

.upload-icon {
    font-size: 5rem;
    color: #667eea;
    margin-bottom: 1.5rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.upload-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.upload-subtext {
    font-size: 1rem;
    color: #718096;
}

.upload-restrictions {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.restriction-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #4a5568;
    font-size: 0.9rem;
}

.restriction-item i {
    color: #667eea;
}

/* File List */
.file-list {
    margin-top: 2rem;
}

.file-item {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.file-item:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.file-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.file-icon {
    font-size: 2.5rem;
    color: #667eea;
}

.file-details h6 {
    margin: 0;
    font-weight: 600;
    color: #2d3748;
    word-break: break-all;
}

.file-size {
    font-size: 0.85rem;
    color: #718096;
}

.file-actions {
    display: flex;
    gap: 0.5rem;
}

.file-progress {
    margin-bottom: 1rem;
}

.progress {
    height: 8px;
    border-radius: 10px;
    background: #e2e8f0;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    border-radius: 10px;
}

.progress-bar.bg-success {
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%) !important;
}

.progress-bar.bg-danger {
    background: linear-gradient(90deg, #dc3545 0%, #c82333 100%) !important;
}

.file-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #718096;
}

.file-url {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 8px;
}

.file-preview {
    text-align: center;
    margin-bottom: 10px;
}

.file-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.file-preview img:hover {
    transform: scale(1.02);
}

.file-url .input-group {
    width: 100%;
}

.file-url input {
    flex: 1;
    border: 1px solid #e2e8f0;
    background: white;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #2d3748;
    padding: 0.5rem;
    border-radius: 4px;
}

.file-url input:focus {
    outline: none;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-badge.uploading {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.status-badge.completed {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.status-badge.failed {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.status-badge.processing {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

/* Upload Stats */
.upload-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.stat-item {
    text-align: center;
    color: white;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    display: block;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Animations */
.pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Button Enhancements */
.btn-upload {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-upload:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    color: white;
}

.btn-upload:active {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .upload-container {
        padding: 1.5rem;
        border-radius: 15px;
    }
    
    .upload-zone {
        padding: 2rem 1rem;
    }
    
    .upload-icon {
        font-size: 3rem;
    }
    
    .upload-text {
        font-size: 1.2rem;
    }
    
    .upload-restrictions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .file-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .file-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .upload-stats {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: white;
}

.empty-state i {
    font-size: 4rem;
    opacity: 0.5;
    margin-bottom: 1rem;
}

.empty-state p {
    opacity: 0.8;
    font-size: 1.1rem;
}
