/* Galerie příloh pacienta: mřížka náhledů + lightbox overlay */
.attachment-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: .75rem;
}
.attachment-thumb-wrap {
    position: relative;
}
.attachment-thumb {
    display: block;
    border: 1px solid var(--tblr-border-color, #dee2e6);
    border-radius: var(--tblr-border-radius, 4px);
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: var(--tblr-bg-surface-secondary, #f4f6fa);
}
.attachment-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.attachment-thumb__actions {
    position: absolute;
    top: .25rem;
    right: .25rem;
    display: flex;
    gap: .25rem;
}

/* Lightbox overlay: skrytý dokud ho JS neaktivuje */
.attachment-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .85);
    padding: 2rem;
}
.attachment-lightbox.is-open { display: flex; }
.attachment-lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 0 40px rgba(0, 0, 0, .5);
}
.attachment-lightbox__close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    color: #fff;
    background: transparent;
    border: 0;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}
