.whatsappPopup{
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999999;
}

.button.whatsappButton {
    background-color: var(--themePrimary3, #69BF7A);
    border-radius: 40px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    border: none;
    color: #fff;
    text-decoration: none;
}
.button.whatsappButton svg{
    display: block;
    object-fit: contain;
    width: 20px;
    height: 20px;
    fill: white;
}
.button.whatsappButton.floating {
    z-index: 4;
    position: relative;
    float: right;
    margin-right: 10px;
    animation: whatsappPulse 4s ease-in-out infinite;
    cursor: pointer;
}
.button.whatsappButton:not(.floating){
    width:100%;
}

.button.whatsappButton.floating {
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    width: 50px;
    min-width: 50px;
    height: 50px;
    padding: 0;
    border: none;
}
.button.whatsappButton.floating:hover svg {
    transform: scale(1.1);
}

.whatsappPopup .whatsappWindow{
    transform:translateY(0);
    opacity:1.0;
    transition:all .3s ease-in-out;
    position: relative;
    border-radius: 10px;
    width: 360px;
    max-width: calc(100% - 20px);
    box-shadow: 0px 12px 24px 0px rgb(0 0 0 / 7%);
    margin: 15px auto 25px;
}
.whatsappPopup .whatsappWindow:not(.shown){
    transform:translateY(10px);
    opacity:0.0;
}
.whatsappPopup .whatsappWindow .whatsapp-bar{
    display:flex;
    height: 70px;
    background-color: var(--themePrimary, #144734);
    border-top-right-radius: 10px;
    border-top-left-radius: 10px;
    padding: 10px;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    backdrop-filter: blur(7px);
}
.whatsappPopup .whatsappWindow .whatsapp-bar .whatsapp-image{
    background-size:cover;
    background-position: center;
    background-color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    flex: none;
    position: relative;
}
.whatsappPopup .whatsappWindow .whatsapp-bar .whatsapp-image::after{
    content:'';
    position:absolute;
    background-color: var(--themePrimary3, #69BF7A);
    border-radius:50%;
    width: 11px;
    height: 11px;
    bottom: 0px;
    right:0;
    border: 2px solid var(--themePrimary, #144734);
}
.whatsappPopup .whatsappWindow .whatsapp-bar div:not(.whatsapp-image){
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    font-size: 14px;
    color: #fff;
}
.whatsappPopup .whatsappWindow .whatsapp-bar div span{
    font-size: 11.5px;
    opacity: .8;
}

.whatsappPopup .whatsappWindow .whatsapp-chat{
    padding: 20px 20px 20px 10px;
    background-color: var(--themeBg, #F7F2EE);
    position: relative;
    overflow: auto;
    max-height: 382px;
}
.whatsappPopup .whatsappWindow .whatsapp-chat .balloon{
    box-sizing: border-box;
    padding: 7px 14px 6px;
    position: relative;
    transition: all 0.3s ease 0s;
    opacity: 1.0;
    transform-origin: center top;
    z-index: 2;
    color: rgb(17, 17, 17);
    font-size: 15px;
    line-height: 1.39;
    border-radius: 0px 8px 8px;
    background-color: rgb(255, 255, 255);
    margin-top: 4px;
    flex: none;
    box-shadow: rgba(0, 0, 0, 0.13) 0px 1px 0.5px;
}
.whatsappPopup .whatsappWindow .whatsapp-chat .balloon p{
    color: rgb(17, 17, 17);
    font-size: 15px;
    margin: 0;
}
.whatsappPopup .whatsappWindow .whatsapp-chat .balloon:not(.typing){
    max-width: calc(100% - 66px);
}

.whatsappPopup .whatsappWindow .whatsapp-chat .balloon.typing{
    background-color: rgb(255, 255, 255);
    width: 52.5px;
    height: 32px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    flex: none;
    box-shadow: rgba(0, 0, 0, 0.13) 0px 1px 0.5px;
}
.whatsappPopup .whatsappWindow .whatsapp-chat .balloon.typing:not(.shown){
    display:none;
}
.whatsappPopup .whatsappWindow .whatsapp-chat .balloon.typing .dot{
    height: 5px;
    width: 5px;
    margin: 0px 2px;
    background-color: rgb(182, 181, 186);
    border-radius: 50%;
    position: relative;
    animation-name: whatsappDots;
    animation-duration: 1.2s;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
    display: inline-block !important;
}
.whatsappPopup .whatsappWindow .whatsapp-chat .balloon.typing .dot:nth-of-type(2){
    animation-delay:0.3s;
}
.whatsappPopup .whatsappWindow .whatsapp-chat .balloon.typing .dot:nth-of-type(3){
    animation-delay:0.6s;
}

.whatsappPopup .whatsappWindow .whatsapp-chat .balloon:not(.shown){
    opacity:0.0;
}

@keyframes whatsappDots{
    0%  { background-color: rgb(182, 181, 186); }
    15% { background-color: rgb(17, 17, 17); }
    25% { background-color: rgb(182, 181, 186); }
}

.whatsapp-buttonBar {
    background-color: var(--themePrimary, #144734);
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom-right-radius: 10px;
    border-bottom-left-radius: 10px;
    backdrop-filter: blur(7px);
}
.whatsapp-closeButton {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    opacity: 0.4;
    cursor: pointer;
    transition: all 0.3s ease 0s;
    display: flex !important;
    align-items: center;
    justify-content: center;
}
.whatsapp-closeButton:hover{
    opacity: .8;
}
.whatsapp-closeButton::before, .whatsapp-closeButton::after {
    content: "";
    position: absolute;
    width: 12px;
    height: 2px;
    background-color: #fff;
    display: block;
    border-radius: 2px;
}
.whatsapp-closeButton::before {
    transform: rotate(45deg);
}
.whatsapp-closeButton::after {
    transform: rotate(-45deg);
}

@media screen and (max-width:769px){
    .whatsappPopup{
        right: 8px;
    }
    .whatsappPopup .whatsappWindow{
        margin:0px auto 15px;
    }
}

@keyframes whatsappPulse {
    0%   { transform: scale(1); }
    20%  { transform: scale(1.1); }
    30%  { transform: scale(1); }
    40%  { transform: scale(1.2); }
    50%  { transform: scale(1); }
    100% { transform: scale(1); }
}
