.towb-has-whatsapp-button {
    --towb-offset-x: 22px;
    --towb-offset-y: 22px;
    --towb-size: 54px;
    --towb-gap: 10px;
    --towb-radius: 999px;
    --towb-bg: #25d366;
    --towb-bg-hover: #1db954;
    --towb-text: #ffffff;
}

.towb-floating-whatsapp {
    position: fixed;
    z-index: 9995;
    bottom: calc(var(--towb-offset-y) + env(safe-area-inset-bottom, 0px));
    display: inline-flex;
    align-items: center;
    gap: var(--towb-gap);
    min-height: var(--towb-size);
    max-width: min(280px, calc(100vw - 44px));
    padding: 0 18px 0 14px;
    border-radius: var(--towb-radius);
    background: var(--towb-bg);
    color: var(--towb-text);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateZ(0);
}

body.towb-has-whatsapp-button a.towb-floating-whatsapp {
    display: inline-flex;
}

.towb-floating-whatsapp--right {
    right: calc(var(--towb-offset-x) + env(safe-area-inset-right, 0px));
}

.towb-floating-whatsapp--left {
    left: calc(var(--towb-offset-x) + env(safe-area-inset-left, 0px));
}

.towb-floating-whatsapp:hover,
.towb-floating-whatsapp:focus-visible {
    background: var(--towb-bg-hover);
    color: var(--towb-text);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
}

.towb-floating-whatsapp:focus-visible {
    outline: 3px solid rgba(37, 211, 102, 0.28);
    outline-offset: 4px;
}

.towb-floating-whatsapp__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
}

.towb-floating-whatsapp__icon svg {
    width: 30px;
    height: 30px;
    display: block;
    fill: currentColor;
}

.towb-floating-whatsapp__label {
    display: inline-block;
    white-space: nowrap;
}

.towb-floating-whatsapp--icon-only-desktop {
    width: var(--towb-size);
    min-width: var(--towb-size);
    padding: 0;
    justify-content: center;
}

.towb-floating-whatsapp--icon-only-desktop .towb-floating-whatsapp__label {
    display: none;
}

@media (max-width: 782px) {
    .towb-has-whatsapp-button {
        --towb-offset-x: 14px;
        --towb-offset-y: 16px;
        --towb-size: 52px;
        padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    }

    .towb-floating-whatsapp {
        width: var(--towb-size);
        min-width: var(--towb-size);
        height: var(--towb-size);
        min-height: var(--towb-size);
        padding: 0;
        justify-content: center;
    }

    .towb-floating-whatsapp__label {
        display: none;
    }

    .towb-floating-whatsapp__icon,
    .towb-floating-whatsapp__icon svg {
        width: 29px;
        height: 29px;
    }
}

@media (min-width: 783px) {
    .towb-floating-whatsapp {
        width: auto;
        height: auto;
    }

    .towb-floating-whatsapp__label {
        display: inline-block;
    }

    .towb-floating-whatsapp--icon-only-desktop .towb-floating-whatsapp__label {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .towb-floating-whatsapp {
        transition: none;
    }

    .towb-floating-whatsapp:hover,
    .towb-floating-whatsapp:focus-visible {
        transform: none;
    }
}
