/* ==============================================================================
   KVBE WhatsApp Concierge Button & Speech Balloon (Flamingo Experiences Design)
   ============================================================================== */

.whatsapp-chat-container {
    position: fixed;
    right: 24px;
    bottom: 26px;
    z-index: 99990;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
}

.whatsapp-chat-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f0ddaa 0%, #c8a76b 50%, #9e7f45 100%);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55), 0 0 16px rgba(200, 167, 107, 0.35);
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.28s ease;
    cursor: pointer;
    position: relative;
    text-decoration: none;
    touch-action: manipulation;
    outline: none;
}

.whatsapp-chat-button:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65), 0 0 20px rgba(200, 167, 107, 0.55);
}

.whatsapp-chat-button:active {
    transform: scale(0.93);
}

/* Emerald green ripple aura / bubble effect */
.whatsapp-chat-button.ring-pulse::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55);
    animation: whatsappRingPulse 2s infinite cubic-bezier(0.66, 0, 0, 1);
    pointer-events: none;
}

.whatsapp-chat-button.pulse-animation {
    animation: whatsappPulse 1.4s ease-in-out infinite;
}

@keyframes whatsappPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.09); }
    100% { transform: scale(1); }
}

@keyframes whatsappRingPulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
    70% { box-shadow: 0 0 0 18px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.whatsapp-chat-button svg {
    width: 26px;
    height: 26px;
    display: block;
    pointer-events: none;
    transition: transform 0.2s ease;
}

.whatsapp-chat-button:hover svg {
    transform: scale(1.05);
}

.whatsapp-button-status-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #25D366;
    border: 2px solid #141416;
    box-shadow: 0 0 6px rgba(37, 211, 102, 0.9);
    pointer-events: none;
}

/* ==============================================================================
   Speech Balloon ("Cena de meter-se com as pessoas")
   ============================================================================== */
.whatsapp-chat-balloon {
    position: absolute;
    right: 0;
    bottom: calc(100% + 14px);
    width: 310px;
    max-width: calc(100vw - 36px);
    padding: 13px 15px;
    background: rgba(26, 25, 24, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #F5F3EF;
    border: 1px solid rgba(196, 164, 106, 0.35);
    border-radius: 16px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.65), 0 0 16px rgba(196, 164, 106, 0.12);
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13px;
    line-height: 1.45;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px) scale(0.96);
    transition: opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1), transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    box-sizing: border-box;
}

.whatsapp-chat-balloon.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.whatsapp-chat-balloon::after {
    content: "";
    position: absolute;
    right: 18px;
    bottom: -7px;
    width: 12px;
    height: 12px;
    background: rgba(26, 25, 24, 0.95);
    border-right: 1px solid rgba(196, 164, 106, 0.35);
    border-bottom: 1px solid rgba(196, 164, 106, 0.35);
    transform: rotate(45deg);
}

.whatsapp-balloon-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(196, 164, 106, 0.18);
}

.whatsapp-balloon-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #C4A46A;
}

.whatsapp-balloon-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #25D366;
    box-shadow: 0 0 8px #25D366;
    display: inline-block;
}

.whatsapp-chat-balloon-close {
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    border-radius: 50%;
    padding: 0;
    margin: 0;
    transition: color 0.2s, background-color 0.2s;
}

.whatsapp-chat-balloon-close:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.12);
}

.whatsapp-balloon-body {
    font-size: 13px;
    color: #E8E6E3;
    line-height: 1.45;
    margin-bottom: 9px;
    font-weight: 400;
}

.whatsapp-balloon-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 600;
    color: #25D366;
    text-decoration: none;
    transition: opacity 0.2s;
}

.whatsapp-chat-balloon:hover .whatsapp-balloon-action {
    opacity: 0.85;
}

@media (max-width: 768px) {
    .whatsapp-chat-container {
        right: 20px;
        bottom: calc(30px + env(safe-area-inset-bottom, 0px));
    }

    .whatsapp-chat-button {
        width: 52px;
        height: 52px;
    }

    .whatsapp-chat-button svg {
        width: 26px;
        height: 26px;
    }

    .whatsapp-chat-balloon {
        width: min(88vw, 310px);
        right: 0;
        bottom: calc(100% + 14px);
        padding: 13px 15px;
        font-size: 13px;
    }

    .whatsapp-chat-balloon::after {
        right: 21px;
    }
}
