/* Stili per il widget WhatsApp nel frontend */

#whatsapp-widget {
    position: fixed;
    z-index: 9999;
    transition: all 0.3s ease;
}

/* Posizioni del widget */
.whatsapp-bottom-right {
    bottom: 20px;
    right: 20px;
}

.whatsapp-bottom-left {
    bottom: 20px;
    left: 20px;
}

.whatsapp-top-right {
    top: 20px;
    right: 20px;
}

.whatsapp-top-left {
    top: 20px;
    left: 20px;
}

/* Link del widget - Bottone orizzontale compatto */
.whatsapp-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    background: #25d366;
    padding: 8px 14px;
    border-radius: 30px;
    box-shadow: 0 2px 6px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    position: relative;
    overflow: hidden;
}

.whatsapp-link:hover {
    background: #128c7e;
    box-shadow: 0 3px 8px rgba(37, 211, 102, 0.4);
    transform: translateY(-1px);
}

.whatsapp-link:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.3);
    border-radius: 30px;
}

/* Icona del widget - Cerchio bianco compatto */
.whatsapp-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #25d366;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.whatsapp-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Testo del bottone compatto */
.whatsapp-text {
    color: white;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    line-height: 1.2;
}

/* Logo personalizzato */
.whatsapp-icon img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
}

/* Animazione di pulsazione (opzionale, più discreta) */
.whatsapp-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.15);
    animation: whatsapp-pulse 2s infinite;
    z-index: -1;
}

@keyframes whatsapp-pulse {
    0% {
        transform: scale(1);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.3;
    }
    100% {
        transform: scale(1.1);
        opacity: 0;
    }
}

/* Rimuovi tooltip - il testo è già visibile nel bottone */

/* Responsive */
@media (max-width: 768px) {
    .whatsapp-icon {
        width: 28px;
        height: 28px;
        min-width: 28px;
        min-height: 28px;
    }
    
    .whatsapp-icon svg {
        width: 16px;
        height: 16px;
    }
    
    .whatsapp-link {
        padding: 7px 12px;
        gap: 7px;
    }
    
    .whatsapp-text {
        font-size: 12px;
    }
    
    .whatsapp-bottom-right,
    .whatsapp-bottom-left {
        bottom: 15px;
    }
    
    .whatsapp-bottom-right {
        right: 15px;
    }
    
    .whatsapp-bottom-left {
        left: 15px;
    }
    
    .whatsapp-top-right,
    .whatsapp-top-left {
        top: 15px;
    }
    
    .whatsapp-top-right {
        right: 15px;
    }
    
    .whatsapp-top-left {
        left: 15px;
    }
}

@media (max-width: 480px) {
    .whatsapp-icon {
        width: 26px;
        height: 26px;
        min-width: 26px;
        min-height: 26px;
    }
    
    .whatsapp-icon svg {
        width: 14px;
        height: 14px;
    }
    
    .whatsapp-link {
        padding: 6px 10px;
        gap: 6px;
    }
    
    .whatsapp-text {
        font-size: 11px;
    }
    
    .whatsapp-bottom-right,
    .whatsapp-bottom-left {
        bottom: 10px;
    }
    
    .whatsapp-bottom-right {
        right: 10px;
    }
    
    .whatsapp-bottom-left {
        left: 10px;
    }
}

/* Accessibilità */
@media (prefers-reduced-motion: reduce) {
    .whatsapp-link::before {
        animation: none;
    }
    
    .whatsapp-link:hover {
        transform: none;
    }
    
    .whatsapp-link,
    .whatsapp-icon {
        transition: none !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .whatsapp-link {
        background: #25d366;
    }
    
    .whatsapp-link:hover {
        background: #128c7e;
    }
}