﻿.chat-fab-stack {
    position: fixed;
    bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

    .chat-fab-stack.fab-left {
        left: 16px;
    }

    .chat-fab-stack.fab-right {
        right: 16px;
    }

@media (min-width: 481px) {
    .chat-fab-stack.fab-right {
        bottom: calc(max(16px, env(safe-area-inset-bottom)) + 96px);
    }
}

.chat-fab {
    width: 56px;
    height: 56px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(0,0,0,.25);
    transition: transform .12s ease, filter .12s ease;
    -webkit-tap-highlight-color: transparent;
    pointer-events: auto;
    position: relative;
    will-change: transform, filter;
}

    .chat-fab:hover {
        filter: brightness(1.06);
        transform: translateZ(0) scale(1.04);
    }

    .chat-fab:active {
        transform: scale(.98);
    }

    .chat-fab.wa {
        background: #25D366;
    }

    .chat-fab.tg {
        background: #229ED9;
    }

@media (max-width: 480px) {
    .chat-fab {
        width: 52px;
        height: 52px;
    }

    .chat-fab-stack.fab-right {
        bottom: calc(max(16px, env(safe-area-inset-bottom)) + 80px);
    }
}

.chat-fab svg {
    width: 24px;
    height: 24px;
    display: block;
}

    .chat-fab svg path,
    .chat-fab svg circle,
    .chat-fab svg rect,
    .chat-fab svg polygon {
        fill: currentColor !important;
        stroke: none;
    }

.chat-fab.attn-burst::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: 0 0 0 0 rgba(255,255,255,.55);
    animation: fab-ping 1.1s ease-out 3;
}

@keyframes fab-ping {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255,255,255,.55);
    }

    60% {
        transform: scale(1.12);
        box-shadow: 0 0 0 12px rgba(255,255,255,0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255,255,255,0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .chat-fab,
    .chat-fab::after {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}
