/*!
 * Bubble Overlay CSS
 * Beautiful bubble overlay effect for WordPress
 * Version: 1.0.0
 * Author: Your Name
 */

/* ==========================================================================
   Base Bubble Overlay Styles
   ========================================================================== */

.bo-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    z-index: 999999;
    touch-action: none;
    user-select: none;
    contain: layout style paint;
    overflow: hidden;
}

.bo-container {
    position: absolute;
    width: 100%;
    height: 100%;
    contain: layout style paint;
}

/* ==========================================================================
   Enhanced Bubble Styles - Glass Effect
   ========================================================================== */

.bo-bubble {
    position: absolute;
    width: 20px;
    height: 20px;
    opacity: 0;
    border-radius: 50%;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
    mix-blend-mode: screen;
    pointer-events: auto;
    touch-action: none;
    user-select: none;
    z-index: 2;
    will-change: transform, opacity;
    transform: translate3d(0, 0, 0);
}

/* ==========================================================================
   Enhanced Bubble Color Variants with Glass Effect
   ========================================================================== */

.bo-bubble.bo-white {
    /* Enhanced white soda bubble styling - realistic glass effect like bubble-game */
    background: radial-gradient(
        circle at 30% 30%, 
        rgba(255, 255, 255, 0.95), 
        rgba(255, 255, 255, 0.15), 
        rgba(255, 255, 255, 0)
    );
    box-shadow:
        0 0 12px rgba(255, 255, 255, 0.5),
        inset -2px -2px 10px rgba(255, 255, 255, 0.7),
        inset 2px 2px 8px rgba(255, 255, 255, 0.2);
    opacity: 0.9;
}

.bo-bubble.bo-brand {
    /* Enhanced purple soda bubble styling - realistic glass effect */
    background: radial-gradient(
        circle at 30% 30%, 
        rgba(138, 43, 226, 0.95), 
        rgba(138, 43, 226, 0.15), 
        rgba(138, 43, 226, 0)
    );
    box-shadow:
        0 0 12px rgba(138, 43, 226, 0.5),
        inset -2px -2px 10px rgba(138, 43, 226, 0.7),
        inset 2px 2px 8px rgba(138, 43, 226, 0.2);
    opacity: 0.9;
    animation: purpleGlow 3s ease-in-out infinite alternate;
}

/* Custom brand color support via CSS variables with enhanced glass effect */
.bo-bubble.bo-brand.bo-custom-color {
    background: radial-gradient(
        circle at 30% 30%, 
        var(--bo-brand-color, rgba(138, 43, 226, 0.95)), 
        var(--bo-brand-color-light, rgba(138, 43, 226, 0.15)), 
        var(--bo-brand-color-transparent, rgba(138, 43, 226, 0))
    );
    box-shadow:
        0 0 12px var(--bo-brand-color-glow, rgba(138, 43, 226, 0.5)),
        inset -2px -2px 10px var(--bo-brand-color-highlight, rgba(138, 43, 226, 0.7)),
        inset 2px 2px 8px var(--bo-brand-color-shadow, rgba(138, 43, 226, 0.2));
}

/* ==========================================================================
   Enhanced Bubble Interactions
   ========================================================================== */

.bo-bubble:hover {
    transform: scale(1.05);
}

.bo-bubble.bo-white:hover {
    box-shadow:
        0 0 16px rgba(255, 255, 255, 0.8),
        inset -3px -3px 12px rgba(255, 255, 255, 0.8),
        inset 3px 3px 10px rgba(255, 255, 255, 0.3);
    opacity: 1;
}

.bo-bubble.bo-brand:hover {
    box-shadow:
        0 0 16px rgba(138, 43, 226, 0.8),
        inset -3px -3px 12px rgba(138, 43, 226, 0.8),
        inset 3px 3px 10px rgba(138, 43, 226, 0.3);
    opacity: 1;
}

/* ==========================================================================
   Enhanced Animations with Glass Effects
   ========================================================================== */

