/* =====================================
   LEGENDA RESPONSIVE
===================================== */
.legend-mobile {
	/*background: rgba(255,255,255,0.6);*/
	padding: 10px;
	border-radius: 14px;
	box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}
/* pulsante mobile */
.legend-toggle {
	display: none;
	cursor: pointer;
	font-weight: 600;
	padding: 10px 14px;
	border-radius: 10px;
	background: #fff;
	border: 1px solid #ccc;
	user-select: none;
	text-align: center;
}
/* contenuto */
.legend-content {
	display: block;
}
/* scala percentuali */
.legend-scale {
	display: flex;
	justify-content: space-between;
	margin-left: 80px;
	margin-bottom: 8px;
	font-weight: bold;
	font-size: 12px;
}
/* righe legenda */
.legend-row {
	display: flex;
	align-items: center;
	/*gap: 10px;*/
	margin-bottom: 6px;
}
/* label */
.legend-label {
	font-size: 12px;
	width: 80px;
	/*font-weight: bold;*/
	line-height: 1.1;
}
.legend-label-candidato {
	font-weight: bold;
}
/* box colore */
.legend-row i {
	display: block;
	width: 100px;
	height: 14px;
	flex-shrink: 0;
	border: 1px solid rgba(0,0,0,0.15);
	border-radius: 2px;
}
/* separatore */
.legend-separator {
	height: 12px;
}

/* =====================================
   MOBILE
===================================== */
@media (max-width: 768px) {
	.legend-toggle {
		display: block;
		padding: 8px 10px;
		font-size: 14px;
	}
	.legend-content {
		display: none;
		margin-top: 8px;
		max-height: 45vh;
		overflow-y: auto;
	}
	.legend-mobile.open .legend-content {
		display: block;
	}
	.legend-mobile {
		max-width: 220px;
		font-size: 11px;
		padding: 8px;
	}
	.legend-row {
		gap: 6px;
		margin-bottom: 4px;
	}
	.legend-label {
		width: 82px;
		font-size: 11px;
		line-height: 1;
	}
	.legend-row i {
		width: 95px;
		height: 12px;
		border-radius: 2px;
	}
	.legend-scale {
		margin-left: 88px;
		margin-bottom: 6px;
		font-size: 10px;
	}
	.legend-separator {
		height: 6px;
	}
	.leaflet-bottom.leaflet-right {
		margin-bottom: 8px;
		margin-right: 8px;
	}
}

/* =========================
   INFO PANEL MOBILE
========================= */
@media (max-width: 768px) {
    /* contenitore pannello */
    .info {
        padding: 8px !important;
        border-radius: 12px;
        /*background: rgba(255,255,255,0.96);*/
        box-shadow: 0 2px 10px rgba(0,0,0,0.18);
        max-width: 320px;
        line-height: 1 !important;
    }
    /* titolo */
    .info h4 {
        margin: 0 0 8px 0;
        font-size: 12px ;
        font-weight: 700;
        line-height: 1 !important;
    }
	
    /* sottotesto summary */
    .summary {
        font-size: 11px;
        line-height: 1 !important;
    }
    /* =========================
       TABELLA
    ========================= */
    #tabella-ris {
        width: auto !important;
        border-collapse: collapse;
        font-size: 11px;
        line-height: 1.05;
    }
    #tabella-ris th,
    #tabella-ris td {
        padding: 3px 4px !important;
        vertical-align: middle;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    #tabella-ris thead th {
        font-size: 10px;
        font-weight: 700;
        padding-bottom: 4px !important;
    }
    #tabella-ris td {
        font-weight: 600;
    }
    /* colonna nome */
    #tabella-ris td:first-child,
    #tabella-ris th:first-child {
        width: 40%;
    }
    /* colonna voti */
    #tabella-ris td:last-child,
    #tabella-ris th:last-child {
        width: 60%;
    }
    /* numeri */
    #tabella-ris td.dx {
        text-align: right;
        font-variant-numeric: tabular-nums;
    }
    /* quadratino colore */
    #tabella-ris i {
        font-size: 9px;
        margin-right: 3px;
        vertical-align: middle;
    }
    /* percentuale */
    #tabella-ris .perc {
        font-size: 10px;
        opacity: .8;
    }
    /* aggiornamento */
    .dataora {
        margin-top: 8px;
        padding-top: 6px;
        border-top: 1px solid rgba(0,0,0,0.08);
        font-size: 10px;
        line-height: 1.15;
        opacity: .9;
    }
    .dataora span {
        font-weight: 600;
    }
    /* margini leaflet */
    .leaflet-top.leaflet-left {
        margin-top: 8px;
        margin-left: 8px;
    }
}

@media (max-width: 768px) {
	#nota {
		font-size:80%;
	}

	#nota-asterisco {
		font-size:120%;
	}
}
