/* image-viewer.css */

.image-scope {
    max-width: 100%;
    max-height: 100%;
}

img.image-scope {
    border: solid 1px #666;
    box-sizing: border-box;
}

img.image-scope:hover {
    border: solid 1px #00F;
}

div.image-scope {
    background-size: cover;
    background-position: 50% 50%;
}

.image-scopeX {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-scopeT {
    max-width: initial;
    width: 160px;
    height: 160px;
    object-fit: cover;
}

.image-scopeS {
    max-width: initial;
    width: 320px;
    height: 320px;
    object-fit: cover;
}

.image-scopeM {
    max-width: initial;
    width: 640px;
    height: 640px;
    object-fit: cover;
}

.image-scopeL {
    max-width: initial;
    width: 960px;
    height: 960px;
    object-fit: cover;
}

.image-scopeH {
    max-width: initial;
    width: 1280px;
    height: 1280px;
    object-fit: cover;
}

.image-screen {
    position: fixed;
    z-index: 1;
    top: 0px;
    left: 0px;
    right: 0px;
    bottom: 0px;
    background-color: rgba(96, 96, 96, 0.8);
    background-repeat: no-repeat;
}

.image-control-next {
    background-image: url(/_img/image-next.png);
}

.image-control-prev {
    background-image: url(/_img/image-prev.png);
}

.image-control-loupe {
    background-image: url(/_img/image-loupe.png);
}

.image-control-shrink {
    background-image: url(/_img/image-shrink.png);
}

.image-control-next,.image-control-prev,
.image-control-loupe,.image-control-shrink {
    position: relative;
    margin-top: 16px;
    margin-left: 16px;
    width: 38px;
    height: 38px;
    border: 2px solid #666;
    background-size: 32px 32px;
    background-color: rgba(220, 220, 220, 0.7);
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
}

.image-control-next:hover,.image-control-prev:hover,
.image-control-loupe:hover,.image-control-shrink:hover {
    border: 2px solid #66F;
    background-color: rgba(220, 220, 255, 0.7);
}

.image-control-disable {
    border: 2px solid #333;
    background-color: rgba(160, 160, 160, 0.5);
    cursor: auto;
}
.image-control-disable:hover {
    border: 2px solid #333;
    background-color: rgba(160, 160, 160, 0.5);
}

.image-description {
    position: absolute;
    bottom: 0px;
    margin: 16px;
}
.image-description-icon {
    width: 38px;
    height: 38px;
    border: 2px solid #666;
    background-image: url(/_img/image-comment.png);
    background-size: 32px 32px;
    background-color: rgba(220, 220, 220, 0.7);
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
}
.image-description-icon:hover {
    border: 2px solid #66F;
    background-color: rgba(220, 220, 255, 0.7);
}
.image-description-text {
    max-height: 25vh;
    overflow-y: auto;
    margin-top: 4px;
    border: 1px solid #333;
    padding: 0.5em;
    font-size: larger;
    background-color: rgba(220, 220, 220, 0.8);
}
.image-description-hidden {
}
.image-description-hidden .image-description-icon {
}
.image-description-hidden .image-description-text {
    display: none;
}

/* for diary */
#page[data-id^="diary-"] .image-scope {
    float: left;
    margin-right: 1em;
    margin-bottom: 1ex;
}

/* for image-album */
.area[style="--image-album:list"] {
    display: flex;
    flex-wrap: wrap;
}
.area[style="--image-album:slot"] {
    flex-grow: 1;
    width: 320px;
    height: 400px;
    margin: 2px;
}
.area[style="--image-album:picture"] {
    width: 100%;
    height: 320px;
}
.area[style="--image-album:caption"] {
    width: 100%;
    height: 80px;
    overflow: auto;
    background: #CCC;
}
@media screen and (max-width: 480px) {
    .area[style="--image-album:slot"] {
        width: 40vmin;
        height: 50vmin;
    }
    .area[style="--image-album:picture"] {
        height: 40vmin;
    }
    .area[style="--image-album:caption"] {
        width: 100%;
        height: 10vmin;
    }
}
