/**
 * WhatsApp Floating Button Component
 * Modulo CSS per pulsante WhatsApp fisso in basso a destra
 *
 * @version 1.0
 * @author Crippa Arredamenti
 */

/* Contenitore principale del pulsante WhatsApp */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

/* Effetto hover */
.whatsapp-float:hover {
    background-color: #128c7e;
    box-shadow: 2px 2px 15px rgba(0, 0, 0, 0.5);
    transform: scale(1.1);
    color: #FFF;
    display:flex !Important;
}

/* SVG WhatsApp - Garantisce centratura perfetta */
.whatsapp-float svg {
    display: block;
    width: 30px;
    height: 30px;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

/* Tooltip opzionale */
.whatsapp-float::before {
    content: "Contattaci su WhatsApp";
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #333;
    color: #fff;
    padding: 8px 15px;
    border-radius: 5px;
    white-space: nowrap;
    font-size: 14px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    font-family: 'Didact Gothic', sans-serif;
}

/* Freccia del tooltip */
.whatsapp-float::after {
    content: "";
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: #333;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

/* Mostra tooltip al hover */
.whatsapp-float:hover::before,
.whatsapp-float:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Animazione pulse per attirare l'attenzione */
@keyframes whatsapp-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Applica animazione pulse */
.whatsapp-float.pulse {
    animation: whatsapp-pulse 2s infinite;
}

/* Responsive - Mobile */
@media screen and (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 25px;
    }

    .whatsapp-float svg {
        width: 25px;
        height: 25px;
    }

    /* Nascondi tooltip su mobile */
    .whatsapp-float::before,
    .whatsapp-float::after {
        display: none;
    }
}

/* Responsive - Tablet */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .whatsapp-float {
        width: 55px;
        height: 55px;
        bottom: 25px;
        right: 25px;
        font-size: 28px;
    }

    .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }
}

/* Accessibilità - Focus per navigazione da tastiera */
.whatsapp-float:focus {
    outline: 3px solid #128c7e;
    outline-offset: 3px;
}

/* Print - Nascondi in stampa */
@media print {
    .whatsapp-float {
        display: none !important;
    }
}