@keyframes purpleGlow {
    0%   { 
        box-shadow:
            0 0 12px rgba(138, 43, 226, 0.5),
            inset -2px -2px 10px rgba(138, 43, 226, 0.7),
            inset 2px 2px 8px rgba(138, 43, 226, 0.2);
    }
    100% { 
        box-shadow:
            0 0 16px rgba(138, 43, 226, 0.8),
            inset -2px -2px 10px rgba(138, 43, 226, 0.9),
            inset 2px 2px 8px rgba(138, 43, 226, 0.4);
    }
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes bo-float-up {
    0% {
        transform: translate3d(0, 0, 0);
        opacity: 0;
    }
    5% {
        opacity: 1;
    }
    95% {
        opacity: 1;
    }
    100% {
        transform: translate3d(0, -110vh, 0);
        opacity: 0;
    }
}

@keyframes bo-float-down {
    0% {
        transform: translate3d(0, 0, 0);
        opacity: 0;
    }
    5% {
        opacity: 1;
    }
    95% {
        opacity: 1;
    }
    100% {
        transform: translate3d(0, 110vh, 0);
        opacity: 0;
    }
}

@keyframes bo-pop {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.6;
    }
    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

/* ==========================================================================
   Animation Speed Modifiers
   ========================================================================== */

.bo-overlay--slow .bo-bubble {
    animation-duration: 12s !important;
}

.bo-overlay--fast .bo-bubble {
    animation-duration: 4s !important;
}

/* ==========================================================================
   Size Modifiers
   ========================================================================== */

.bo-overlay--small .bo-bubble {
    width: 15px;
    height: 15px;
}

.bo-overlay--large .bo-bubble {
    width: 30px;
    height: 30px;
}

.bo-overlay--tiny .bo-bubble {
    width: 10px;
    height: 10px;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Mobile devices - optimized for better appearance and performance */
@media (max-width: 767px) {
    .bo-bubble {
        width: 16px;
        height: 16px;
    }
    
    .bo-overlay--mobile-friendly .bo-bubble {
        width: 10px;
        height: 10px;
    }
    
    .bo-overlay--small .bo-bubble {
        width: 14px;
        height: 14px;
    }
    
    .bo-overlay--large .bo-bubble {
        width: 20px;
        height: 20px;
    }
    
    .bo-overlay--tiny .bo-bubble {
        width: 8px;
        height: 8px;
    }
}

/* Tablet devices */
@media (min-width: 768px) and (max-width: 1023px) {
    .bo-bubble {
        width: 16px;
        height: 16px;
    }
}

/* Large screens */
@media (min-width: 1200px) {
    .bo-bubble {
        width: 24px;
        height: 24px;
    }
    
    .bo-overlay--large .bo-bubble {
        width: 35px;
        height: 35px;
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    .bo-bubble {
        animation: none !important;
        opacity: 0.3;
    }
    
    .bo-bubble:hover {
        animation: none !important;
        opacity: 0.5;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bo-bubble.bo-white {
        background: radial-gradient(
            circle at 30% 30%, 
            rgba(255, 255, 255, 1), 
            rgba(255, 255, 255, 0.8), 
            rgba(0, 0, 0, 0.3)
        );
        border: 1px solid rgba(0, 0, 0, 0.3);
    }
    
    .bo-bubble.bo-brand {
        background: radial-gradient(
            circle at 30% 30%, 
            rgba(138, 43, 226, 1), 
            rgba(138, 43, 226, 0.8), 
            rgba(0, 0, 0, 0.3)
        );
        border: 1px solid rgba(255, 255, 255, 0.3);
    }
}

/* ==========================================================================
   Debug Mode
   ========================================================================== */

.bo-overlay--debug {
    border: 2px dashed #ff0000;
    background: rgba(255, 0, 0, 0.1);
}

.bo-overlay--debug .bo-bubble {
    border: 1px solid #00ff00;
}

.bo-overlay--debug .bo-container {
    border: 1px dashed #0000ff;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .bo-overlay {
        display: none !important;
    }
}

/* ==========================================================================
   Performance Optimizations
   ========================================================================== */

/* GPU acceleration for better performance */
.bo-overlay,
.bo-container,
.bo-bubble {
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Optimize for mobile performance */
@media (max-width: 767px) {
    .bo-bubble {
        box-shadow: 
            0 0 6px rgba(0, 0, 0, 0.1),
            inset -1px -1px 4px rgba(255, 255, 255, 0.3);
        backdrop-filter: none; /* Remove for better mobile performance */
        will-change: transform; /* Optimize for mobile GPU */
        transition: none; /* Remove transitions on mobile */
    }
    
    .bo-bubble:hover {
        transition: none; /* Remove hover transitions on mobile */
    }
    
    /* Reduce animation complexity on mobile */
    .bo-bubble.bo-brand {
        background: linear-gradient(135deg, rgba(138, 43, 226, 0.8), rgba(138, 43, 226, 0.3));
    }
    
    .bo-bubble.bo-white {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.3));
    }
} 