/* ========================================
   WHATSAPP FLOATING BUTTON - Whooho Style
   Colore brand: Giallo #FFC700
   ======================================== */

.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #FFC700, #FF8A00);
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(255, 199, 0, 0.4);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    animation: pulse-aura 3s infinite;
}

/* Effetto aura pulsante */
.whatsapp-float::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(255, 199, 0, 0.3);
    animation: ripple-aura 2s infinite;
    pointer-events: none;
}

.whatsapp-float::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(255, 199, 0, 0.2);
    animation: ripple-aura 2s infinite 0.5s;
    pointer-events: none;
}

/* Animazione aura propagante */
@keyframes ripple-aura {
    0% {
        width: 100%;
        height: 100%;
        opacity: 1;
    }
    100% {
        width: 180%;
        height: 180%;
        opacity: 0;
    }
}

/* Animazione pulse sottile del bottone */
@keyframes pulse-aura {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Icona WhatsApp */
.whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: #111;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

/* Hover effect */
.whatsapp-float:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(255, 199, 0, 0.6);
}

.whatsapp-float:hover svg {
    transform: scale(1.1);
}

/* Active/Click effect */
.whatsapp-float:active {
    transform: translateY(-2px) scale(0.95);
}

/* Tooltip */
.whatsapp-tooltip {
    position: absolute;
    right: 75px;
    top: 50%;
    transform: translateY(-50%);
    background: #111;
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 0 8px 8px;
    border-color: transparent transparent transparent #111;
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
    right: 70px;
}

/* Responsive: Mobile optimization */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
    }
    
    .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }
    
    /* Nascondi tooltip su mobile */
    .whatsapp-tooltip {
        display: none;
    }
}

/* Accessibility: Focus state */
.whatsapp-float:focus {
    outline: 3px solid #FFC700;
    outline-offset: 4px;
}

/* Riduce animazione per utenti con preferenze reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .whatsapp-float,
    .whatsapp-float::before,
    .whatsapp-float::after,
    .whatsapp-float svg {
        animation: none;
        transition: none;
    }
}
