/**
 * WHATSAPP BUTTON - JM EMPREENDIMENTOS
 * Botão lateral fixo para WhatsApp
 * Design clean e responsivo seguindo o padrão do projeto
 */

/* ===== BOTÃO WHATSAPP FIXO ===== */
.whatsapp-button {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    animation: whatsappButtonEntrance 0.6s ease-out 1s forwards;
    border: none;
    cursor: pointer;
}

.whatsapp-button:hover {
    background: #20BA5A;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4);
}

.whatsapp-button:active {
    transform: translateY(0) scale(0.95);
}

.whatsapp-button:focus {
    outline: 3px solid rgba(37, 211, 102, 0.3);
    outline-offset: 2px;
}

/* ===== ÍCONE WHATSAPP ===== */
.whatsapp-button__icon {
    width: 32px;
    height: 32px;
    fill: #FFFFFF;
    transition: transform 0.2s ease;
}

.whatsapp-button:hover .whatsapp-button__icon {
    transform: scale(1.1);
}

/* ===== ANIMAÇÃO DE ENTRADA ===== */
@keyframes whatsappButtonEntrance {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-5px) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== PULSE ANIMATION (OPCIONAL) ===== */
.whatsapp-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: rgba(37, 211, 102, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    animation: whatsappPulse 2s infinite;
    pointer-events: none;
}

@keyframes whatsappPulse {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0.7;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.3;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    .whatsapp-button {
        right: 20px;
        bottom: 20px;
        width: 56px;
        height: 56px;
    }
    
    .whatsapp-button__icon {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .whatsapp-button {
        right: 16px;
        bottom: 16px;
        width: 52px;
        height: 52px;
    }
    
    .whatsapp-button__icon {
        width: 26px;
        height: 26px;
    }
}

/* ===== ACESSIBILIDADE ===== */
@media (prefers-reduced-motion: reduce) {
    .whatsapp-button {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .whatsapp-button::before {
        animation: none;
    }
    
    .whatsapp-button:hover {
        transform: none;
    }
}

/* ===== ESTADOS DE CARREGAMENTO ===== */
.whatsapp-button.is-loading {
    pointer-events: none;
    opacity: 0.7;
}

.whatsapp-button.is-loading .whatsapp-button__icon {
    animation: whatsappSpin 1s linear infinite;
}

@keyframes whatsappSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== INTEGRAÇÃO COM HEADER STICKY ===== */
.v2-header.is-scrolled + * .whatsapp-button {
    /* Ajustar posição quando header está sticky */
    bottom: 24px;
}

/* ===== PRINT STYLES ===== */
@media print {
    .whatsapp-button {
        display: none !important;
    }
}
