/* Sticky Upload Bar Styles */
.sticky-upload-bar {
    position: fixed;
    bottom: calc(var(--nav-height, 80px) + env(safe-area-inset-bottom, 0px) + 15px);
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    width: calc(100% - 20px);
    max-width: var(--app-shell-max-width);
    background: rgba(30, 30, 36, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    padding: 10px 15px;
    z-index: 2001;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
    opacity: 0;
    pointer-events: none;
    cursor: pointer;
}

.sticky-upload-bar.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.upload-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.upload-bar-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.upload-bar-icon {
    width: 32px;
    height: 32px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.upload-bar-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.upload-bar-title {
    font-size: var(--font-sm);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-bar-status {
    font-size: var(--font-xs);
    color: var(--text-sec);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-bar-count {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
}

.upload-progress-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.upload-progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 3px;
}

/* Error state */
.sticky-upload-bar.error {
    border-color: rgba(255, 23, 68, 0.3);
}
.sticky-upload-bar.error .upload-bar-icon {
    background: var(--error);
}
.sticky-upload-bar.error .upload-progress-fill {
    background: var(--error);
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.upload-bar-icon.processing {
    animation: pulse 1.5s infinite ease-in-out;
}

/* Desktop layout adjustment */
@media (min-width: 1100px) {
    .sticky-upload-bar {
        bottom: 20px;
        right: 20px;
        left: auto;
        transform: translateX(100px);
        width: 320px;
    }
    .sticky-upload-bar.visible {
        transform: translateX(0);
    }
}

/* Spinner Loader */
.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: manager-spin 1s linear infinite;
}

@keyframes manager-spin {
    to { transform: rotate(360deg); }
}
