/**
 * Progress Component
 * Linear and circular progress indicators
 *
 * @package BeepBeep_AI
 * @since 5.0.0
 */

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

.bbai-progress-container {
    height: 10px;
    background: var(--bbai-gray-200);
    border-radius: var(--bbai-radius-full);
    overflow: hidden;
    box-shadow: var(--bbai-shadow-xs);
}

.bbai-progress-bar {
    height: 100%;
    background: var(--bbai-gradient-success);
    border-radius: var(--bbai-radius-full);
    min-width: 2px;
}

/* Progress Bar with Fill Animation */
.bbai-progress-bar-container {
    background: var(--bbai-gray-100);
    height: 10px;
    border-radius: var(--bbai-radius-md);
    overflow: hidden;
    box-shadow: var(--bbai-shadow-xs);
}

.bbai-progress-bar-fill {
    height: 100%;
    background: var(--bbai-gradient-success);
    border-radius: var(--bbai-radius-md);
    transition: width 0.5s ease;
    position: relative;
    box-shadow: var(--bbai-shadow-xs);
}

.bbai-progress-bar-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%);
    animation: shimmer 2s infinite;
}

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

/* ==================================================
   USAGE BAR
   ================================================== */

.bbai-usage-bar {
    max-width: 620px;
    margin: 0 auto var(--bbai-space-8);
}

.bbai-usage-text {
    font-size: var(--bbai-text-sm);
    color: var(--bbai-gray-500);
    margin-bottom: var(--bbai-space-3);
    text-align: left;
}

/* ==================================================
   CIRCULAR PROGRESS
   ================================================== */

.bbai-circular-progress {
    position: relative;
    width: 180px;
    height: 180px;
    flex-shrink: 0;
}

.bbai-circular-progress-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.bbai-circular-progress-bg {
    fill: none;
    stroke: #f3f4f6;
    stroke-width: 12;
}

.bbai-circular-progress-bar {
    fill: none;
    stroke: #9b5cff;
    stroke-width: 12;
    stroke-linecap: round;
    transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.bbai-circular-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.bbai-circular-progress-percent {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    line-height: 1;
    letter-spacing: -0.02em;
}

.bbai-circular-progress-label {
    font-size: 11px;
    color: #6b7280;
    margin-top: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==================================================
   CIRCULAR PROGRESS DETAILS
   ================================================== */

.bbai-usage-circular-details {
    flex: 1;
}

.bbai-usage-circular-title {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
    line-height: 1.4;
}

.bbai-usage-circular-title strong {
    font-weight: 600;
}

.bbai-usage-circular-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 24px;
    line-height: 1.6;
}

.bbai-usage-circular-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.bbai-usage-stat-number {
    font-weight: 700;
    font-size: 16px;
    color: #111827;
}

.bbai-usage-stat-text {
    color: #6b7280;
}

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

.bbai-bulk-progress {
    display: none;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

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

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

.bbai-bulk-progress__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.bbai-bulk-progress__counts {
    font-size: 14px;
    color: #6b7280;
}

.bbai-bulk-progress__bar {
    height: 8px;
    background: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.bbai-bulk-progress__bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
    transition: width 0.3s ease;
}

/* ==================================================
   OPTIMIZATION PROGRESS
   ================================================== */

.bbai-optimization-progress {
    background: linear-gradient(135deg, var(--bbai-gray-50) 0%, var(--bbai-gray-100) 100%);
    border: 1px solid var(--bbai-border-primary);
    border-radius: var(--bbai-radius-xl);
    padding: var(--bbai-space-8);
    margin-bottom: var(--bbai-space-8);
    box-shadow: var(--bbai-shadow-sm);
    position: relative;
    overflow: hidden;
}

/* ==================================================
   POST OPTIMIZATION BANNER
   ================================================== */

.bbai-post-optimization-banner {
    display: none;
    margin-top: var(--bbai-space-8);
    padding: var(--bbai-space-6);
    border-radius: 14px;
    background: linear-gradient(120deg, #ede9fe 0%, #dbeafe 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow: var(--bbai-shadow-lg);
    align-items: center;
    gap: var(--bbai-space-5);
}

.bbai-post-optimization-banner.active {
    display: flex;
}

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

@media (max-width: 768px) {
    .bbai-circular-progress {
        width: 140px;
        height: 140px;
    }

    .bbai-circular-progress-percent {
        font-size: 24px;
    }

    .bbai-usage-circular-title {
        font-size: 18px;
    }

    .bbai-usage-bar {
        max-width: 100%;
    }
}
