/* ==========================================================================
   WhatsApp-Button (alle Seiten, Markup in include/footer.php)

   Ersetzt den bisherigen Balken aus style.css (.zenter / .social). Eigene
   Klassennamen, damit die alten Regeln nicht mehr greifen – auch wenn ein
   Browser style.css noch zwischengespeichert hat.

   Sitzt auf derselben senkrechten Achse wie der „Top"-Button
   (button.scroltop: rechts 15 px, unten 15 px, 55 × 55 px) direkt darüber.
   ========================================================================== */
.wa-float {
    position: fixed;
    right: 15px;
    bottom: 85px;                 /* 15 + 55 (Top-Button) + 15 Abstand */
    z-index: 998;                 /* über dem Inhalt, unter dem Top-Button (999) */
    display: flex;
    flex-direction: row-reverse;  /* Symbol rechts, Text wächst nach links */
    align-items: center;
    height: 56px;
    border-radius: 28px;
    background-color: #25d366;    /* WhatsApp-Grün */
    color: #fff;
    text-decoration: none;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18), 0 2px 6px rgba(0, 0, 0, .12);
    animation: wa-pulse 4s ease-out 2s infinite;
    transition: background-color .3s ease, box-shadow .3s ease, transform .3s ease;
}

.wa-float:hover,
.wa-float:focus,
.wa-float:active {
    color: #fff;
    text-decoration: none;
}

.wa-float__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    font-size: 30px;
    line-height: 1;
}

.wa-float__label {
    max-width: 0;
    opacity: 0;
    padding-left: 0;
    overflow: hidden;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: .3px;
    transition: max-width .45s cubic-bezier(.2, .65, .3, 1),
                padding-left .45s cubic-bezier(.2, .65, .3, 1),
                opacity .3s ease;
}

/* Beschriftung fährt nur mit Maus bzw. Tastatur aus – auf dem Handy bleibt es der Kreis */
@media (hover: hover) and (pointer: fine) {
    .wa-float:hover {
        background-color: #1ebe5b;
        transform: translateY(-2px);
        box-shadow: 0 10px 24px rgba(0, 0, 0, .22), 0 3px 8px rgba(0, 0, 0, .14);
        animation: none;
    }

    .wa-float:hover .wa-float__label {
        max-width: 240px;
        padding-left: 22px;
        opacity: 1;
    }
}

.wa-float:focus-visible {
    outline: 3px solid #000;
    outline-offset: 3px;
    animation: none;
}

.wa-float:focus-visible .wa-float__label {
    max-width: 240px;
    padding-left: 22px;
    opacity: 1;
}

/* dezenter Ring, der alle 4 Sekunden einmal nach außen läuft */
@keyframes wa-pulse {
    0% {
        box-shadow: 0 6px 18px rgba(0, 0, 0, .18), 0 2px 6px rgba(0, 0, 0, .12), 0 0 0 0 rgba(37, 211, 102, .55);
    }
    35%,
    100% {
        box-shadow: 0 6px 18px rgba(0, 0, 0, .18), 0 2px 6px rgba(0, 0, 0, .12), 0 0 0 16px rgba(37, 211, 102, 0);
    }
}

/* Handy: etwas kleiner; der Top-Button ist dort nur 30 × 30 px */
@media (max-width: 480px) {
    .wa-float {
        right: 15px;
        bottom: 60px;             /* 15 + 30 + 15 */
        height: 52px;
        border-radius: 26px;
    }

    .wa-float__icon {
        flex-basis: 52px;
        width: 52px;
        height: 52px;
        font-size: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wa-float,
    .wa-float__label {
        animation: none;
        transition: none;
    }
}

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