/* Global Progress Indicator Styles */
.global-progress-indicator {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    padding: 6px 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    animation: fadeIn 0.3s ease-out;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-width: 300px;
    max-width: 500px;
    opacity: 0.95;
}

.progress-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 12px;
}

.progress-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 120px;
    flex: 1;
}

.operation-name {
    font-weight: 600;
    font-size: 12px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.operation-details {
    font-size: 10px;
    opacity: 0.85;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.progress-bar-container {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 100px;
}

.progress-bar {
    width: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: white;
    border-radius: 2px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        transparent 25%, 
        rgba(255, 255, 255, 0.2) 25%, 
        rgba(255, 255, 255, 0.2) 50%, 
        transparent 50%, 
        transparent 75%, 
        rgba(255, 255, 255, 0.2) 75%);
    background-size: 20px 20px;
    animation: progressStripes 1s linear infinite;
}

.progress-percentage {
    font-size: 10px;
    font-weight: 600;
    min-width: 25px;
    text-align: right;
}

.cancel-button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.cancel-button svg {
    width: 10px;
    height: 10px;
}

.cancel-button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.cancel-button:active {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0.95);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 0.95;
        transform: scale(1);
    }
}

@keyframes progressStripes {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 20px 0;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .global-progress-indicator {
        min-width: 0;
        max-width: 350px;
        padding: 4px 12px;
    }
    
    .progress-content {
        gap: 8px;
    }
    
    .progress-text {
        min-width: 100px;
    }
    
    .operation-name {
        font-size: 11px;
    }
    
    .operation-details {
        font-size: 9px;
    }
    
    .progress-bar {
        width: 60px;
    }
    
    .progress-percentage {
        font-size: 9px;
        min-width: 20px;
    }
    
    .cancel-button {
        width: 18px;
        height: 18px;
    }
    
    .cancel-button svg {
        width: 8px;
        height: 8px;
    }
}

@media (max-width: 480px) {
    .global-progress-indicator {
        min-width: 0;
        max-width: none;
        padding: 5px 14px;
    }

    .progress-text {
        min-width: 0;
    }

    .progress-bar {
        width: 50px;
    }

    .progress-bar-container {
        min-width: 0;
    }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .global-progress-indicator {
        background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .global-progress-indicator {
        background: #000;
        border-bottom: 2px solid #fff;
    }
    
    .progress-bar {
        background: #333;
        border: 1px solid #fff;
    }
    
    .progress-bar-fill {
        background: #fff;
    }
    
    .cancel-button {
        background: #333;
        border: 1px solid #fff;
    }
}