/***
=============================================
    Floating WhatsApp button

    Rendered only when a WhatsApp number has been set in the admin panel,
    so every rule here is scoped to .whatsapp-float and costs nothing on a
    page that does not show the button.

    The colour is WhatsApp's own brand green rather than .thm-bg-clr: the
    button is recognised by its colour, so it should not follow the theme
    colour switcher the way the Donate button does.
=============================================
***/

.whatsapp-float {
    align-items: center;
    background-color: #25d366;
    border-radius: 50%;
    bottom: 25px;
    color: #ffffff;
    display: flex;
    font-size: 32px;
    height: 55px;
    justify-content: center;
    line-height: 1;
    position: fixed;
    right: 15px;
    text-align: center;
    transition: all 300ms ease;
    width: 55px;
    z-index: 99999999;
    box-shadow: 0px 8px 23px -6px rgba(27, 27, 27, 1);
}

.whatsapp-float:hover,
.whatsapp-float:focus {
    background-color: #1ebe5b;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-2px);
}

.whatsapp-float:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 2px;
}

/* The label is there for screen readers and for the hover tooltip that the
   title attribute provides; the button itself stays a plain icon circle. */
.whatsapp-float-text {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

/* Both floating buttons sit in the bottom right corner, so the scroll-to-top
   is lifted above the WhatsApp button whenever the WhatsApp button renders.
   The selector depends on the two being siblings in the layout - the partial
   is included immediately before .scroll-to-top for exactly this reason. */
.whatsapp-float ~ .scroll-to-top {
    bottom: 92px;
}

@media only screen and (max-width: 767px) {
    .whatsapp-float {
        font-size: 28px;
        height: 50px;
        width: 50px;
    }

    .whatsapp-float ~ .scroll-to-top {
        bottom: 85px;
    }
}

@media print {
    .whatsapp-float {
        display: none;
    }
}
