.vpos-contact-widget {
    position: fixed;
    right: max(18px, calc(env(safe-area-inset-right) + 18px));
    bottom: max(18px, calc(env(safe-area-inset-bottom) + 18px));
    z-index: 2147483000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.vpos-contact-widget *,
.vpos-contact-widget *::before,
.vpos-contact-widget *::after {
    box-sizing: border-box;
}

.vpos-contact-widget__actions {
    display: grid;
    gap: 10px;
    margin-right: 7px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(14px) scale(0.94);
    transform-origin: bottom right;
    transition:
        opacity 180ms ease,
        transform 180ms ease;
}

.vpos-contact-widget.is-open .vpos-contact-widget__actions {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.vpos-contact-widget__action {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 1px solid rgba(219, 231, 251, 0.92);
    border-radius: 999px;
    background: #ffffff;
    color: #0568ff;
    box-shadow: 0 18px 44px rgba(20, 55, 110, 0.18);
    text-decoration: none;
    transition:
        background-color 160ms ease,
        border-color 160ms ease,
        color 160ms ease,
        transform 160ms ease,
        box-shadow 160ms ease;
}

.vpos-contact-widget__action:hover {
    transform: translateY(-2px);
    border-color: rgba(5, 104, 255, 0.28);
    background: #f7faff;
    color: #0058e6;
    box-shadow: 0 22px 52px rgba(20, 55, 110, 0.22);
}

.vpos-contact-widget__action:focus-visible,
.vpos-contact-widget__toggle:focus-visible {
    outline: 3px solid rgba(5, 104, 255, 0.32);
    outline-offset: 4px;
}

.vpos-contact-widget__action--whatsapp {
    color: #15a85f;
}

.vpos-contact-widget__action--email {
    color: #0b1430;
}

.vpos-contact-widget__action svg {
    width: 23px;
    height: 23px;
    display: block;
}

.vpos-contact-widget__toggle {
    width: 82px;
    height: 82px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background:
        radial-gradient(circle at 35% 20%, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0) 38%),
        linear-gradient(145deg, #ffffff, #dceaff);
    box-shadow:
        0 18px 50px rgba(5, 104, 255, 0.28),
        0 0 0 5px rgba(255, 255, 255, 0.98),
        0 0 0 8px rgba(5, 104, 255, 0.18);
    cursor: pointer;
    overflow: hidden;
    transition:
        transform 180ms ease,
        box-shadow 180ms ease;
}

.vpos-contact-widget__toggle:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow:
        0 22px 58px rgba(5, 104, 255, 0.34),
        0 0 0 5px rgba(255, 255, 255, 0.98),
        0 0 0 8px rgba(5, 104, 255, 0.22);
}

.vpos-contact-widget.is-open .vpos-contact-widget__toggle {
    transform: scale(0.98);
}

.vpos-contact-widget__avatar {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

@media (max-width: 640px) {
    .vpos-contact-widget {
        right: max(14px, calc(env(safe-area-inset-right) + 14px));
        bottom: max(14px, calc(env(safe-area-inset-bottom) + 14px));
        flex-direction: row;
        align-items: flex-end;
        gap: 10px;
    }

    .vpos-contact-widget__actions {
        display: flex;
        gap: 9px;
        margin-right: 0;
        margin-bottom: 12px;
        transform: translateX(12px) scale(0.94);
    }

    .vpos-contact-widget.is-open .vpos-contact-widget__actions {
        transform: translateX(0) scale(1);
    }

    .vpos-contact-widget__toggle {
        width: 68px;
        height: 68px;
        box-shadow:
            0 16px 40px rgba(5, 104, 255, 0.28),
            0 0 0 4px rgba(255, 255, 255, 0.98),
            0 0 0 7px rgba(5, 104, 255, 0.16);
    }

    .vpos-contact-widget__action {
        width: 44px;
        height: 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .vpos-contact-widget__actions,
    .vpos-contact-widget__action,
    .vpos-contact-widget__toggle {
        transition: none;
    }
}
