/* Enhanced WhatsApp Button Styles */

/* Main WhatsApp Button */
.btn-whatsapp {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    background: var(--gradient-fire);
    color: var(--color-white);
    font-family: var(--font-primary);
    font-size: var(--text-xl);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(255, 68, 68, 0.4);
}

/* WhatsApp Icon */
.whatsapp-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.whatsapp-icon svg {
    width: 20px;
    height: 20px;
    fill: #25D366;
}

/* Button Text */
.btn-whatsapp-text {
    position: relative;
    z-index: 2;
}

/* Hover Effects */
.btn-whatsapp:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 30px rgba(255, 68, 68, 0.6);
}

.btn-whatsapp:hover .whatsapp-icon {
    transform: rotate(15deg) scale(1.1);
}

/* Pulse Animation */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(255, 68, 68, 0.4);
    }
    50% {
        box-shadow: 0 8px 40px rgba(255, 102, 0, 0.8);
    }
}

.btn-whatsapp {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Active State */
.btn-whatsapp:active {
    transform: scale(0.98);
}

/* Ripple Effect */
.btn-whatsapp::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-whatsapp:active::before {
    width: 300px;
    height: 300px;
}

/* Loading State Container */
.whatsapp-loading-crazy {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.whatsapp-loading-crazy.active {
    opacity: 1;
    pointer-events: all;
}

/* Loading Content */
.loading-crazy-content {
    text-align: center;
    position: relative;
}

/* Goose Spinner */
.goose-spinner {
    width: 120px;
    height: 120px;
    margin: 0 auto var(--space-xl);
    position: relative;
}

.goose-icon {
    width: 100%;
    height: 100%;
    font-size: 80px;
    line-height: 120px;
    animation: spin-goose 1s linear infinite;
}

@keyframes spin-goose {
    0% {
        transform: rotate(0deg) scale(1);
    }
    25% {
        transform: rotate(90deg) scale(1.1);
    }
    50% {
        transform: rotate(180deg) scale(1);
    }
    75% {
        transform: rotate(270deg) scale(0.9);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}

/* Particle Explosion */
.particle-explosion {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--gradient-fire);
    border-radius: 50%;
    opacity: 0;
}

.particle.explode {
    animation: particle-explode 1s ease-out forwards;
}

@keyframes particle-explode {
    0% {
        transform: translate(0, 0) scale(0);
        opacity: 1;
    }
    100% {
        transform: translate(var(--x), var(--y)) scale(0);
        opacity: 0;
    }
}

/* Loading Text */
.loading-text {
    font-family: var(--font-primary);
    font-size: var(--text-2xl);
    color: var(--color-white);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-md);
    overflow: hidden;
}

.loading-text span {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: typewriter-appear 0.5s ease forwards;
    animation-delay: calc(var(--i) * 0.05s);
}

@keyframes typewriter-appear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Progress Bar */
.progress-container {
    width: 300px;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin: 0 auto;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-fire);
    width: 0;
    border-radius: var(--radius-full);
    transition: width 2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 1s infinite;
}

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

.progress-bar.fill {
    width: 100%;
}

/* Fire Particles Background */
.fire-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.fire-particle {
    position: absolute;
    bottom: -50px;
    width: 4px;
    height: 4px;
    background: var(--color-fire-red);
    border-radius: 50%;
    opacity: 0;
    animation: rise-fire 3s linear infinite;
    animation-delay: calc(var(--i) * 0.3s);
}

@keyframes rise-fire {
    0% {
        transform: translateY(0) translateX(0) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(calc(var(--x) * 50px)) scale(2);
        opacity: 0;
    }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .btn-whatsapp {
        font-size: var(--text-lg);
        padding: var(--space-sm) var(--space-lg);
    }
    
    .whatsapp-icon {
        width: 28px;
        height: 28px;
    }
    
    .whatsapp-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .goose-spinner {
        width: 80px;
        height: 80px;
    }
    
    .goose-icon {
        font-size: 60px;
        line-height: 80px;
    }
    
    .loading-text {
        font-size: var(--text-xl);
    }
    
    .progress-container {
        width: 250px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .btn-whatsapp,
    .whatsapp-icon,
    .goose-icon,
    .particle,
    .progress-bar::after,
    .fire-particle {
        animation: none !important;
    }
    
    .btn-whatsapp:hover {
        transform: none;
    }
    
    .loading-text span {
        opacity: 1;
        transform: none;
        animation: none;
    }
}
