.avesta-whatsapp-float {
    position: fixed;
    z-index: 700;
    left: max(20px, env(safe-area-inset-left));
    bottom: calc(22px + env(safe-area-inset-bottom));
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #152238;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    isolation: isolate;
    animation: avestaWaEnter .48s cubic-bezier(.2,.75,.25,1) .25s both;
}

.avesta-whatsapp-float__icon {
    position: relative;
    z-index: 1;
    display: grid;
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    place-items: center;
    border: 1px solid rgba(255,255,255,.32);
    border-radius: 50%;
    background: linear-gradient(145deg, #24cf78, #0da85a);
    color: #fff;
    box-shadow: 0 8px 22px rgba(14, 165, 89, .3), 0 2px 6px rgba(15, 23, 42, .12);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.avesta-whatsapp-float__icon::before {
    position: absolute;
    inset: -5px;
    border: 1px solid rgba(25, 190, 105, .3);
    border-radius: inherit;
    content: "";
    pointer-events: none;
    animation: avestaWaPulse 3.1s ease-out 1.2s infinite;
}

.avesta-whatsapp-float__icon i {
    font-size: 29px;
    line-height: 1;
}

.avesta-whatsapp-float__prompt {
    position: relative;
    display: flex;
    min-width: 0;
    max-width: min(236px, calc(100vw - 102px));
    flex-direction: column;
    gap: 2px;
    padding: 10px 15px 11px;
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 16px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 8px 26px rgba(15, 23, 42, .13), 0 2px 5px rgba(15, 23, 42, .05);
    transform-origin: left center;
    animation: avestaWaPromptIn .38s cubic-bezier(.2,.75,.25,1) .55s both,
               avestaWaPromptOut .35s ease 8.8s forwards;
}

.avesta-whatsapp-float__prompt::before {
    position: absolute;
    top: 50%;
    left: -6px;
    width: 10px;
    height: 10px;
    border-bottom: 1px solid rgba(226, 232, 240, .9);
    border-left: 1px solid rgba(226, 232, 240, .9);
    background: #fff;
    content: "";
    transform: translateY(-50%) rotate(45deg);
}

.avesta-whatsapp-float__prompt strong,
.avesta-whatsapp-float__prompt span {
    position: relative;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.avesta-whatsapp-float__prompt strong {
    color: #1d2939;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.avesta-whatsapp-float__prompt span {
    color: #697586;
    font-size: 12px;
    line-height: 1.35;
}

.avesta-whatsapp-float:hover .avesta-whatsapp-float__icon,
.avesta-whatsapp-float:focus-visible .avesta-whatsapp-float__icon {
    filter: saturate(1.08);
    box-shadow: 0 10px 27px rgba(14, 165, 89, .36), 0 3px 8px rgba(15, 23, 42, .14);
    transform: translateY(-2px);
}

.avesta-whatsapp-float:hover .avesta-whatsapp-float__prompt,
.avesta-whatsapp-float:focus-visible .avesta-whatsapp-float__prompt {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0) scale(1);
    animation: none;
}

.avesta-whatsapp-float:focus-visible {
    border-radius: 999px;
    outline: 3px solid rgba(14, 165, 89, .36);
    outline-offset: 5px;
}

@keyframes avestaWaEnter {
    from { opacity: 0; transform: translateY(12px) scale(.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes avestaWaPulse {
    0% { opacity: .55; transform: scale(.92); }
    75%, 100% { opacity: 0; transform: scale(1.28); }
}

@keyframes avestaWaPromptIn {
    from { visibility: hidden; opacity: 0; transform: translateX(-7px) scale(.98); }
    to { visibility: visible; opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes avestaWaPromptOut {
    to { visibility: hidden; opacity: 0; transform: translateX(-5px) scale(.98); }
}

@media (max-width: 767px) {
    .avesta-whatsapp-float {
        left: max(14px, env(safe-area-inset-left));
        bottom: calc(16px + env(safe-area-inset-bottom));
    }

    /* Keep the control clear of mobile booking bars and the reservation footer. */
    body.page-global-reservation .avesta-whatsapp-float,
    body.page-transfer-search .avesta-whatsapp-float,
    body.page-ferry-search .avesta-whatsapp-float {
        bottom: calc(112px + env(safe-area-inset-bottom));
    }

    .avesta-whatsapp-float__icon {
        width: 48px;
        height: 48px;
        flex-basis: 48px;
    }

    .avesta-whatsapp-float__icon i { font-size: 25px; }
    .avesta-whatsapp-float__prompt { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .avesta-whatsapp-float,
    .avesta-whatsapp-float__icon::before,
    .avesta-whatsapp-float__prompt {
        animation: none;
    }

    .avesta-whatsapp-float__prompt {
        visibility: hidden;
        opacity: 0;
    }

    .avesta-whatsapp-float:hover .avesta-whatsapp-float__prompt,
    .avesta-whatsapp-float:focus-visible .avesta-whatsapp-float__prompt {
        visibility: visible;
        opacity: 1;
    }
}
