/* Stili di azzeramento base */
* { box-sizing: border-box; margin: 0; padding: 0; }
/*body { font-family: 'Segoe UI', Arial, sans-serif; background: #f0f4f8; color: #333; padding: 15px; line-height: 1.4; }*/

/* Box contenitore principale */
.container_sim {width: 100%; max-width: 1200px; background: #ffffff; margin: 0 auto 20px auto; padding: 0 15px; border-radius: 12px; /*box-shadow: 0 4px 20px rgba(0,0,0,0.08);*/ }
h1 { color: #004797; font-size: 22px; text-align: center; margin-bottom: 5px; }
.subtitle { text-align: center; font-size: 13px; color: #666; margin-bottom: 5px; }

/* Griglia a 3 colonne per schermi grandi */
.griglia-form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: end; }
.form-group { width: 100%; }

label { display: block; font-weight: 600; margin-bottom: 6px; color: #444; font-size: 13px; }
select, input { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 6px; font-size: 16px; background-color: #fafafa; height: 42px; }

select:focus, { border-color: #004797; outline: none; background-color: #fff; }
input:focus { border-color: #004797; background-color: #fff; }

/* Struttura data di nascita pensionato */
.select-group { display: flex; gap: 5px; width: 100%; }
.select-group select { flex: 1; min-width: 0; padding: 10px 5px; font-size: 13px; }

/* Forzatura su un'unica riga per i tasti della durata */
.tasti-durata-container { 
    display: flex; gap: 4px; flex-wrap: nowrap; height: 42px; align-items: center;
    overflow-x: auto; scrollbar-width: none; 
}
.tasti-durata-container::-webkit-scrollbar { display: none; }

.tasto-tondo { 
    flex: 0 0 34px; height: 34px; border-radius: 50%; border: 2px solid #004797; 
    background: #fff; color: #004797; font-weight: bold; font-size: 13px; 
    cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; 
}
.tasto-tondo:hover { background: #e6f0fa; }
.tasto-tondo.attivo { background: #004797; color: #fff; }

/* Box dei risultati a comparsa immediata */
.box-risultati { background: #f2f7fd; border-top: 4px solid #004797; padding: 20px; border-radius: 8px; margin-top: 25px; position: relative; min-height: 100px; }
.box-risultati h3 { margin-bottom: 15px; color: #00336c; font-size: 16px; padding-bottom: 5px; border-bottom: 1px solid #d0e1f5; }

/* Tabella orizzontale dei risultati calcolati */
.griglia-risultati { display: flex; flex-wrap: wrap; gap: 15px; justify-content: space-between; }
.riga-risultato { flex: 1; min-width: 140px; border-right: 1px dashed #d0e1f5; padding-right: 10px; }
.riga-risultato:last-child { border-right: none; }
.etichetta-risultato { font-size: 11px; color: #555; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.valore { font-weight: 700; color: #111; font-size: 17px; }

/* Banner per blocco del Quinto massimo di legge */
.avviso-limite { background: #fff3cd; color: #856404; padding: 10px; border-radius: 4px; font-size: 13px; margin-bottom: 15px; border: 1px solid #ffeeba; }

/* STRUTTURA E ANIMAZIONE DELLO SPINNER DI CARICAMENTO */
.loading-overlay { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 10px 0; }
.spinner {
    width: 32px; height: 32px;
    border: 4px solid #d0e1f5; border-top: 4px solid #004797;
    border-radius: 50%; animation: spin 0.8s linear infinite; margin-bottom: 8px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.loading-text { font-size: 13px; color: #004797; font-weight: 600; }

.hidden { display: none !important; }

/* REGOLE RESPONSIVE PER SMARTPHONE E TABLET */
@media (max-width: 768px) { .griglia-form { grid-template-columns: repeat(2, 1fr); gap: 15px; } }
@media (max-width: 520px) {
.form-group { width: 96%; }
    .griglia-form { grid-template-columns: unset; width:100%; /*gap: 12px;*/ }
    .griglia-risultati { flex-direction: column; gap: 10px; }
    .riga-risultato { border-right: none; border-bottom: 1px dashed #e0e8f0; padding-right: 0; padding-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
    .riga-risultato:last-child { border-bottom: none; padding-bottom: 0; }
    .etichetta-risultato { margin-bottom: 0; font-size: 13px; text-transform: none; color: #333; }
    .valore { font-size: 15px; }
}
/* Inserisci questo blocco in fondo al file simulatore_stile.css */

.box-pulsante-contatti {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px dashed #d0e1f5;
    text-align: center;
}

.box-pulsante-contatti p {
    font-size: 14px;
    color: #444;
    font-weight: 600;
    margin-bottom: 12px;
}

.bottone-contatti {
    display: inline-block;
    padding: 12px 24px;
    background: #ff8c00; /* Colore Arancione vivace per Lead Generation */
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: bold;
    font-size: 15px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(255, 140, 0, 0.3);
    transition: all 0.2s ease-in-out;
}

.bottone-contatti:hover {
    background: #e07b00;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.4);
}

/* Modifica specifica se siamo all'interno del popup mobile per allineare il tasto */
@media (max-width: 520px) {
    .bottone-contatti {
        width: 100%;
        text-align: center;
    }
}
/* Inserisci questo blocco nel tuo file simulatore_stile.css */

#box_errori_form {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 14px;
}

#box_errori_form strong {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
}

#box_errori_form ul {
    margin-left: 20px;
    line-height: 1.6;
}

/* STILI DEL POPUP MODALE (RISULTATI) */
.modal-overlay { 
    position: fixed; /* Blocca il popup sopra tutta la pagina */
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0, 0, 0, 0.6); /* Sfondo scuro semi-trasparente */
    display: flex; 
    align-items: center; 
    justify-content: center; 
    z-index: 9999; /* Lo porta in primissimo piano sopra ogni elemento */
    padding: 20px; 
}

.modal-content { 
    background: #ffffff; 
    width: 100%; 
    max-width: 600px; /* Larghezza massima del popup */
    padding: 30px 25px; 
    border-radius: 12px; 
    position: relative; 
    box-shadow: 0 5px 25px rgba(0,0,0,0.3); 
}

.modal-close { 
    position: absolute; 
    top: 10px; 
    right: 15px; 
    font-size: 28px; 
    border: none; 
    background: transparent; 
    color: #888; 
    cursor: pointer; 
}

.hidden { 
    display: none !important; /* Nasconde il popup finché non si clicca il tasto */
}
.bottone-azione { 
color: #FFF;
  background-color: #035867;
  padding: 8px 20px;
  font-size: 18px;
  width: fit-content;
  cursor:pointer;
  }
#blocco_data_inizio {
	width:94% !important;
}
.blocco-tastiera-attiva {
    overflow: hidden !important;
    height: 100vh !important;
    position: fixed !important;
    width: 100% !important;
}
.bottone-whatsapp {
    display: inline-block;
    padding: 12px 24px;
    background: #25D366; /* Verde ufficiale WhatsApp */
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: bold;
    font-size: 15px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
    transition: all 0.2s ease-in-out;
}

.bottone-whatsapp:hover {
    background: #1ebd56;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}