/* Stile base */
body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #f4f7f9;
    color: #333;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
}

.container {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    width: 100%;
}

h1 {
    text-align: center;
    color: #007bff;
    margin-bottom: 25px;
    font-size: 1.8em;
}

/* Casella di ricerca */
.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#streetInput {
    flex-grow: 1;
    padding: 12px 15px;
    border: 2px solid #ccc;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

#streetInput:focus {
    border-color: #007bff;
    outline: none;
}

#searchButton {
    padding: 12px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.1s;
}

#searchButton:hover {
    background-color: #0056b3;
}

#searchButton:active {
    transform: scale(0.98);
}

/* Area Risultati */
#results {
    margin-top: 25px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.result-count {
    color: #555;
    font-style: italic;
    margin-bottom: 15px;
}

.results-list {
    list-style: none;
    padding: 0;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.result-item:hover {
    background-color: #f1faff;
}

.street-name {
    font-weight: bold;
    color: #333;
    flex-grow: 1;
}

.district-info {
    font-size: 0.9em;
    color: #777;
    margin-right: 15px;
}

.primary-btn {
    padding: 8px 15px;
    background-color: #28a745; /* Verde per l'azione principale */
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s;
}

.primary-btn:hover {
    background-color: #1e7e34;
}

/* ---------------------------------------------------------------------- */
/* Stile Modal (Il Calendario) */
/* ---------------------------------------------------------------------- */

.modal {
    display: none; /* Nascosto di default */
    position: fixed;
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5); /* Sfondo semi-trasparente */
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto; /* 10% dall'alto e centrato orizzontalmente */
    padding: 30px;
    border: 1px solid #888;
    width: 80%; 
    max-width: 700px;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    animation-name: animatetop;
    animation-duration: 0.4s;
}

/* Animazione per l'apertura del modale */
@keyframes animatetop {
    from {top: -300px; opacity: 0}
    to {top: 0; opacity: 1}
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-btn:hover,
.close-btn:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.modal-title {
    color: #007bff;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
    text-align: center;
}

/* Stile Tabella Calendario */
.calendar-container {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
    table-layout: fixed;
}

.calendar-table th, .calendar-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.calendar-table th {
    background-color: #007bff;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
}

.calendar-table tr:nth-child(even) {
    background-color: #f2f2f2;
}

.calendar-table tr:hover {
    background-color: #ffe0b2; /* Evidenzia la riga al passaggio del mouse */
}

/* Styling specifico per la colonna "Rifiuti" */
.calendar-table td:last-child {
    font-weight: 500;
    color: #28a745; /* Colore verde per la raccolta */
}

.calendar-table .no-collection td:last-child {
    color: #dc3545; /* Colore rosso per NESSUNA RACCOLTA */
    font-style: italic;
    font-weight: normal;
}

/* Legenda Area */
.area-legend {
    font-size: 0.85em;
    color: #6c757d;
    text-align: center;
    border-top: 1px dashed #ccc;
    padding-top: 10px;
    margin-top: 20px;
}