.picturegallery
{
    flex: 1;
    flex-grow: 0;
    width: 100%;
    box-sizing: border-box;
    
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.05);
    padding: 5px;
    padding-bottom: 0px;
    box-sizing: border-box;
}

.picturegallery > div
{
    flex: 1;
    flex-grow: 0;
    flex-basis: 90%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    user-select: none;
    cursor: pointer;
    overflow: hidden;
    box-sizing: border-box;
    padding: 2px;
    
    border: 1px solid black;
    border-radius: 5px;
    transition: all 0.2s ease;
    min-height: max(250px, 10vh);
    
    margin-bottom: 5px;
    margin-right: 5px;
}
.picturegallery > div:hover
{
    -webkit-box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.75);
    -moz-box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.75);
    box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.75);
}

.picturegallery > div:active
{
    transition: none;
    filter: invert(100%);
}

.picturegallery > div img
{
    width: 100%;
    height: auto;
}
.picturegallery > div img[loader="1"]
{
    width: 30px;
    height: auto;
    opacity: 0.5;
}
.picturegallery > div img[visible="0"]
{
    display: none;
}


.picturegallery .imgitem
{
    
    background: dimgray;
    transition: all 0.4s ease;
    height: auto;
    width: 100%;
    border: 1px solid silver;
    cursor: pointer;
    
}
.picturegallery .imgitem:hover
{
    outline: 1px solid black;
    
}
.picturegallery .imgitem:active
{
    transition: none;
    filter: invert(100%);
}
.picturegallery .imgitem:nth-last-child(2)
{
    margin-bottom: 0px;
}


@media only screen and (min-width: 800px) 
{
    .picturegallery > div
    {
        flex-basis: 45%;
        margin-right: 10px;
        margin-bottom: 10px;
    }
    .picturegallery .imgitem
    {
        
    }

}



.pictureviewer
{
    background-color: rgba(0,0,0, 0.25);
    opacity: 1;
    position: fixed;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    min-height: 100%;
    min-width: 100%;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    display: flex;
    
}

.pictureviewer[visible="0"]
{
    display: none;
}
.pictureviewer img
{
    border: 1px solid dimgray;
    width: 90%;
    height: auto;
    -webkit-box-shadow: 0px 0px 15px 0px rgba(0,0,0,0.49);
-moz-box-shadow: 0px 0px 15px 0px rgba(0,0,0,0.49);
box-shadow: 0px 0px 15px 0px rgba(0,0,0,0.49);

}

@media (orientation: landscape) 
{
    .pictureviewer img
    {
        width: auto;
        height: 90%;
        width: auto;
        max-height: 90%;
        height: auto;
        max-width: 90%;    
    }
}

