/* Modal WhatsApp - ID Único para Evitar Conflitos */
#wa-popup-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.75);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

#wa-popup-container.wa-active {
    display: flex;
    opacity: 1;
}

.wa-popup-content {
    position: relative;
    max-width: 75vw;
    max-height: 75vh;
    width: auto;
    background: transparent;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    transform: scale(0.7) rotate(-5deg);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#wa-popup-container.wa-active .wa-popup-content {
    transform: scale(1) rotate(0deg);
}

.wa-banner-img {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.3s ease;
    user-select: none;
}

.wa-banner-img:hover {
    transform: scale(1.03);
    filter: brightness(1.1);
}

.wa-close-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #ff4757, #ff3742);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 12px rgba(255, 71, 87, 0.4);
    transition: all 0.3s ease;
    z-index: 100000;
    line-height: 1;
    border: 2px solid white;
}

.wa-close-btn:hover {
    background: linear-gradient(135deg, #ff6b7a, #ff5252);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 8px 16px rgba(255, 71, 87, 0.6);
    border: 2px solid #fff;
}

.wa-close-btn:active {
    transform: scale(0.95) rotate(90deg);
}

/* Efeito de pulsação no botão de fechar */
.wa-close-btn::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff4757, #ff3742);
    z-index: -1;
    opacity: 0;
    animation: wa-pulse 3s infinite;
}

@keyframes wa-pulse {
    0% {
        transform: scale(1);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.3;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* Responsividade */
@media (max-width: 768px) {
    .wa-popup-content {
        max-width: 85vw;
        max-height: 70vh;
    }
    
    .wa-close-btn {
        width: 30px;
        height: 30px;
        font-size: 16px;
        top: 3px;
        right: 3px;
        border: 2px solid white;
    }
}

@media (max-width: 480px) {
    .wa-popup-content {
        max-width: 90vw;
        max-height: 65vh;
    }
    
    .wa-close-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
        top: 2px;
        right: 2px;
        border: 2px solid white;
    }
}

/* Animação de entrada personalizada */
@keyframes wa-bounce-in {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-45deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.05) rotate(5deg);
    }
    70% {
        transform: scale(0.95) rotate(-2deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* Animação de saída */
@keyframes wa-bounce-out {
    0% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: scale(0.3) rotate(-45deg);
    }
}

/* Classe para animação de entrada */
.wa-popup-content.wa-entering {
    animation: wa-bounce-in 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Classe para animação de saída */
.wa-popup-content.wa-leaving {
    animation: wa-bounce-out 0.4s ease-in-out;
}
