/**
 * Persistent Scrape Status Toast
 * Sticky notification that tracks scrape progress
 */

.scrape-status-toast {
    position: relative;  /* In container, not fixed */
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: auto;
    min-width: 350px;
    max-width: 600px;  /* Wider to accommodate single-line text */
    opacity: 0;
    transform: translateY(150%);
    transition: all 0.3s ease-out;
    overflow: hidden;
}

.scrape-status-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.scrape-status-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
}

.scrape-status-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.scrape-status-icon .spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #667eea;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.scrape-status-text {
    flex: 1;
    min-width: 0;
}

.scrape-status-title {
    font-weight: 600;
    font-size: 14px;
    color: #1f2937;
    margin-bottom: 4px;
    white-space: nowrap;  /* Keep title on single line */
}

.scrape-status-message {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
    white-space: nowrap;  /* Keep text on single line */
}

.scrape-status-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: none;
    background: #f3f4f6;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.scrape-status-close:hover {
    background: #e5e7eb;
    color: #374151;
}

.scrape-status-progress {
    height: 3px;
    background: #f3f4f6;
    overflow: hidden;
}

.scrape-status-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
}

@keyframes indeterminate {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .scrape-status-toast {
        min-width: auto;
        max-width: calc(100vw - 32px);  /* Full width minus padding */
    }
    
    .scrape-status-message {
        white-space: normal;  /* Allow wrapping on mobile */
    }
    
    .scrape-status-title {
        white-space: normal;  /* Allow wrapping on mobile */
    }
}

/* Animation for success state */
@keyframes success-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.scrape-status-toast.success .scrape-status-icon {
    animation: success-pulse 0.6s ease;
}
