/**
 * Batch Operations CSS
 * Styles for bulk operations, progress tracking, and batch processing UI
 * Used in dashboard-performance.js for batch favorite updates and bulk delete operations
 */

/* ==================== BULK PROGRESS OVERLAY ==================== */

.bulk-progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ==================== BULK PROGRESS MODAL ==================== */

.bulk-progress-modal {
    background: var(--surface-dark, #2a2a3e);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-radius: 12px;
    padding: 2rem;
    min-width: 400px;
    max-width: 90vw;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ==================== BULK PROGRESS CONTENT ==================== */

.bulk-progress-content h3 {
    margin: 0 0 1.5rem 0;
    color: #e2e8f0 !important; /* Explicit color to ensure visibility */
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
}

/* ==================== PROGRESS BAR ==================== */

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg,
        var(--primary-color, #7c3aed) 0%,
        var(--primary-hover, #9333ea) 100%
    );
    border-radius: 4px;
    transition: width 0.3s ease-out;
    position: relative;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: progressShine 1.5s infinite;
}

@keyframes progressShine {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* ==================== PROGRESS TEXT ==================== */

.progress-text {
    text-align: center;
    color: #cbd5e1 !important; /* Explicit color to ensure visibility */
    font-size: 1rem;
    font-weight: 500;
}

.progress-count {
    color: #ff8c00 !important; /* Orange theme color for emphasis */
    font-weight: 600;
    font-size: 1.1rem;
}

/* ==================== BATCH OPERATION NOTIFICATIONS ==================== */

.batch-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--surface-dark, #2a2a3e);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-radius: 8px;
    padding: 1rem 1.5rem;
    min-width: 300px;
    max-width: 400px;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.batch-notification.success {
    border-left: 4px solid var(--success-color, #44aa44);
}

.batch-notification.error {
    border-left: 4px solid var(--error-color, #ff4444);
}

.batch-notification.warning {
    border-left: 4px solid var(--warning-color, #ffaa00);
}

.batch-notification .notification-title {
    font-weight: 600;
    color: var(--text-primary, #ffffff);
    margin-bottom: 0.5rem;
}

.batch-notification .notification-message {
    color: var(--text-secondary, #b0b0c8);
    font-size: 0.9rem;
}

/* ==================== BATCH QUEUE INDICATOR ==================== */

.batch-queue-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--surface-dark, #2a2a3e);
    border: 1px solid var(--primary-color, #7c3aed);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 9998;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

.batch-queue-indicator .queue-icon {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color, #7c3aed);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.batch-queue-indicator .queue-text {
    color: var(--text-primary, #ffffff);
    font-size: 0.9rem;
    font-weight: 500;
}

.batch-queue-indicator .queue-count {
    background: var(--primary-color, #7c3aed);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ==================== MOBILE RESPONSIVE ==================== */

@media (max-width: 768px) {
    .bulk-progress-modal {
        min-width: unset;
        width: 90vw;
        padding: 1.5rem;
    }

    .bulk-progress-content h3 {
        font-size: 1.1rem;
    }

    .batch-notification {
        min-width: unset;
        width: calc(100vw - 40px);
        right: 20px;
        left: 20px;
    }

    .batch-queue-indicator {
        bottom: 10px;
        right: 10px;
        padding: 0.5rem 0.75rem;
    }

    .batch-queue-indicator .queue-text {
        font-size: 0.8rem;
    }
}

/* ==================== DARK MODE ADJUSTMENTS ==================== */

@media (prefers-color-scheme: dark) {
    .bulk-progress-overlay {
        background: rgba(0, 0, 0, 0.9);
    }

    .bulk-progress-modal {
        background: #1a1a2e;
        border-color: rgba(255, 255, 255, 0.15);
    }

    .progress-bar {
        background: rgba(255, 255, 255, 0.08);
    }
}

/* ==================== ACCESSIBILITY ==================== */

@media (prefers-reduced-motion: reduce) {
    .bulk-progress-overlay,
    .bulk-progress-modal,
    .batch-notification,
    .batch-queue-indicator,
    .progress-fill,
    .progress-fill::after {
        animation: none;
    }

    .progress-fill {
        transition: width 0.1s linear;
    }
}

/* ==================== PRINT STYLES ==================== */

@media print {
    .bulk-progress-overlay,
    .batch-notification,
    .batch-queue-indicator {
        display: none !important;
    }
}
