.img-viewer {
    position: fixed;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8)
}

.img-viewer figure {
    width: 95%;
    height: 90%;
    overflow: visible;
    display: flex;
    align-content: center;
    margin: auto
}

.img-viewer img {
    object-fit: contain;
    max-height: calc(100% - 8ex - 12px);
    border-radius: 0;
    z-index: 5;
    user-select: none
}

.img-viewer figcaption {
    line-height: 2.5ex;
    max-height: 8ex;
    max-width: 800px;
    margin-top: 12px;
    overflow: auto;
    text-align: justify;
    padding: 0 8px
}

.img-viewer-close, .img-viewer > .img-viewer-close:hover {
    position: absolute;
    right: 0;
    color: var(--c-button-close);
    margin: 10px;
    border-color: var(--c-button-close);
    width: 30px;
    height: 30px;
    padding: 2px
}

img:is([onclick]):hover {
    cursor: pointer;
    border-color: var(--c-button-h-border);
}

.img-viewer > div {
    margin: auto;
    display: flex;
    justify-content: space-evenly;
    max-width: 260px;
}

.img-viewer > div, .img-viewer > figure > figcaption, .img-viewer-close {
    transition: opacity 0.5s, visibility 0.5s;
}