.ul_question_ul.front_question_ul > li {
    border: 1px solid #dfdfdf;
    color: #333;
    float: left;
    font-size: 14px;
    margin-bottom: 20px;
    width: 100%;
}

.faq_question_name {
    cursor: pointer;
    float: left;
    padding: 10px 30px 10px 15px;
    position: relative;
    width: 100%;
    color: #333;
    font-size: 15px;
	font-weight: 700 !important;
}
.faq_list {
    float: left;
    padding: 0;
    width: 65%;
    margin: 0;
}
.faqs_content {
    text-align: left;
	
}
.faq_captcha_image > span {
    cursor: pointer;
}
.faq_answer, .faq_answer p {
    font-size: 14px;
}
.faq_ask_a_question {
    float: left;
    padding: 0 15px;
    width: 35%;
}

.faq_form .hidden {
    display: none;
}

.faq_group_ul li {
    border-right: 1px solid #dfdfdf;
    float: left;
    margin-bottom: 10px;
    margin-right: 10px;
    margin-top: 5px;
}

.faq_group_li > a.nav-link {
    padding: 0 10px 0 0;
}

.faq_group_li:not(.open) > a.nav-link {
    color: #333
}

.faq_list > .faq_group_ul {
    border: medium none;
    display: block;
    float: left;
    margin-bottom: 20px;
    width: 100%;
}

.faq_content > .title_block {
    margin-bottom: 20px;
    text-transform: uppercase;
}

#form_ask_a_question .title_block {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    text-transform: capitalize;
}

.ask_a_question_desc {
    color: #888;
    display: block;
    font-size: 14px;
    line-height: 22px;
    margin-bottom: 20px;
}

.faq_form {
    border: 1px solid #dfdfdf;
    padding: 20px;
}

.faq_group_li > a:hover {
    border-color: transparent !important;
    outline: none !important;
    -webkit-outline: none !important;
}

.faq_form .form-control {
    background-color: #fff;
}

.faq_question_name::before {
    border-left: 1px solid #666;
    border-top: 1px solid #666;
    color: #999;
    content: "";
    float: right;
    font-family: Fontawesome;
    font-size: 20px;
    height: 10px;
    margin-top: 3px;
    transform: rotate(-135deg);
    -webkti-transform: rotate(-135deg);
    -ms-transform: rotate(-135deg);
    -o-transform: rotate(-135deg);
    width: 10px;
    margin-right: -17px;
}

.faq_question_name.open::before {
    margin-top: 9px;
    transform: rotate(45deg);
    -webkti-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    -o-transform: rotate(45deg);
}

.faq_answer.front_answer {
    border-top: 1px solid #dfdfdf;
    color: #999;
    display: none;
    float: left;
    font-style: italic;
    padding: 10px 15px;
    width: 100%;
}

.faq_answer.front_answer.open {
    display: block;
}

.faq_tab_pane.open {
    display: block;
}

.faq_tab_pane {
    display: none;
}

.faq_group_li .faq_nav_link {
    cursor: pointer;
    padding-right: 10px;
    text-transform: uppercase;
}

.faq_group_li.open .faq_nav_link,
.faq_group_li .faq_nav_link:hover {
    color: #2fb5d2;
}

#faq_captcha_refesh > img {
    margin-left: 5px;
    width: 18px;
}

#faq_captcha {
    margin-top: 10px;
}

#product .faq_ask_a_question {
    float: none;
    padding: 0;
    width: auto;
}

#product .faq_list {
    float: none;
    margin: 0 -15px;
    padding: 0 15px;
    width: auto;
}
.faq_on_product .title_block {
    margin-bottom: 20px;
    text-align: left;
}
.faq_form input {
    font-size: 14px;
}
.faq_on_produc .faq_question_li {
    border: 1px solid #dfdfdf;
    float: left;
    margin-bottom: 15px;
    position: relative;
    width: 100%;
}
.faq_on_product {
    font-size: 14px;
}
.faq_form .alert.alert-danger {
    background: transparent;
    border: none;
    padding: 5px 0 0;
    color: #c80000;
}
.faq_on_product .faq_answer {
    border-top: 1px solid #dfdfdf;
    color: #777;
    display: none;
    font-style: italic;
    padding: 10px 15px;
    font-size: 14px;
	font-weight: 700 !important;
}
.faq_on_product .faq_answer p{
    font-size: 14px;
	color: #355e9e !important;
}
button#faq_send_mail,
.faq_on_product button {
    outline: none!important;
    box-shadow: none!important;
}
#form_ask_a_question label sub {
    border: 0 none;
    bottom: 0;
    color: red;
}
.faq_form textarea {
    min-height: 100px;
    min-width: 100%;
}
.faq_on_product .faq_forms.faq_overlay {
    background-color: rgba(0, 0, 0, 0.8);
    bottom: 0;
    left: 0;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 10000;
    overflow: auto;
}

.faq_on_product .faq_ask_a_question .faq_pop_up {
    background-color: #fff;
    left: 50%;
    position: relative;
    top: 5%;
    transform: translateX(-50%);
    -webkit-transform: translateX(-50%);
    -ms-transform: translateX(-50%);
    -o-transform: translateX(-50%);
    margin-bottom: 70px;
    width: 500px;
    max-width: 90%;
}

