/**
 * GF Live Counter Styles
 * Moderne frosted glass styling voor de live counter
 */

/* Base container */
.gf-live-counter {
    display: inline-block;
    text-align: center;
}

.gf-live-counter__inner {
    position: relative;
    padding: 30px 50px;
    border-radius: 16px;
    overflow: hidden;
}

/* Number styling */
.gf-live-counter__number {
    position: relative;
    z-index: 2;
}

.gf-live-counter__value {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1;
    display: block;
    font-variant-numeric: tabular-nums;
}

.gf-live-counter__label {
    position: relative;
    z-index: 2;
    font-size: 1.1rem;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
}

/* Pulse indicator */
.gf-live-counter__pulse {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    z-index: 2;
}

/* =====================================================
   STYLE: Glass (default) - Frosted glass effect with animations
   ===================================================== */
.gf-live-counter--glass .gf-live-counter__inner {
    background: rgba(181, 8, 250, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(181, 8, 250, 0.3);
    box-shadow: 
        0 8px 32px 0 rgba(181, 8, 250, 0.2),
        0 0 20px rgba(181, 8, 250, 0.15),
        inset 0 0 30px rgba(181, 8, 250, 0.1);
    animation: glassBreathing 4s ease-in-out infinite;
    overflow: hidden;
}

/* Breathing glow animation */
@keyframes glassBreathing {
    0%, 100% {
        box-shadow: 
            0 8px 32px 0 rgba(181, 8, 250, 0.2),
            0 0 20px rgba(181, 8, 250, 0.15),
            inset 0 0 30px rgba(181, 8, 250, 0.1);
    }
    50% {
        box-shadow: 
            0 8px 45px 0 rgba(181, 8, 250, 0.35),
            0 0 35px rgba(181, 8, 250, 0.25),
            inset 0 0 40px rgba(181, 8, 250, 0.15);
    }
}

/* Shimmer effect */
.gf-live-counter--glass .gf-live-counter__inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent 0%,
        rgba(255, 255, 255, 0) 30%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0) 70%,
        transparent 100%
    );
    transform: skewX(-20deg);
    animation: shimmer 6s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes shimmer {
    0%, 100% {
        left: -100%;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    50% {
        left: 150%;
        opacity: 1;
    }
    60%, 100% {
        left: 150%;
        opacity: 0;
    }
}

/* Floating particles */
.gf-live-counter--glass .gf-live-counter__inner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.3) 1px, transparent 1px),
        radial-gradient(circle at 80% 20%, rgba(181, 8, 250, 0.4) 1px, transparent 1px),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.2) 1px, transparent 1px),
        radial-gradient(circle at 60% 70%, rgba(181, 8, 250, 0.3) 1px, transparent 1px),
        radial-gradient(circle at 90% 60%, rgba(255, 255, 255, 0.25) 1px, transparent 1px),
        radial-gradient(circle at 10% 30%, rgba(181, 8, 250, 0.35) 1px, transparent 1px);
    background-size: 100% 100%;
    animation: floatingParticles 8s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
    opacity: 0.8;
}

@keyframes floatingParticles {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0.8;
    }
    25% {
        transform: translateY(-8px) translateX(4px);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-5px) translateX(-3px);
        opacity: 0.9;
    }
    75% {
        transform: translateY(-10px) translateX(2px);
        opacity: 0.5;
    }
}

.gf-live-counter--glass .gf-live-counter__value {
    color: #ffffff;
    text-shadow: 0 0 20px rgba(181, 8, 250, 0.5);
    position: relative;
    z-index: 2;
}

.gf-live-counter--glass .gf-live-counter__label {
    color: rgba(255, 255, 255, 0.9);
    position: relative;
    z-index: 2;
}

.gf-live-counter--glass .gf-live-counter__pulse {
    background: rgba(181, 8, 250, 0.8);
    box-shadow: 0 0 10px rgba(181, 8, 250, 0.6);
    animation: glassPulse 2s ease-in-out infinite;
    z-index: 3;
}

@keyframes glassPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 10px rgba(181, 8, 250, 0.6);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.2);
        box-shadow: 0 0 20px rgba(181, 8, 250, 0.8);
    }
}

/* =====================================================
   STYLE: Minimal - Clean and simple
   ===================================================== */
.gf-live-counter--minimal .gf-live-counter__inner {
    background: transparent;
    border: 2px solid currentColor;
    padding: 25px 40px;
}

.gf-live-counter--minimal .gf-live-counter__value {
    color: inherit;
}

.gf-live-counter--minimal .gf-live-counter__label {
    color: inherit;
    opacity: 0.7;
}

.gf-live-counter--minimal .gf-live-counter__pulse {
    background: currentColor;
    opacity: 0.6;
    animation: minimalPulse 2s ease-in-out infinite;
}

@keyframes minimalPulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.3;
    }
}

/* =====================================================
   STYLE: Bold - Attention grabbing
   ===================================================== */
.gf-live-counter--bold .gf-live-counter__inner {
    background: linear-gradient(135deg, rgba(181, 8, 250, 0.9) 0%, rgba(138, 8, 200, 0.9) 100%);
    border: none;
    box-shadow: 
        0 10px 40px rgba(181, 8, 250, 0.4),
        0 0 60px rgba(181, 8, 250, 0.2);
    padding: 35px 55px;
}

.gf-live-counter--bold .gf-live-counter__value {
    color: #ffffff;
    font-size: 4.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.gf-live-counter--bold .gf-live-counter__label {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
}

.gf-live-counter--bold .gf-live-counter__pulse {
    background: #ffffff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
    animation: boldPulse 1.5s ease-in-out infinite;
}

@keyframes boldPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
    }
    50% {
        transform: scale(1.3);
        box-shadow: 0 0 25px rgba(255, 255, 255, 1);
    }
}

/* =====================================================
   ANIMATIONS
   ===================================================== */

/* Count up animation on load */
.gf-counter-animate .gf-live-counter__value {
    animation: countFadeIn 0.6s ease-out;
}

@keyframes countFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Update flash animation */
.gf-live-counter--updating .gf-live-counter__value {
    animation: updateFlash 0.4s ease-out;
}

@keyframes updateFlash {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
        text-shadow: 0 0 30px rgba(181, 8, 250, 0.8);
    }
    100% {
        transform: scale(1);
    }
}

/* Increment animation */
.gf-live-counter--increment .gf-live-counter__inner {
    animation: incrementPop 0.5s ease-out;
}

@keyframes incrementPop {
    0% {
        transform: scale(1);
    }
    30% {
        transform: scale(1.05);
        box-shadow: 
            0 8px 40px 0 rgba(181, 8, 250, 0.4),
            0 0 40px rgba(181, 8, 250, 0.3),
            inset 0 0 40px rgba(181, 8, 250, 0.2);
    }
    100% {
        transform: scale(1);
    }
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 768px) {
    .gf-live-counter__value {
        font-size: 3rem;
    }
    
    .gf-live-counter--bold .gf-live-counter__value {
        font-size: 3.5rem;
    }
    
    .gf-live-counter__inner {
        padding: 25px 35px;
    }
    
    .gf-live-counter__label {
        font-size: 0.95rem;
        letter-spacing: 1px;
    }
}

@media (max-width: 480px) {
    .gf-live-counter__value {
        font-size: 2.5rem;
    }
    
    .gf-live-counter--bold .gf-live-counter__value {
        font-size: 3rem;
    }
    
    .gf-live-counter__inner {
        padding: 20px 30px;
    }
}
