/*
Theme Name: Enfold Child
Description: A <a href='http://codex.wordpress.org/Child_Themes'>Child Theme</a> for the Enfold Wordpress Theme. If you plan to do a lot of file modifications we recommend to use this Theme instead of the original Theme. Updating will be much easier then.
Version: 1.0
Author: Kriesi
Author URI: http://www.kriesi.at
Template: enfold
*/



/*Add your own styles here:*/

/* Allinea a sinistra l'animated number "48 ore" */
.avia-animated-number {
    text-align: left !important;
    justify-content: flex-start !important;
}

.avia-animated-number-inner {
    align-items: flex-start !important;
}

/* Icona + numero allineati a sinistra */
.avia-animated-number-title {
    display: flex;
    justify-content: flex-start !important;
    text-align: left !important;
}

/* Testo sotto il numero */
.avia-animated-number-content {
    text-align: left !important;
}
/* Inserisce uno spazio tra numero e suffisso nell'Animated Number */
.avia-animated-number .avia-no-number:before{
  content: " ";
}
.avia-animated-number .avia-no-number{
  margin-left: .15em;
}
.avia-animated-number .avia-no-number:before{
  content: "";
}

/* =================================================
   NEOS FORM PREMIUM con ICONE
   Classe da assegnare: neos-form-premium
   ================================================= */

/* --- 1. STRUTTURA PREMIUM & PULIZIA --- */
.neos-form-premium {
    background: #ffffff !important;
    border-radius: 6px;
    padding: 35px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    max-width: 480px;
    margin: 0 auto;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Nascondiamo le label originali per un look più pulito (opzionale, se vuoi tienile) */
.neos-form-premium label {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #0e3c63 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

/* --- 2. STILE CAMPI INPUT (Base) --- */
.neos-form-premium input[type='text'],
.neos-form-premium input[type='email'], 
.neos-form-premium input[type='tel'], 
.neos-form-premium select, 
.neos-form-premium textarea {
    background-color: #f7f9fc !important;
    border: 1px solid #cfdbe6 !important;
    border-radius: 4px !important;
    padding: 14px 15px 14px 45px !important; /* Spazio a sinistra per l'icona */
    font-size: 15px !important;
    color: #333 !important;
    width: 100%;
    margin-bottom: 5px;
    transition: all 0.3s ease;
    
    /* Configurazione Icone SVG Base */
    background-repeat: no-repeat !important;
    background-position: 15px center !important;
    background-size: 18px 18px !important;
}

/* Focus State */
.neos-form-premium input:focus, 
.neos-form-premium select:focus, 
.neos-form-premium textarea:focus {
    background-color: #fff !important;
    border-color: #0e3c63 !important;
    box-shadow: 0 0 0 3px rgba(14, 60, 99, 0.1) !important;
    outline: none;
}

/* --- 3. ASSEGNAZIONE ICONE (Metodo Bulletproof Enfold) --- */
/* Usiamo i selettori 'name' che Enfold genera in ordine. 
   Questo risolve il problema delle icone tutte uguali. */

/* NOME (Primo campo) */
.neos-form-premium input[name*="avia_1_1"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230e3c63'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E") !important;
}

/* COGNOME (Secondo campo) */
.neos-form-premium input[name*="avia_2_1"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230e3c63'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E") !important;
}

/* TELEFONO (Terzo campo - Icona Cornetta) */
/* Questo forzerà l'icona telefono anche se Enfold lo vede come testo */
.neos-form-premium input[name*="avia_3_1"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230e3c63'%3E%3Cpath d='M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z'/%3E%3C/svg%3E") !important;
}

/* EMAIL (Quarto campo - Icona Busta) */
.neos-form-premium input[name*="avia_4_1"], 
.neos-form-premium input[type='email'] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230e3c63'%3E%3Cpath d='M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z'/%3E%3C/svg%3E") !important;
}

/* INTERESSE (Select) */
.neos-form-premium select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230e3c63'%3E%3Cpath d='M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z'/%3E%3C/svg%3E"), 
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230e3c63'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") !important;
    background-position: 15px center, right 15px center !important;
    background-size: 18px 18px, 24px 24px !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* NOTE (Textarea - Icona Matita) */
.neos-form-premium textarea {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230e3c63'%3E%3Cpath d='M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z'/%3E%3C/svg%3E") !important;
    background-position: 15px 15px !important;
}

/* --- 4. BOTTONE PREMIUM --- */
.neos-form-premium input[type='submit'] {
    background-color: #0e3c63 !important;
    color: #fff !important;
    border: none !important;
    padding: 16px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px !important;
    width: 100%;
    margin-top: 15px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(14, 60, 99, 0.3);
    transition: transform 0.2s, background-color 0.2s;
}

.neos-form-premium input[type='submit']:hover {
    background-color: #082d4d !important;
    transform: translateY(-2px);
}
/* --- STILE MESSAGGIO DI SUCCESSO (Post-Invio) --- */

/* --- MESSAGGIO DI SUCCESSO (FIX DEFINITIVO) --- */

/* --- FIX ULTIMATIVO MESSAGGIO DI SUCCESSO --- */

/* --- FIX MESSAGGIO DI SUCCESSO (Targeting Diretto) --- */

/* 1. TRASFORMIAMO IL TITOLO IN UNA CARD */
/* Agiamo direttamente sull'H1 generato da Enfold */
#top h1.avia-form-success {
    background-color: #ffffff !important; /* Forza sfondo bianco */
    color: #0e3c63 !important; /* Forza testo Blu Scuro */
    
    border: 1px solid #d1d9e0 !important;
    border-left: 6px solid #4cd964 !important; /* Bordo verde successo */
    border-radius: 6px !important;
    
    padding: 50px 30px !important; /* Spaziatura interna abbondante */
    margin-top: 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    
    font-size: 22px !important;
    font-weight: 700 !important;
    text-align: center !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15) !important;
    
    /* Flex per centrare l'icona che aggiungiamo dopo */
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 2. ICONA SPUNTA VERDE (Inserita via CSS) */
#top h1.avia-form-success::before {
    content: '';
    display: block;
    width: 60px;
    height: 60px;
    margin-bottom: 25px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%234cd964'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