.faq_on_product .faq_answer.open {
    display: block;
}

.faq_list.faq_notshow_askform {
    width: 100%;
}
.row > .faq_list {
    padding-left: 15px;
    padding-right: 15px;
}
.faq_ask_a_question .hidden {
    display: none;
}

.faq_on_product .faq_question_li {
    border: 1px solid #dfdfdf;
    margin-bottom: 15px;
    position: relative;
    width: 100%;
}

.faq_on_product .faq_close {
    font-size: 0;
    height: 20px;
    position: absolute;
    right: 2px;
    top: 2px;
    transform: rotate(45deg);
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    -o-transform: rotate(45deg);
    width: 20px;
    cursor: pointer;
}

.faq_on_product .faq_question_name {
    display: block;
    float: none;
    cursor: pointer;
}

.faq_on_product .faq_close::before {
    background-color: #666;
    content: "";
    float: left;
    height: 15px;
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translate3d(-50%, -50%, 0px);
    -o-transform: translate3d(-50%, -50%, 0px);
    -ms-transform: translate3d(-50%, -50%, 0px);
    -moz-transform: translate3d(-50%, -50%, 0px);
    -webkit-transform: translate3d(-50%, -50%, 0px);
    width: 3px;
}

.faq_on_product .faq_close::after {
    background-color: #666;
    content: "";
    height: 3px;
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translate3d(-50%, -50%, 0px);
    -o-transform: translate3d(-50%, -50%, 0px);
    -ms-transform: translate3d(-50%, -50%, 0px);
    -moz-transform: translate3d(-50%, -50%, 0px);
    -webkit-transform: translate3d(-50%, -50%, 0px);
    width: 15px;
}

.faq_loading {
    width: 17px;
    -webkit-animation: spin 2s linear infinite;
    -moz-animation: spin 2s linear infinite;
    animation: spin 2s linear infinite;
}

@-moz-keyframes spin {
    100% {
        -moz-transform: rotate(360deg);
    }
}

@-webkit-keyframes spin {
    100% {
        -webkit-transform: rotate(360deg);
    }
}

@keyframes spin {
    100% {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

@media (max-width: 991px) {
    .faq_list {
        width: 100%;
    }

    .faq_ask_a_question {
        width: 100%;
    }
}
/* ============================================================
    BLOCCO OTTIMIZZATO: LEGGIBILITÀ, POPUP, X DINAMICA E ALERT
   ============================================================ */

/* 1. LEGGIBILITÀ (IPHONE & DESKTOP) */
.faq_on_product .faq_question_name, .faq_question_name {
    position: relative !important;
    padding-right: 45px !important;
    display: block !important;
    text-align: left !important;
}

.faq_question_name::before {
    position: absolute !important;
    right: 15px !important;
    top: 50% !important;
    transform: translateY(-50%) rotate(-135deg) !important;
    margin: 0 !important;
    border-color: #666 !important;
}

.faq_question_name.open::before {
    transform: translateY(-50%) rotate(45deg) !important;
}

.faq_on_product .faq_answer, .faq_answer.front_answer {
    font-style: italic !important;
    font-size: 15px !important;
    line-height: 1.6 !important;
    color: #555 !important;
    padding: 15px !important;
    -webkit-font-smoothing: antialiased !important;
    font-weight: 400 !important;
}

/* 2. INTERFACCIA FAQ (BARRA AZZURRA) */
.faq_on_product #faq-toggle-click.faq-toggle-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    background-color: #f1f8ff !important;
    border: 1px solid #d1e1f5 !important;
    border-radius: 8px !important;
    padding: 12px 15px !important;
    cursor: pointer !important;
    margin-bottom: 15px !important;
}

.faq_on_product #faq-toggle-click.faq-toggle-header:hover { background-color: #e6f2ff !important; }
.faq_on_product #faq-toggle-click strong { font-size: 15px !important; color: #333 !important; }

/* 3. POPUP (DESKTOP) E PULSANTI GIALLI */
@media (min-width: 768px) {
    .faq_ask_a_question_form .faq_ask_a_question_form_content {
        max-width: 500px !important;
        margin: 50px auto !important;
        border-radius: 15px !important;
        padding: 30px !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.3) !important;
    }
    .faq_ask_a_question { text-align: left !important; float: none !important; display: block !important; margin-top: 20px !important; }
}

#faq_send_mail, #ask_a_question, .faq_ask_a_question button, .blockcart-modal .tvall-inner-btn {
    background-color: #ffc107 !important;
    color: #000 !important;
    border-radius: 999px !important;
    border: none !important;
    padding: 12px 30px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    transition: all 0.3s ease-in-out !important;
}

#faq_send_mail:hover, #ask_a_question:hover { background-color: #e0a800 !important; transform: translateY(-2px) !important; }

