/* La lente dentro l'app: solo le regole della raggiera, del tooltip e del pannello «Lente».
   Variabili e font vengono da atlante.css. Il disegno sta in un <svg> dentro #map (js/lente-app.js). */
.lente-svg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; overflow: visible; font-family: inherit; -webkit-tap-highlight-color: transparent; }
.lente-svg[hidden] { display: none; }
.lente-svg text { font-family: inherit; fill: var(--ink); paint-order: stroke; stroke: var(--bg); stroke-width: 3px; stroke-linejoin: round; }
.lente-svg *:focus, .lente-svg .segm, .lente-svg .segm * { outline: none; }
.lente-svg .liv { stroke: var(--ink3); stroke-width: .9; stroke-dasharray: 2 4; opacity: .75; }
.lente-svg .livt { font-size: 10.5px; fill: var(--ink2); }
.lente-svg .velo { fill: var(--surface); fill-opacity: .78; pointer-events: none; }
.lente-svg .anello { fill: var(--surface); stroke: var(--line); stroke-width: 1; filter: drop-shadow(0 1px 4px rgba(0,0,0,.25)); }
.lente-svg .lente-bordo { stroke: var(--acc); stroke-width: 2; }
.lente-svg .croce { stroke: var(--ink); stroke-width: 1.6; fill: none; }
.lente-svg .nome { font-size: 14px; font-weight: 700; fill: var(--ink); stroke: none; pointer-events: all; cursor: pointer; }
.lente-svg .nome:hover, .lente-svg .nome:focus-visible { text-decoration: underline; }
.lente-svg .msg-bg { fill: var(--surface); stroke: var(--line); }
.lente-svg .msg { font-size: 13px; font-weight: 600; stroke: none; }
.lente-svg .presa { pointer-events: all; cursor: grab; touch-action: none; }
.lente-svg .presa:active { cursor: grabbing; }
.lente-svg .rag { pointer-events: all; cursor: pointer; }
.lente-svg .nastro { pointer-events: stroke; cursor: pointer; stroke-linecap: butt; }
.lente-svg .nastro.spento { opacity: .6; }
.lente-svg .nastro:focus-visible { stroke-width: 20; }
.lente-svg .nastrot { font-size: 11px; font-weight: 700; fill: #14181c; stroke: none; pointer-events: none; }
.lente-svg .nastrot.chiaro { fill: #fff; }
/* stadi: segmenti dell'anello; il selezionato ha lo sfondo pieno */
.lente-svg .segm { pointer-events: all; cursor: pointer; }
.lente-svg .stadio { font-size: 11.5px; font-weight: 700; fill: var(--ink); stroke: none; cursor: pointer; }
.lente-svg .stadio.on { fill: var(--surface); }
.lente-svg .sfondo { fill: var(--accbg); stroke: var(--line); stroke-width: .8; transition: fill .15s; }
.lente-svg .segm:hover .sfondo { fill: var(--acc); fill-opacity: .35; }
.lente-svg .segm[aria-pressed="true"] .sfondo { fill: var(--acc); fill-opacity: 1; stroke: var(--acc); }
.lente-svg .segm:focus-visible .sfondo { stroke: var(--ink); stroke-width: 2; }
.lente-tip { position: absolute; z-index: 6; width: 17rem; max-width: calc(100% - 12px); padding: .5rem .65rem; background: var(--surface); color: var(--ink); border: 2px solid var(--acc); border-radius: 8px; box-shadow: 0 4px 14px rgba(0,0,0,.25); font-size: .82rem; pointer-events: none; }
.lente-tip.fisso { pointer-events: auto; }
.lente-tip .oc { display: block; margin-top: .45rem; padding: .3rem .5rem; text-align: center; font-weight: 600; color: var(--acc); border: 1px solid var(--acc); border-radius: 6px; text-decoration: none; }
.lente-tip .oc:hover, .lente-tip .oc:focus-visible { background: var(--accbg); }
.lente-tip[hidden] { display: none; }
.lente-tip b { display: block; line-height: 1.25; margin-bottom: .15rem; }
.lente-tip .k { display: block; color: var(--ink3); font-size: .74rem; margin-bottom: .3rem; }
.lente-tip dl { display: grid; grid-template-columns: auto 1fr; gap: .1rem .6rem; margin: 0; }
.lente-tip dt { color: var(--ink3); }
.lente-tip dd { margin: 0; text-align: right; word-break: break-word; }
.lente-tip small { display: block; margin-top: .3rem; color: var(--ink3); }

/* chip «Lente»: un clic accende/spegne, un clic prolungato mostra l'altra modalità (#lente-alt) */
.chip2.attiva { border-color: var(--acc); color: var(--acc); background: var(--accbg); }
#lente-alt[hidden] { display: none; }
/* sotto il chip, in sovrapposizione: così il layout non si sposta e il rilascio cade ancora sul chip */
.chipbar { position: relative; }
#lente-alt { position: absolute; right: 0; top: calc(100% + .3rem); width: 44px; flex: none; z-index: 7; border-style: dashed; box-shadow: 0 3px 10px rgba(0,0,0,.25); }

/* chip «Lente»: lente d'ingrandimento con la raggiera dentro, più etichetta; da spenta è neutra, da accesa si riempie */
.chip2-lente { flex: 0 0 auto; flex-direction: row; align-items: center; gap: .5rem; padding: .2rem .75rem .2rem .6rem; }
.chip2-lente svg { flex: none; width: 1.7rem; height: 1.7rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.chip2-lente .rag { stroke: var(--acc); }
.chip2-lente circle.rag { fill: var(--acc); }
.chip2-lente .lente-txt { display: flex; flex-direction: column; min-width: 0; }
.chip2-lente.attiva .chip2-k { color: inherit; opacity: .8; }
.chip2-lente.attiva { border-width: 2px; padding: calc(.2rem - 1px) calc(.75rem - 1px) calc(.2rem - 1px) calc(.6rem - 1px); }
#lente-alt { width: auto; right: 0; }
@media (max-width: 480px) { .chip2-lente .chip2-k { display: none; } .chip2-lente { padding-inline: .5rem; } }
