/* Gli Ulivi WhatsApp Styles */

/* ============================= */
/* PULSANTE FLOTTANTE */
/* ============================= */
.gli-ulivi-wa-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99999;
}

.gli-ulivi-wa-float a {
    display: flex;
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #25d366, #128c7e);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.gli-ulivi-wa-float a:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.gli-ulivi-wa-float svg {
    width: 32px;
    height: 32px;
    fill: white;
}

.gli-ulivi-wa-float .wa-tooltip {
    position: absolute;
    bottom: 70px;
    right: 0;
    background: white;
    color: #333;
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.gli-ulivi-wa-float:hover .wa-tooltip {
    opacity: 1;
    bottom: 75px;
}

/* Animazione Pulse */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* ============================= */
/* PULSANTI INLINE */
/* ============================= */
.gli-ulivi-wa-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #25d366;
    color: white !important;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none !important;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    cursor: pointer;
    border: none;
}

.gli-ulivi-wa-button:hover {
    background: #128c7e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    color: white !important;
}

.gli-ulivi-wa-button .wa-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Stile Large */
.gli-ulivi-wa-button.style-large {
    padding: 16px 32px;
    font-size: 18px;
    border-radius: 30px;
}

.gli-ulivi-wa-button.style-large .wa-icon {
    width: 24px;
    height: 24px;
}

/* Stile Minimal */
.gli-ulivi-wa-button.style-minimal {
    background: transparent;
    color: #25d366 !important;
    border: 2px solid #25d366;
    padding: 10px 20px;
}

.gli-ulivi-wa-button.style-minimal:hover {
    background: #25d366;
    color: white !important;
}

/* ============================= */
/* FORM WHATSAPP */
/* ============================= */
.gli-ulivi-wa-form-container {
    max-width: 500px;
    margin: 30px auto;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 15px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.gli-ulivi-wa-form-container h3 {
    color: #25d366;
    text-align: center;
    margin-bottom: 25px;
    font-size: 24px;
}

.wa-form-group {
    margin-bottom: 20px;
}

.wa-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.wa-form-group input,
.wa-form-group select,
.wa-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: white;
}

.wa-form-group input:focus,
.wa-form-group select:focus,
.wa-form-group textarea:focus {
    outline: none;
    border-color: #25d366;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
}

.wa-form-group textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.wa-form-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(45deg, #25d366, #128c7e);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wa-form-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}

.wa-form-submit .wa-icon {
    width: 20px;
    height: 20px;
}

.wa-form-success {
    padding: 15px;
    background: #d4edda;
    color: #155724;
    border-radius: 8px;
    text-align: center;
    margin-top: 20px;
    animation: slideInUp 0.3s ease;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================= */
/* RESPONSIVE */
/* ============================= */
@media screen and (max-width: 768px) {
    .gli-ulivi-wa-float {
        bottom: 20px;
        right: 20px;
    }
    
    .gli-ulivi-wa-float a {
        width: 50px;
        height: 50px;
    }
    
    .gli-ulivi-wa-float svg {
        width: 26px;
        height: 26px;
    }
    
    .gli-ulivi-wa-form-container {
        padding: 20px;
        margin: 20px;
    }
    
    .gli-ulivi-wa-button {
        font-size: 14px;
        padding: 10px 20px;
    }
}

/* ============================= */
/* INTEGRAZIONE ELEMENTOR */
/* ============================= */
.elementor-widget-gli_ulivi_whatsapp {
    text-align: center;
}

.elementor-widget-gli_ulivi_whatsapp .gli-ulivi-wa-button {
    display: inline-flex;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .gli-ulivi-wa-form-container {
        background: #2a2a2a;
        color: #f0f0f0;
    }
    
    .wa-form-group label {
        color: #f0f0f0;
    }
    
    .wa-form-group input,
    .wa-form-group select,
    .wa-form-group textarea {
        background: #333;
        border-color: #555;
        color: #f0f0f0;
    }
    
    .gli-ulivi-wa-float .wa-tooltip {
        background: #333;
        color: #f0f0f0;
    }
}

/* ============================= */
/* ANIMAZIONI AGGIUNTIVE */
/* ============================= */
.wa-shake {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.wa-bounce {
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
