/* Mappa della fibra: solo le parti sue. Le basi comuni (colori del sito, apertura, pannelli, schede, schermo intero)
   sono in comune/stile-base.css. */
.slm-fibra .controlli-alto { width: min(340px, calc(100% - var(--slm-lato) - 80px)); min-width: 220px; }
.slm-fibra .ricerca input { width: 100%; padding: 9px 12px; font: inherit; color: var(--slm-forte); background: var(--slm-ink); border: 1px solid var(--slm-linea); }
.slm-fibra .ricerca input::placeholder { color: var(--slm-tenue); }
.slm-fibra .ricerca ul { list-style: none; margin: 6px 0 0; padding: 0; max-height: 260px; overflow-y: auto; }
.slm-fibra .ricerca li { padding: 6px 8px; border-radius: 6px; color: var(--slm-testo); cursor: pointer; }
.slm-fibra .ricerca li:hover { color: var(--slm-giallo); background: rgba(255, 222, 1, 0.08); }
.slm-fibra .ricerca li[aria-selected="true"] { background: rgba(255, 222, 1, 0.14); outline: 2px solid var(--slm-giallo); outline-offset: -2px; }

.slm-fibra .cursore { display: flex; align-items: center; gap: 10px; flex: 1 1 560px; max-width: 560px; }
.slm-fibra .cursore .play { flex: none; width: 40px; height: 40px; border-radius: 50%; color: var(--slm-ink); background-color: var(--slm-giallo); font-size: 1rem; cursor: pointer; }
.slm-fibra .cursore .play:hover { color: var(--slm-ink); background-color: var(--slm-ocra); }
.slm-fibra .cursore .binario { flex: 1; min-width: 0; }
.slm-fibra .cursore input[type="range"] { width: 100%; margin: 2px 0; accent-color: var(--slm-giallo); }
/* contain: la larghezza del cursore non dipende da quante etichette si vedono. Ogni etichetta sta sotto la posizione
   della sua edizione (--f da 0 a 1), con lo stesso margine del pomello */
.slm-fibra .cursore .tacche { --pomello: 16px; position: relative; height: 1.1rem; contain: inline-size; font-size: 0.72rem; line-height: 1.5; color: var(--slm-tenue); }
.slm-fibra .cursore .tacche span { position: absolute; top: 0; left: calc(var(--pomello) / 2 + (100% - var(--pomello)) * var(--f)); transform: translateX(-50%); white-space: nowrap; }
.slm-fibra .cursore .tacche span:first-child { left: 0; transform: none; }
.slm-fibra .cursore .tacche span:last-child { left: auto; right: 0; transform: none; }
.slm-fibra .cursore .tacche .con-nota { text-decoration: underline dotted; }
/* Larghezza fissa: con il testo dell'edizione cambierebbe e il binario, con le sue etichette, si sposterebbe */
.slm-fibra .cursore output { flex: none; width: 8.7em; font-size: 0.9rem; font-weight: 600; color: var(--slm-forte); }

.slm-fibra .scelta-livello { display: flex; gap: 6px; }
.slm-fibra .scelta-livello button { flex: 1; padding: 6px; color: var(--slm-testo); border: 1px solid var(--slm-ink3); border-radius: 8px; cursor: pointer; }
.slm-fibra .scelta-livello button:hover { color: var(--slm-giallo); background-color: rgba(255, 222, 1, 0.08); }
.slm-fibra .scelta-livello button[aria-pressed="true"] { color: var(--slm-ink); background-color: var(--slm-giallo); border-color: var(--slm-giallo); }
.slm-fibra .classifica { margin: 0; padding-left: 1.4em; }
.slm-fibra .classifica button { display: flex; justify-content: space-between; gap: 8px; width: 100%; padding: 6px 0; text-align: left; color: var(--slm-testo); border-bottom: 1px solid var(--slm-ink3); cursor: pointer; }
.slm-fibra .classifica button:hover { color: var(--slm-giallo); }
.slm-fibra .classifica strong { color: var(--slm-forte); font-variant-numeric: tabular-nums; }

.slm-fibra .scheda .valore strong { font: 700 1.8rem/1.1 var(--slm-titoli); color: var(--slm-giallo); }
.slm-fibra .grafico { display: block; width: 100%; height: auto; }
.slm-fibra .grafico .griglia { stroke: var(--slm-ink3); stroke-width: 1; }
.slm-fibra .grafico .linea { fill: none; stroke-width: 2.5; }
.slm-fibra .grafico .l-comune { stroke: var(--slm-giallo); }
.slm-fibra .grafico .l-provincia { stroke: #21918C; stroke-dasharray: 6 4; }
.slm-fibra .grafico .l-italia { stroke: var(--slm-tenue); stroke-dasharray: 2 4; }
.slm-fibra .grafico .punto { fill: var(--slm-giallo); stroke: var(--slm-ink); stroke-width: 2; }
.slm-fibra .legenda-grafico { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 4px 0; color: var(--slm-tenue); font-size: 0.75rem; }
.slm-fibra .legenda-grafico span::before { content: ""; display: inline-block; width: 16px; height: 3px; margin-right: 4px; vertical-align: middle; }
.slm-fibra .legenda-grafico .l-comune::before { background: var(--slm-giallo); }
.slm-fibra .legenda-grafico .l-provincia::before { background: #21918C; }
.slm-fibra .legenda-grafico .l-italia::before { background: var(--slm-tenue); }

/* La linea del comune si disegna all'apertura della scheda */
@media (prefers-reduced-motion: no-preference) {
  .slm-fibra .scheda .l-comune { stroke-dasharray: 600; animation: slm-traccia 0.9s ease-out backwards; }
}
@keyframes slm-traccia { from { stroke-dashoffset: 600; } to { stroke-dashoffset: 0; } }

@media (max-width: 760px) {
  .slm-fibra .controlli-alto { width: auto; min-width: 0; }
  .slm-fibra .cursore { flex-basis: 100%; max-width: none; min-width: 0; }
  /* Sui telefoni restano le tacche estreme e quelle con una nota */
  .slm-fibra .cursore .tacche span:not(:first-child):not(:last-child):not(.con-nota) { display: none; }
}
