
/* ==========================================================
   PASSIRANO - PANNELLO LATERALE DEI DOCUMENTI
   ========================================================== */


/* 1. SFONDO SCURO DIETRO AL PANNELLO */

#sfondoArchivio {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(10, 25, 30, 0.45);
}


/* 2. PANNELLO LATERALE */

#pannelloArchivio {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;

    width: min(520px, 100%);
    height: 100dvh;

    z-index: 9999;

    background: #f6f3eb;
    color: #132b39;

    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.18);

    transform: translateX(105%);
    transition: transform 0.28s ease;

    display: flex;
    flex-direction: column;

    visibility: hidden;
    pointer-events: none;
}


/* 3. PANNELLO APERTO */

#pannelloArchivio.aperto {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
}


/* 4. INTESTAZIONE DEL PANNELLO */

#pannelloArchivio .pannelloTestata {
    background: #006e70;
    color: white;

    padding: 22px 25px;

    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}


/* 5. TITOLO DELLA CATEGORIA */

#titoloArchivio {
    font-family: Georgia, serif;
    font-size: 27px;
    line-height: 1.2;
    margin: 0;
}


/* 6. NUMERO DEI DOCUMENTI */

#numeroDocumenti {
    font: 13px Arial, sans-serif;
    color: #d8eeea;
    margin-top: 8px;
}


/* 7. PULSANTE DI CHIUSURA */

#chiudiArchivio {
    flex-shrink: 0;

    background: rgba(255, 255, 255, 0.15);
    color: white;

    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 50%;

    width: 38px;
    height: 38px;

    font-size: 24px;
    line-height: 1;

    cursor: pointer;
}

#chiudiArchivio:hover {
    background: rgba(255, 255, 255, 0.3);
}


/* 8. CONTENUTO SCORREVOLE */

#pannelloArchivio .pannelloContenuto {
    flex: 1;
    overflow-y: auto;

    padding: 24px 28px 35px;
    overscroll-behavior: contain;
}


/* 9. ELENCO DEI DOCUMENTI */

#listaDocumenti {
    list-style: none;
    margin: 0;
    padding: 0;
}

#listaDocumenti li {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #ded7cb;
}


/* 10. COLLEGAMENTI AI DOCUMENTI */

#listaDocumenti a {
    display: block;

    padding: 13px 6px;

    font: 15px Arial, sans-serif;
    line-height: 1.5;

    color: #132b39;
    text-decoration: none;
}

#listaDocumenti a:hover {
    background: #e4f0ed;
    color: #006e70;
    padding-left: 12px;
}


/* 11. ADATTAMENTO SMARTPHONE */

@media (max-width: 650px) {

    #pannelloArchivio {
        width: 100%;
    }

    #pannelloArchivio .pannelloTestata {
        padding: 18px;
    }

    #titoloArchivio {
        font-size: 23px;
    }

    #pannelloArchivio .pannelloContenuto {
        padding: 18px;
    }

}
/* PULSANTE CHIUDI - CORREZIONE */

#pannelloArchivio .pannelloTestata {
    align-items: center;
    min-width: 0;
}

#titoloArchivio {
    min-width: 0;
}

#chiudiArchivio {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(255,255,255,.45);
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    color: #fff;
    font: 28px Arial, sans-serif;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

#chiudiArchivio:hover {
    background: rgba(255,255,255,.3);
}
