/**
 * Bulk Operations Component
 * Bulk optimization progress and buttons
 *
 * @package BeepBeep_AI
 * @since 5.0.0
 */

/* ==================================================
   BULK PROGRESS INDICATOR
   ================================================== */

.bbai-bulk-progress {
    margin-top: 16px;
    background: var(--bbai-info-bg);
    border-radius: var(--bbai-radius-lg);
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 14px 16px;
    color: #312e81;
    display: none;
    flex-direction: column;
    gap: 10px;
}

.bbai-bulk-progress[hidden] {
    display: none !important;
}

.bbai-bulk-progress:not([hidden]) {
    display: flex !important;
}

.bbai-bulk-progress__header {
    display: flex;
    justify-content: space-between;
    font-weight: var(--bbai-font-semibold);
    font-size: var(--bbai-text-sm);
}

.bbai-bulk-progress__counts {
    color: #4338ca;
    font-weight: var(--bbai-font-medium);
}

.bbai-bulk-progress__bar {
    position: relative;
    width: 100%;
    height: 8px;
    background: rgba(99, 102, 241, 0.18);
    border-radius: var(--bbai-radius-full);
    overflow: hidden;
}

.bbai-bulk-progress__bar span {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    transition: width var(--bbai-transition-base) ease;
}

/* ==================================================
   BULK OPTIMIZATION BUTTON
   ================================================== */

.bbai-bulk-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 1.25rem 2.5rem;
    border-radius: 16px;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.28), 0 2px 4px rgba(5, 150, 105, 0.2);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.025em;
}

.bbai-bulk-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.bbai-bulk-btn:hover:not(:disabled)::before {
    left: 100%;
}

.bbai-bulk-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 24px -4px rgba(59, 130, 246, 0.4), 0 4px 8px rgba(59, 130, 246, 0.3);
}

.bbai-bulk-btn:disabled,
.bbai-bulk-btn.loading {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    color: #ffffff;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    opacity: 0.7;
}

.bbai-bulk-btn:disabled:hover,
.bbai-bulk-btn.loading:hover {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    transform: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bbai-bulk-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 4px 8px -2px rgba(16, 185, 129, 0.28);
}

/* ==================================================
   BULK BUTTON - LIMIT STATE
   ================================================== */

.bbai-bulk-btn--limit {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    position: relative;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 2.5rem 1rem 2.5rem;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3), 0 2px 4px rgba(239, 68, 68, 0.2);
}

.bbai-bulk-btn--limit::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

.bbai-bulk-btn--limit:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -4px rgba(239, 68, 68, 0.3);
}

.bbai-bulk-btn--limit:active {
    transform: translateY(0);
    box-shadow: 0 4px 8px -2px rgba(239, 68, 68, 0.3);
}

.bbai-bulk-btn__badge {
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 2px solid #ffffff;
    position: relative;
    z-index: 1;
}

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

@media (max-width: 640px) {
    .bbai-bulk-btn {
        padding: 1rem 2rem;
        font-size: 1rem;
    }

    .bbai-bulk-btn--limit {
        padding: 1rem 2rem 0.875rem 2rem;
    }
}
