/**
 * US-PWA-009: Resilient Media Upload UX Styles
 */

/* Upload progress container */
.upload-progress-container {
    background: var(--bs-light, #f8f9fa);
    border-radius: 8px;
    padding: 12px;
}

[data-bs-theme="dark"] .upload-progress-container {
    background: var(--bs-dark, #212529);
}

/* Individual upload progress item */
.upload-progress-item {
    background: var(--bs-white, #fff);
    transition: all 0.2s ease;
}

[data-bs-theme="dark"] .upload-progress-item {
    background: var(--bs-gray-800, #343a40);
    border-color: var(--bs-gray-700, #495057) !important;
}

.upload-progress-item:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* File name styling */
.upload-progress-item .file-name {
    font-size: 0.875rem;
    color: var(--bs-body-color);
}

.upload-progress-item .file-name i {
    color: var(--bs-primary);
}

/* Progress bar enhancements */
.upload-progress-item .progress {
    background-color: var(--bs-gray-200, #e9ecef);
    border-radius: 4px;
    overflow: hidden;
}

[data-bs-theme="dark"] .upload-progress-item .progress {
    background-color: var(--bs-gray-700, #495057);
}

.upload-progress-item .progress-bar {
    transition: width 0.3s ease;
}

/* Status badge animations */
.upload-progress-item .upload-status {
    font-size: 0.75rem;
    min-width: 60px;
    text-align: center;
}

/* Retry button styling */
.upload-progress-item .retry-btn {
    font-size: 0.75rem;
    padding: 2px 8px;
}

/* Error alert styling */
.upload-progress-container .alert-danger {
    font-size: 0.875rem;
}

.upload-progress-container .retry-all-btn {
    white-space: nowrap;
}

/* Draft restored notification */
.upload-progress-container + .alert-info,
form > .alert-info:first-child {
    font-size: 0.875rem;
}

.clear-draft-btn {
    font-size: 0.75rem;
}

/* Mobile optimizations */
@media (max-width: 576px) {
    .upload-progress-container {
        padding: 8px;
    }

    .upload-progress-item {
        padding: 8px !important;
    }

    .upload-progress-item .file-name {
        max-width: 150px !important;
        font-size: 0.8rem;
    }

    .upload-progress-item .upload-status {
        font-size: 0.7rem;
        min-width: 50px;
    }

    .upload-progress-container .alert-danger {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .upload-progress-container .retry-all-btn {
        width: 100%;
    }
}

/* Animation for uploading state */
@keyframes upload-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.upload-progress-item .progress-bar.bg-primary {
    animation: upload-pulse 1.5s ease-in-out infinite;
}

/* Success state */
.upload-progress-item .progress-bar.bg-success {
    animation: none;
}

/* Error state */
.upload-progress-item .progress-bar.bg-danger {
    animation: none;
}
