/* --- STILE AREA TEST (BIANCA) --- */
.titolo-fase-test {
    color: #C85A28;
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 24px;
}

.wizard-line-separator {
    width: 60px;
    height: 3px;
    background-color: #C85A28;
    margin-bottom: 40px;
}

.domanda-box {
    margin-bottom: 45px;
    padding-bottom: 35px;
    border-bottom: 1px dashed #e5e5e5;
}

.domanda-box h4 {
    font-weight: 600;
    line-height: 1.5;
    color: #333333;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
}

/* Il quadratino arancione col numero della domanda */
.dropcap-num {
    background-color: #C85A28;
    color: #ffffff;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 4px;
    margin-right: 15px;
    font-size: 16px;
    display: inline-block;
    flex-shrink: 0;
}

/* Gruppo Risposte Radio */
.risposte-group {
    margin-left: 45px;
    margin-bottom: 20px;
}

.risposte-group label {
    display: block;
    font-weight: 400;
    font-size: 16px;
    color: #555555;
    margin: 12px 0;
    cursor: pointer;
    transition: color 0.2s ease;
}

.risposte-group label:hover {
    color: #C85A28;
}

.risposte-group input[type="radio"] {
    margin-right: 10px;
    transform: scale(1.1);
    vertical-align: middle;
}

/* --- ACCORDION NATIVO PER DETTAGLI --- */
details.approfondimento-test {
    margin-left: 45px;
    background-color: #fcfcfc;
    border: 1px solid #eaeaea;
    border-radius: 6px;
    transition: all 0.3s ease;
}

details.approfondimento-test[open] {
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border-color: #C85A28;
}

summary {
    padding: 12px 15px;
    font-size: 14px;
    font-weight: 600;
    color: #C85A28;
    cursor: pointer;
    outline: none;
    list-style: none; /* Rimuove freccia nativa */
}

summary::-webkit-details-marker {
    display: none; /* Rimuove freccia nativa per Safari */
}

/* Icona personalizzata prima del testo del summary (opzionale) */
summary::before {
    content: "\f0a9"; /* Icona freccia destra FontAwesome */
    font-family: "FontAwesome";
    margin-right: 10px;
    display: inline-block;
    transition: transform 0.2s ease;
}

details[open] summary::before {
    transform: rotate(90deg); /* Ruota la freccia in basso quando aperto */
}

.details-body {
    padding: 15px 20px 20px 20px;
    border-top: 1px solid #f5f5f5;
    font-size: 15px;
    line-height: 1.6;
    color: #666666;
}

.details-body p {
    text-align: justify;
    margin-bottom: 12px;
}

.details-list {
    list-style: none;
    padding-left: 0;
    margin: 15px 0;
}

.details-list li {
    margin-bottom: 8px;
    text-align: justify;
}

.details-list li i {
    color: #C85A28;
    margin-right: 10px;
    font-size: 12px;
}

/* --- BOTTONI WIZARD IN FONDO --- */
.wizard-buttons-container {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 30px;
}

.btn-wizard-primary {
    background-color: #e07b00; /* C85A28 era più scuro */
    color: #ffffff;
    font-weight: 700;
    padding: 14px 35px;
    font-size: 16px;
    border-radius: 30px;
    border: none;
    box-shadow: 0 4px 10px rgba(255, 140, 0, 0.2);
    transition: all 0.3s ease;
    margin-left: auto; /* Se manca il bottone "Indietro", spinge "Continua" a destra */
}

.btn-wizard-primary:hover {
    background-color: #C85A28; /* e07b00 era più chiaro */
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(255, 140, 0, 0.3);
}

.btn-wizard-secondary {
    background-color: #f5f5f5;
    color: #666666;
    font-weight: 600;
    padding: 14px 35px;
    font-size: 16px;
    border-radius: 30px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.btn-wizard-secondary:hover {
    background-color: #eaeaea;
    color: #333333;
}

/* --- STILI PER LA PAGINA DEI RISULTATI FINALI --- */
.riepilogo-container {
    text-align: center;
    background-color: #fcfcfc;
    border: 1px solid #eee;
    padding: 30px;
    border-radius: 8px;
}

.risultato-box {
    color: white;
    padding: 20px;
    border-radius: 6px;
    margin: 20px auto;
    max-width: 500px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.risultato-box h2 {
    color: white !important;
    margin: 0;
    font-weight: 700;
}

.testo-avvertenza {
    font-size: 14px;
    color: #666;
    max-width: 700px;
    margin: 0 auto 30px auto;
    text-align: justify;
}

.contatori-lista {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.contatori-lista li {
    font-size: 16px;
    background-color: #fff;
    border: 1px solid #ddd;
    padding: 10px 15px;
    border-radius: 4px;
}

.contatori-lista i {
    color: #C85A28;
}

/* Stili per le etichette di risposta delle singole domande */
.label-rapporto {
    display: inline-block;
    padding: 6px 14px;
    color: white;
    font-weight: bold;
    font-size: 14px;
    border-radius: 4px;
    margin-left: 45px; /* Allineato sotto il testo della domanda */
}

/* Classi per i colori dinamici assegnati da JavaScript */
.bg-rosso { background-color: #dc3545 !important; }
.bg-giallo { background-color: #ffc107 !important; color: #333 !important; } /* Testo scuro sul giallo */
.bg-verde { background-color: #28a745 !important; }
.bg-grigio { background-color: #6c757d !important; }

/* --- ACCORDION MACRO-SEZIONI DEL RAPPORTO FINALE --- */
details.sezione-rapporto-box {
    margin-bottom: 25px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    overflow: hidden;
}

summary.sezione-rapporto-header {
    padding: 18px 24px;
    font-size: 18px;
    font-weight: 700;
    color: #333333;
    background-color: #f8f9fa;
    cursor: pointer;
    border-bottom: 1px solid #e2e8f0;
    list-style: none;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Spinge il titolo a sx e la freccia a dx */
}

summary.sezione-rapporto-header::-webkit-details-marker {
    display: none; /* Rimuove freccia Safari */
}

/* Icona a freccia personalizzata usando FontAwesome sulla destra */
summary.sezione-rapporto-header::after {
    content: "\f107"; 
    font-family: "FontAwesome";
    font-size: 20px;
    color: #888;
    transition: transform 0.3s ease;
}

/* Stile speciale quando la macro-sezione viene aperta */
details.sezione-rapporto-box[open] summary.sezione-rapporto-header {
    border-bottom: 1px solid #C85A28;
    background-color: #fffbf7; /* Leggerissimo riflesso arancione */
    color: #C85A28;
}

details.sezione-rapporto-box[open] summary.sezione-rapporto-header::after {
    transform: rotate(180deg); /* La freccia punta in alto ad accordion aperto */
    color: #C85A28;
}

.sezione-rapporto-body {
    padding: 30px 24px;
    background-color: #ffffff;
}

/* Uniforma la grandezza delle domande nel report a quella dei suggerimenti */
.sezione-rapporto-body .domanda-box p {
    font-size: 15px;
}