/* Trasparenza PNRR — stile frontend pubblico (sopra Bootstrap Italia / AGID) */
:root { --comune: #06c; }

/* Mappa */
.pnrr-map {
    width: 100%;
    height: 70vh;
    min-height: 420px;
    background: #eef1f4;
    border: 1px solid #e2e6ea;
}
/* La mappa resta visibile mentre si scorre la lista (desktop) */
.pnrr-map-sticky { position: sticky; top: 16px; }
/* Messaggio quando la mappa non è disponibile (es. chiave mancante) */
.pnrr-map-msg {
    display: flex; align-items: center; justify-content: center;
    height: 100%; padding: 1.5rem; text-align: center; color: #5b6571;
}

/* Lista laterale: scorre con la pagina */
.pnrr-list { min-height: 120px; }
.pnrr-item { cursor: pointer; }
.pnrr-item.active {
    background: color-mix(in srgb, var(--comune) 10%, #fff);
    border-left: 4px solid var(--comune);
}
.pnrr-item .progress-bar { background: var(--comune); }

/* Bottoni filtro extra-small */
.btn-xs { padding: .15rem .5rem; font-size: .8rem; line-height: 1.4; }

/* Pannello dettaglio */
.pnrr-detail { width: 480px; max-width: 94vw; }
.pnrr-bigbar { height: 26px; font-weight: 600; }
.pnrr-bigbar .progress-bar { background: var(--comune); }
.pnrr-detail dt { font-weight: 600; color: #5b6571; }

/* Badge stato: usa il colore inline impostato da JS, niente override qui */

/* Timeline fasi */
.pnrr-timeline { list-style: none; padding-left: 1.25rem; margin: 0; }
.pnrr-timeline li {
    position: relative;
    padding: 0 0 1rem 1rem;
    border-left: 2px solid #d4d8dd;
}
.pnrr-timeline li:last-child { border-left-color: transparent; }
.pnrr-timeline li::before {
    content: '';
    position: absolute;
    left: -7px; top: 2px;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #a0a8b0;
}
.pnrr-timeline li.done::before {
    background: #008758;        /* verde "success" AGID */
    border-color: #008758;
}

/* Gallery */
.pnrr-carousel img { max-height: 280px; object-fit: cover; width: 100%; }
.carousel-caption-static {
    background: rgba(0, 0, 0, .6); color: #fff;
    padding: .25rem .5rem; border-radius: 0 0 .25rem .25rem;
    font-size: .85rem;
}

@media (max-width: 991.98px) {
    .pnrr-map { height: 50vh; min-height: 300px; }
    .pnrr-map-sticky { position: static; }   /* su mobile la mappa non è sticky */
}
