body.pvc-whatsapp-enabled {
    --pvc-floating-size: 56px;
    --pvc-floating-bottom: calc(22px + env(safe-area-inset-bottom, 0px));
    --pvc-floating-right: calc(22px + env(safe-area-inset-right, 0px));
    --pvc-floating-toolbar: 0px;
    --pvc-floating-product: 0px;
}

body.pvc-whatsapp-enabled:has(.wd-sticky-btn.wd-sticky-btn-shown) {
    --pvc-floating-product: var(--wd-sticky-btn-height, 95px);
}

a.pvc-whatsapp {
    position: fixed;
    right: var(--pvc-floating-right);
    bottom: calc(var(--pvc-floating-bottom) + var(--pvc-floating-toolbar) + var(--pvc-floating-product));
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: var(--pvc-floating-size);
    height: var(--pvc-floating-size);
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    box-shadow: 0 3px 14px rgb(15 35 58 / 18%);
    line-height: 1;
    text-decoration: none;
    transition: none;
}

a.pvc-whatsapp:hover,
a.pvc-whatsapp:focus-visible {
    background: #20bd5a;
    color: #fff;
    text-decoration: none;
}

a.pvc-whatsapp:focus-visible {
    outline: 3px solid #15354e;
    outline-offset: 4px;
}

.pvc-whatsapp__icon::before {
    /* Official WhatsApp glyph bundled in Woodmart's social icon font. */
    content: "\f175";
    display: block;
    font-family: "woodmart-font";
    font-size: 30px;
    font-weight: 400;
    font-style: normal;
    line-height: 1;
}

.pvc-whatsapp__tooltip {
    position: absolute;
    top: 50%;
    right: calc(100% + 12px);
    visibility: hidden;
    padding: 10px 13px;
    background: #15354e;
    color: #fff;
    font: 600 13px/1.3 Arial, sans-serif;
    white-space: nowrap;
    transform: translateY(-50%);
    pointer-events: none;
}

a.pvc-whatsapp:hover .pvc-whatsapp__tooltip,
a.pvc-whatsapp:focus-visible .pvc-whatsapp__tooltip {
    visibility: visible;
}

/* Preserve the native scroll button, with a 16 px gap above WhatsApp. */
body.pvc-whatsapp-enabled .scrollToTop,
body.pvc-whatsapp-enabled .scrollToTop.wd-sticky-btn-shown {
    inset-inline-end: calc(var(--pvc-floating-right) + 3px);
    bottom: calc(var(--pvc-floating-bottom) + var(--pvc-floating-toolbar) + var(--pvc-floating-product) + var(--pvc-floating-size) + 16px);
}

@media (max-width: 1024px) {
    body.pvc-whatsapp-enabled {
        --pvc-floating-size: 52px;
        --pvc-floating-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        --pvc-floating-right: calc(16px + env(safe-area-inset-right, 0px));
    }

    body.pvc-whatsapp-enabled.sticky-toolbar-on {
        --pvc-floating-toolbar: 55px;
    }

    body.pvc-whatsapp-enabled .scrollToTop,
    body.pvc-whatsapp-enabled .scrollToTop.wd-sticky-btn-shown {
        inset-inline-end: calc(var(--pvc-floating-right) + 6px);
    }

    .pvc-whatsapp__tooltip {
        display: none;
    }
}
