/**
 * Celebrations & Milestones
 * Confetti, milestone badges, and success animations
 */

/* Confetti Container */
.bbai-confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 100000;
    overflow: hidden;
}

.bbai-confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -10px;
    border-radius: 2px;
    animation: bbai-confetti-fall linear forwards;
}

@keyframes bbai-confetti-fall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Milestone Badge */
.bbai-milestone-badge {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    z-index: 100001;
    opacity: 0;
    pointer-events: none;
    transition: all var(--bbai-transition-base) var(--bbai-ease-out);
}

.bbai-milestone-badge.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: all;
}

.bbai-milestone-badge-content {
    background: white;
    border-radius: var(--bbai-radius-xl);
    padding: var(--bbai-space-8);
    text-align: center;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
    min-width: 300px;
    max-width: 400px;
    position: relative;
    overflow: hidden;
}

.bbai-milestone-badge-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--bbai-primary-gradient);
}

.bbai-milestone-badge-icon {
    font-size: 64px;
    margin-bottom: var(--bbai-space-4);
    animation: bbai-bounce-celebration 0.6s ease-out;
}

@keyframes bbai-bounce-celebration {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.bbai-milestone-badge-title {
    font-size: var(--bbai-text-2xl);
    font-weight: var(--bbai-font-bold);
    color: var(--bbai-text);
    margin-bottom: var(--bbai-space-2);
}

.bbai-milestone-badge-message {
    font-size: var(--bbai-text-base);
    color: var(--bbai-text-muted);
    margin-bottom: var(--bbai-space-6);
}

.bbai-milestone-badge-close {
    background: var(--bbai-primary);
    color: white;
    border: none;
    border-radius: var(--bbai-radius-lg);
    padding: var(--bbai-space-3) var(--bbai-space-6);
    font-size: var(--bbai-text-base);
    font-weight: var(--bbai-font-semibold);
    cursor: pointer;
    transition: all var(--bbai-transition-fast);
}

.bbai-milestone-badge-close:hover {
    background: var(--bbai-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Progress Celebration */
.bbai-progress-celebration {
    display: inline-flex;
    align-items: center;
    gap: var(--bbai-space-2);
    padding: var(--bbai-space-2) var(--bbai-space-4);
    background: var(--bbai-success-light);
    border-radius: var(--bbai-radius-full);
    color: var(--bbai-success);
    font-size: var(--bbai-text-sm);
    font-weight: var(--bbai-font-semibold);
    animation: bbai-slide-in-right 0.5s ease-out;
}

@keyframes bbai-slide-in-right {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Dark Mode */
[data-theme="dark"] .bbai-milestone-badge-content,
.bbai-dark-mode .bbai-milestone-badge-content {
    background: var(--bbai-gray-800);
    color: var(--bbai-gray-100);
}

[data-theme="dark"] .bbai-milestone-badge-title,
.bbai-dark-mode .bbai-milestone-badge-title {
    color: var(--bbai-gray-100);
}

[data-theme="dark"] .bbai-milestone-badge-message,
.bbai-dark-mode .bbai-milestone-badge-message {
    color: var(--bbai-gray-300);
}
