/* =============================================================================
 * css/GL_gallery.css - GALLERY privata (gallery/gallery.php, index.php?idPg=16)
 * -----------------------------------------------------------------------------
 * Barra delle azioni (selezione, download, cancellazione), griglia di foto con
 * casella di selezione in alto a sinistra e pulsanti Scarica / Elimina sotto
 * ogni foto, foto selezionate evidenziate, dissolvenza alla cancellazione.
 * Prefisso GL_; usa le classi del sito (MIS_btn, MIP_...).
 * ============================================================================= */
.GL_codice { text-transform: uppercase; letter-spacing: 2px; font-family: Consolas, 'Courier New', monospace; }
.GL_errore { margin-top: 14px; }
.GL_barra {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
    padding: 14px 16px; margin-bottom: 20px; background: #ffffff; border: 1px solid #e6ebf1; border-radius: 12px;
    position: sticky; top: calc(var(--MIS-h-header, 72px) + 8px); z-index: 20;
}
.GL_btn { min-height: 40px; padding: 0 14px; font-size: 14px; }
.GL_btn:disabled { opacity: .5; cursor: default; }
.GL_conto { font-size: 14px; color: #5d6b78; }
.GL_spazio { flex: 1 1 auto; }
.GL_rosso { background: #c0392b; color: #ffffff !important; }
.GL_rosso:hover { background: #a93226; }
.GL_rosso_bordo { background: #ffffff; border-color: #e3b5b0; color: #c0392b !important; }
.GL_rosso_bordo:hover:not(:disabled) { border-color: #c0392b; }

.GL_griglia { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.GL_foto {
    position: relative; margin: 0; background: #ffffff; border: 2px solid #e6ebf1; border-radius: 12px; overflow: hidden;
    transition: border-color .15s, opacity .35s, transform .35s;
}
.GL_foto.GL_sel { border-color: #007bff; box-shadow: 0 0 0 3px rgba(0, 123, 255, .15); }
.GL_foto.GL_via { opacity: 0; transform: scale(.94); }
.GL_apri { display: block; aspect-ratio: 4 / 3; background: #f4f7fb; }
.GL_apri img { width: 100%; height: 100%; object-fit: cover; display: block; }
.GL_scelta {
    position: absolute; top: 8px; left: 8px; margin: 0; width: 34px; height: 34px; border-radius: 8px;
    background: rgba(255, 255, 255, .92); display: flex; align-items: center; justify-content: center; cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
}
.GL_scelta input { width: 20px; height: 20px; margin: 0; accent-color: #007bff; cursor: pointer; }
.GL_foto figcaption { display: flex; align-items: center; gap: 4px; padding: 6px 8px 6px 12px; }
.GL_nome { flex: 1 1 auto; min-width: 0; font-size: 13px; color: #4a5a68; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.GL_azione {
    flex: 0 0 auto; width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: #15476c !important;
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none !important;
}
.GL_azione svg { margin: 0; font-size: inherit; color: inherit; display: block; }
.GL_azione:hover { background: #eaf2fd; }
.GL_elimina_una { color: #c0392b !important; }
.GL_elimina_una:hover { background: #fbeceb; }
.GL_azione:focus-visible, .GL_scelta:focus-within { outline: 2px solid #007bff; outline-offset: 2px; }
@media (max-width: 640px) {
    .GL_barra { position: static; }
    .GL_btn { flex: 1 1 calc(50% - 10px); }
    .GL_spazio { display: none; }
    .GL_conto { flex-basis: 100%; }
    .GL_griglia { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
