/* Modern Upload Component Styles */
.modern-uploader {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 100%;
    margin: 0 auto;
}

.upload-section {
    margin-bottom: 30px;
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.upload-section:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.upload-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.upload-section h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.upload-zone {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    background: #fafafa;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-zone:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.upload-zone.drag-over {
    border-color: #667eea;
    background: #f0f4ff;
    transform: scale(1.02);
}

.upload-zone.uploading {
    border-color: #fbbf24;
    background: #fffbeb;
}

.upload-zone.success {
    border-color: #10b981;
    background: #ecfdf5;
}

.upload-zone.error {
    border-color: #ef4444;
    background: #fef2f2;
}

.upload-icon {
    font-size: 48px;
    color: #9ca3af;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.upload-zone:hover .upload-icon {
    color: #667eea;
    transform: scale(1.1);
}

.upload-zone.drag-over .upload-icon {
    color: #667eea;
    transform: scale(1.2);
}

.upload-text {
    color: #6b7280;
    font-size: 16px;
    margin-bottom: 10px;
}

.upload-zone:hover .upload-text {
    color: #374151;
}

.upload-hint {
    color: #9ca3af;
    font-size: 14px;
    margin-bottom: 20px;
}

.file-input {
    display: none;
}

.upload-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.upload-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.upload-button:active {
    transform: translateY(0);
}

.upload-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Progress Bar */
.progress-container {
    margin-top: 20px;
    display: none;
    box-sizing: border-box;
}

.progress-container.active {
    display: block;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        max-height: 0;
        overflow: hidden;
    }
    to {
        opacity: 1;
        max-height: 100px;
        overflow: visible;
    }
}

.progress-bar {
    width: 100%;
    height: 6px;
    min-height: 6px;
    max-height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
    box-sizing: border-box;
    position: relative;
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 6px;
    min-height: 6px;
    max-height: 6px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 3px;
    box-sizing: border-box;
}

.progress-text {
    font-size: 12px;
    color: #6b7280;
    text-align: center;
}

/* File Preview */
.file-preview {
    display: none;
    margin-top: 20px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.file-preview.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.file-preview.uploaded {
    background: #ecfdf5;
    border-color: #10b981;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
}

.file-preview img {
    max-width: 100px;
    max-height: 100px;
    border-radius: 6px;
    object-fit: cover;
    margin-right: 15px;
}

.upload-success-indicator {
    margin-top: 10px;
    padding: 8px 12px;
    background: #d1fae5;
    border: 1px solid #a7f3d0;
    border-radius: 6px;
    text-align: center;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
    color: #374151;
    margin-bottom: 5px;
}

.file-size {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 10px;
}

.file-actions {
    display: flex;
    gap: 10px;
}

.remove-file {
    background: #ef4444;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.remove-file:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* Status Messages */
.status-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 15px;
    font-size: 14px;
    font-weight: 500;
    display: none;
    animation: slideIn 0.3s ease;
}

.status-message.active {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.status-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.status-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.status-message.info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* Loading Spinner */
.loading-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.loading-spinner.active {
    display: block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Multiple File Upload */
.multiple-files {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.file-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.file-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.file-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 10px;
}

.file-item .file-name {
    font-size: 12px;
    color: #374151;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-item .remove-file {
    font-size: 11px;
    padding: 4px 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .upload-section {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .upload-zone {
        padding: 30px 15px;
    }
    
    .upload-icon {
        font-size: 36px;
    }
    
    .upload-text {
        font-size: 14px;
    }
    
    .multiple-files {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
}

/* Animations for state changes */
.upload-zone * {
    transition: all 0.3s ease;
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}