/* 3. PULIZIA CONTENITORI EXTRA */
/* Rimuove bordi doppi che Enfold potrebbe aggiungere attorno al messaggio */
#top .ajaxresponse {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
}
/* --- GESTIONE ERRORI DI VALIDAZIONE --- */


/* Regola universale: Se il contenitore (p) o l'input hanno classe 'error', colora di rosso */
.neos-form-premium p.error input,
.neos-form-premium p.error select,
.neos-form-premium p.error textarea,
.neos-form-premium input.error, 
.neos-form-premium select.error, 
.neos-form-premium textarea.error {
    border-color: #e74c3c !important; /* Forza il bordo rosso */
    border-width: 2px !important;      /* Bordo un po' più spesso */
    background-color: #fff0f0 !important; /* Sfondo rosato leggero */
    color: #c0392b !important;         /* Testo rosso scuro */
}

/* Gestione Placeholders (testo fantasma) quando c'è errore */
.neos-form-premium p.error input::-webkit-input-placeholder { color: #e74c3c; opacity: 0.6; }
.neos-form-premium p.error input::-moz-placeholder { color: #e74c3c; opacity: 0.6; }

/* Animazione Vibrazione (Visto che ti piaceva e funzionava) */
.neos-form-premium .error {
    animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* --- 1. STILE DEL BOTTONE TONDO (ICON) --- */
.neos-wa-trigger {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: flex; /* Flex per centrare l'icona */
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 99999;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.neos-wa-trigger:hover {
    transform: scale(1.1);
}

/* Animazione Pulse per il bottone */
.neos-wa-trigger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid #25D366;
    opacity: 0;
    z-index: -1;
    animation: neosPulse 2s infinite;
}

@keyframes neosPulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* --- 2. STILE DELLA CARD (WIDGET) --- */
.neos-wa-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 300px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    z-index: 99999;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    overflow: hidden;
    animation: slideUp 0.4s ease-out;
}

.neos-wa-header {
    background: #25D366;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
}

.neos-wa-title { font-weight: 700; font-size: 16px; }

.neos-wa-close {
    cursor: pointer;
    font-size: 28px;
    line-height: 20px;
    opacity: 0.8;
}
.neos-wa-close:hover { opacity: 1; }

.neos-wa-body { padding: 20px; background: #f9f9f9; }

.neos-wa-message-bubble {
    background: #fff;
    padding: 12px 15px;
    border-radius: 0 12px 12px 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    color: #555;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 20px;
    position: relative;
    border: 1px solid #eee;
}

.neos-wa-message-bubble::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 10px 10px 0;
    border-color: transparent #fff transparent transparent;
}

.neos-wa-button-action {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #25D366;
    color: #fff !important;
    text-decoration: none !important;
    padding: 12px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
    transition: transform 0.2s;
}

.neos-wa-button-action:hover {
    transform: translateY(-2px);
    background: #20b857;
}

.neos-wa-button-action svg { margin-right: 10px; }

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

/* Mobile Responsive */
@media (max-width: 480px) {
    .neos-wa-widget {
        width: 85%;
        right: 50%;
        transform: translateX(50%);
        bottom: 20px;
        left: auto;
        right: 20px;
        transform: none;
    }
}