/* ==========================================================
   FLOATING WHATSAPP CONTACT BUTTON
   ========================================================== */

.floating-whatsapp-button {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1085;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    text-decoration: none;
    filter: drop-shadow(0 10px 22px rgba(10, 45, 28, 0.28));
}

.floating-whatsapp-icon {
    position: relative;
    width: 62px;
    height: 62px;
    flex: 0 0 62px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #ffffff;
    border-radius: 50%;
    color: #ffffff;
    background-color: #25d366;
    font-size: 31px;
    line-height: 1;
    box-shadow: 0 10px 28px rgba(37, 211, 102, 0.42);
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.floating-whatsapp-icon::before,
.floating-whatsapp-icon::after {
    content: "";
    position: absolute;
    inset: -7px;
    z-index: -1;
    border: 2px solid rgba(37, 211, 102, 0.45);
    border-radius: 50%;
    opacity: 0;
    animation: whatsappPulse 2.4s ease-out infinite;
}

.floating-whatsapp-icon::after {
    animation-delay: 1.2s;
}

.floating-whatsapp-label {
    max-width: 0;
    padding: 0;
    overflow: hidden;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(12px);
    color: #ffffff;
    background-color: #1c9c4d;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    line-height: 40px;
    box-shadow: 0 8px 22px rgba(18, 98, 49, 0.24);
    transition: max-width 0.25s ease, padding 0.25s ease, opacity 0.2s ease, transform 0.25s ease;
}

.floating-whatsapp-button:hover,
.floating-whatsapp-button:focus {
    color: #ffffff;
    text-decoration: none;
}

.floating-whatsapp-button:hover .floating-whatsapp-icon,
.floating-whatsapp-button:focus-visible .floating-whatsapp-icon {
    transform: translateY(-2px) scale(1.04);
    background-color: #20bd5a;
    box-shadow: 0 14px 34px rgba(37, 211, 102, 0.5);
}

.floating-whatsapp-button:hover .floating-whatsapp-label,
.floating-whatsapp-button:focus-visible .floating-whatsapp-label {
    max-width: 180px;
    padding: 0 16px;
    opacity: 1;
    transform: translateX(0);
}

.floating-whatsapp-button:focus-visible {
    outline: none;
}

.floating-whatsapp-button:focus-visible .floating-whatsapp-icon {
    outline: 3px solid rgba(37, 211, 102, 0.3);
    outline-offset: 4px;
}

@keyframes whatsappPulse {
    0% {
        transform: scale(0.88);
        opacity: 0.7;
    }

    70%,
    100% {
        transform: scale(1.35);
        opacity: 0;
    }
}

@media (max-width: 767.98px) {
    .floating-whatsapp-button {
        right: 16px;
        bottom: 16px;
    }

    .floating-whatsapp-icon {
        width: 56px;
        height: 56px;
        flex-basis: 56px;
        font-size: 28px;
    }

    .floating-whatsapp-label {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .floating-whatsapp-icon,
    .floating-whatsapp-label {
        transition: none;
    }

    .floating-whatsapp-icon::before,
    .floating-whatsapp-icon::after {
        animation: none;
    }
}

@media print {
    .floating-whatsapp-button {
        display: none !important;
    }
}
