/*
 * Celebration Burst — auto-dismissing full-screen WOOHOO moment.
 * Fires on every successful wish placement (single or cart).
 */

/* ── Overlay ──────────────────────────────────────────── */
.wly-burst {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    background: radial-gradient(ellipse at 50% 40%, rgba(124, 58, 237, 0.92) 0%, rgba(10, 10, 11, 0.96) 70%);
    opacity: 0;
    animation: wly-burst-life 2.6s ease forwards;
}

@keyframes wly-burst-life {
    0%   { opacity: 0; }
    10%  { opacity: 1; }
    70%  { opacity: 1; }
    100% { opacity: 0; }
}

/* ── Emoji rain particles ─────────────────────────────── */
.wly-burst__particle {
    position: absolute;
    font-size: 2rem;
    pointer-events: none;
    animation: wly-burst-float linear forwards;
    will-change: transform, opacity;
}

@keyframes wly-burst-float {
    0%   { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); }
    100% { opacity: 0; transform: translateY(-60vh) scale(0.4) rotate(720deg); }
}

/* ── Main text stack ──────────────────────────────────── */
.wly-burst__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    padding: 0 1.5rem;
}

.wly-burst__exclaim {
    font-size: clamp(3.5rem, 12vw, 7rem);
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.03em;
    line-height: 1;
    opacity: 0;
    transform: scale(0.3) translateY(30px) rotate(-6deg);
    animation: wly-burst-text-in 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s forwards;
    text-shadow:
        0 0 30px rgba(167, 139, 250, 0.9),
        0 0 80px rgba(124, 58, 237, 0.6);
}

.wly-burst__emoji {
    font-size: clamp(2.5rem, 8vw, 5rem);
    line-height: 1;
    opacity: 0;
    transform: scale(0.2);
    animation: wly-burst-text-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.35s forwards;
    display: block;
}

.wly-burst__sub {
    font-size: clamp(1.2rem, 4vw, 2rem);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.88);
    letter-spacing: 0.04em;
    opacity: 0;
    transform: translateY(20px);
    animation: wly-burst-text-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) 0.55s forwards;
}

@keyframes wly-burst-text-in {
    to {
        opacity: 1;
        transform: scale(1) translateY(0) rotate(0deg);
    }
}

/* ── Ring pulse ───────────────────────────────────────── */
.wly-burst__ring {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    border: 3px solid rgba(167, 139, 250, 0.4);
    animation: wly-burst-ring 1.8s ease-out 0.1s forwards;
    opacity: 0;
}

.wly-burst__ring:nth-child(2) {
    width: 200px;
    height: 200px;
    border-color: rgba(124, 58, 237, 0.5);
    animation-delay: 0.25s;
}

@keyframes wly-burst-ring {
    0%   { opacity: 0.8; transform: scale(0.2); }
    100% { opacity: 0;   transform: scale(2.5); }
}

/* ── Reduced motion ────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .wly-burst,
    .wly-burst__exclaim,
    .wly-burst__emoji,
    .wly-burst__sub,
    .wly-burst__particle,
    .wly-burst__ring {
        animation-duration: 0.01ms !important;
    }
}
