
.modal_sfondo {
    position: fixed;
    z-index: 9999; /* Aumentato per sicurezza sopra le mappe */
    left: 0; top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    display: none; /* Gestito da JS */
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}


.auth-container {
    width: 90%;
    max-width: 450px;
    max-height: 90vh; /* Impedisce al modal di uscire dallo schermo */
    overflow-y: auto; /* Permette di scrollare se i filtri sono tanti */
    padding: 30px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.auth-header {
    display: flex;
    justify-content: center;
}

.auth-header h2 {
    color: var(--acqua5);
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.auth-header p {
    color: var(--acqua6);
    font-size: 0.95rem;
    margin-bottom: 25px;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

.input-group input, 
.input-group textarea, 
.input-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #eee;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s;
    font-family: inherit; /* Importante: le textarea di default usano un font diverso */
    box-sizing: border-box; /* Assicura che il padding non sballi la larghezza */
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
    border-color: var(--acqua2);
    outline: none;
}

.input-group {
    margin-bottom: 25px;
    text-align: left;
    display: flex;  
    flex-direction: column;
    gap: 15px;
}

.back-link {
    display: block;
    margin-top: 20px;
    color: #0083b0;
    text-decoration: none;
    font-size: 0.9rem;
}

/* Container specifico per le checkbox */
.features-grid {
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 10px; 
    background: #f9f9f9; 
    padding: 15px; 
    border-radius: 10px; 
    font-size: 0.85rem;
    max-height: 200px; /* Limita l'altezza dell'area servizi */
    overflow-y: auto;  /* Aggiunge scroll solo se ci sono troppe voci */
    border: 1px solid #eee;
}

.features-grid label {
    font-weight: normal !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.filter-section {
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.filter-section h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    color: var(--acqua5);
    margin-bottom: 12px;
}

.input-grid {
    display: flex;
    gap: 10px;
}

.input-grid .field {
    flex: 1;
    display: flex;
    flex-direction: column; /* Incolonna Label sopra e Select sotto */
    align-items: flex-start; /* Tutto allineato a sinistra */
    gap: 5px;
}

.features-scroll-area {
    max-height: none; 
    overflow-y: visible; 
    background: #fdfdfd;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #f0f0f0;
    gap: 10px;
}

.feature-category-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #999;
    margin: 10px 0 5px 0;
    font-weight: bold;
    border-bottom: 1px solid #f0f0f0;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 0.85rem;
    cursor: pointer;
    font-weight: normal !important;
}

/* Ogni contenitore occupa il 100% */
.btn-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}


/* Contenitore principale dei bottoni in fondo al modal */
.modal-footer {
    margin-top: 30px;
    display: flex;
    align-items: center;
    flex-direction: column; /* Incolonna i div */
    gap: 12px;              /* Spazio verticale tra i bottoni */
    justify-content: center;
    width: 100%;
    color: #555;
}