/* Persistent Analysis Widget - Global styles */
.analysis-persistent-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: linear-gradient(145deg, #1a1f2e 0%, #141821 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 12px 16px;
    z-index: 10001;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(59, 130, 246, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: persistentSlideIn 0.3s ease;
    max-width: 320px;
}

@keyframes persistentSlideIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

.persistent-content {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    flex: 1;
}

.persistent-icon {
    width: 36px;
    height: 36px;
    background: rgba(59, 130, 246, 0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.persistent-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: persistentSpin 1s linear infinite;
}

@keyframes persistentSpin {
    to { transform: rotate(360deg); }
}

.persistent-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.persistent-symbol {
    font-weight: 600;
    font-size: 0.95rem;
    color: #f8fafc;
}

.persistent-progress {
    font-size: 0.8rem;
    color: #22c55e;
    font-weight: 500;
}

.persistent-step {
    font-size: 0.75rem;
    color: #64748b;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.persistent-expand-btn,
.persistent-close-btn {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 6px;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.persistent-expand-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.persistent-close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Completed State */
.analysis-persistent-widget.completed {
    border-color: rgba(34, 197, 94, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(34, 197, 94, 0.2);
    animation: persistentPulse 2s ease-in-out infinite;
}

@keyframes persistentPulse {
    0%, 100% { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(34, 197, 94, 0.2); }
    50% { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 30px rgba(34, 197, 94, 0.4); }
}

.analysis-persistent-widget.completed .persistent-icon {
    background: rgba(34, 197, 94, 0.15);
}

.analysis-persistent-widget.completed .persistent-spinner {
    animation: none;
    border: none;
    background: #22c55e;
    display: flex;
    align-items: center;
    justify-content: center;
}

.analysis-persistent-widget.completed .persistent-spinner::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Failed State */
.analysis-persistent-widget.failed {
    border-color: rgba(239, 68, 68, 0.4);
}

.analysis-persistent-widget.failed .persistent-icon {
    background: rgba(239, 68, 68, 0.15);
}

.analysis-persistent-widget.failed .persistent-spinner {
    animation: none;
    border-color: #ef4444;
}