/* 4. FIX FINALE X DINAMICA (CENTRATA E BLU ISTITUZIONALE) */
/* FIX FINALE X POPUP: UNIFORMATA DESKTOP E MOBILE */
.faq_ask_a_question_form .faq_close {
    all: unset !important;
    display: block !important;
    position: absolute !important;
    right: 15px !important;
    top: 15px !important;
    width: 34px !important;
    height: 34px !important;
    background-color: #f1f1f1 !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    z-index: 99999 !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important; /* Animazione più fluida */
    font-size: 0 !important;
    text-indent: -9999px !important;
    overflow: hidden !important;
}

.faq_ask_a_question_form .faq_close::before,
.faq_ask_a_question_form .faq_close::after {
    content: '' !important;
    position: absolute !important;
    width: 18px !important;
    height: 2px !important;
    background-color: #444 !important;
    top: 50% !important;
    left: 50% !important;
    transition: background-color 0.3s ease !important;
}

.faq_ask_a_question_form .faq_close::before { transform: translate(-50%, -50%) rotate(45deg) !important; }
.faq_ask_a_question_form .faq_close::after { transform: translate(-50%, -50%) rotate(-45deg) !important; }

/* Rotazione attiva sia su Hover che su Active (per Mobile) */
.faq_ask_a_question_form .faq_close:hover,
.faq_ask_a_question_form .faq_close:active {
    background-color: #2c5282 !important; /* Blu istituzionale */
    transform: rotate(180deg) !important;
}

.faq_ask_a_question_form .faq_close:hover::before,
.faq_ask_a_question_form .faq_close:hover::after,
.faq_ask_a_question_form .faq_close:active::before,
.faq_ask_a_question_form .faq_close:active::after { 
    background-color: #ffffff !important; 
}

/* ============================================================
   5. FIX LOGICO ERRORI (VERSIONE FORZATA)
   ============================================================ */

/* Regola 1: Nascondi se ha la classe hidden*/
.faq_ask_a_question_form .hidden, 
.faq_form .hidden,
.faq-err-fix.hidden {
    display: none !important;
} 

/* Regola 2: Forza la comparsa se NON ha la classe hidden */
/* Usiamo un selettore molto lungo per avere la massima priorità */
div.faq_ask_a_question_form .form-group span.faq-err-fix:not(.hidden),
div.faq_ask_a_question_form .footer span.faq-err-fix:not(.hidden),
div.faq_ask_a_question_form .footer span.faq-msg-ok:not(.hidden) {
    display: block !important;
    visibility: visible !important;
    color: #d93025 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    margin: 5px 0 10px 0 !important;
    opacity: 1 !important;
    height: auto !important;
}

/* Colore specifico per il successo */
div.faq_ask_a_question_form .footer span.faq-msg-ok:not(.hidden) {
    color: #28a745 !important;
}

/* Forza l'esplosione visiva quando hidden viene rimosso dal JS */
.faq_ask_a_question_form .faq-err-fix:not(.hidden) {
    display: block !important;
    color: #d93025 !important;
    visibility: visible !important;
}

/* Base comune per i pulsanti FAQ */
.faq-btn-custom {
    background-color: #ffc107 !important;
    color: #000 !important;
    border-radius: 999px !important;
    height: 48px !important;
    padding: 0 20px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 12px !important; /* Leggermente più piccolo per evitare che il testo tagli */
    text-decoration: none !important;
    border: none !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
    white-space: nowrap !important; /* Impedisce al testo di andare a capo dentro il tasto */
	box-shadow: 4px 4px 4px rgba(0, 0, 0, .14);
}

/* Colore Verde WA */
.faq-btn-wa {
    background-color: #25D366 !important;
    color: #fff !important;
}

/* Fix Icone */
.faq-icon-fixed {
    margin-right: 8px !important;
    font-size: 18px !important;
    display: flex !important;
    align-items: center !important;
}

/* Hover */
.faq-btn-custom:hover { background-color: #e0a800 !important; transform: translateY(-2px); color: #000 !important; }
.faq-btn-wa:hover { background-color: #128C7E !important; color: #fff !important; }

/* FIX MOBILE (Sotto i 480px) */
@media (max-width: 480px) {
    .faq_ask_a_question {
        flex-direction: column !important; /* Li mette uno sotto l'altro */
        align-items: stretch !important; /* Li allarga entrambi alla stessa larghezza */
    }
    
    .faq-btn-custom {
        width: 100% !important; /* Pulsanti a larghezza piena su mobile */
        margin-bottom: 5px;
    }
}


/* =====================================================
   FIX FAQ – CONTENITORE ELASTICO SENZA ROMPERE IL TOGGLE
   ===================================================== */

/* contenitore FAQ gestito da JS */
.faqs_content {
    overflow-y: auto !important;   /* scroll verticale */
    overflow-x: hidden !important;
    max-height: 950px;             /* mantiene il limite JS */
}

/* migliora lo scroll su mobile */
.faqs_content {
    -webkit-overflow-scrolling: touch;
}

/* evita che le risposte vengano tagliate */
.faq_answer {
    overflow: visible !important;
}

/* spazio finale per non tagliare l’ultima FAQ */
.faq_list {
    padding-bottom: 20px;
}

