﻿html, body, #container {
    width: 100%;
    height: 100%;
    font-family: Arial, Helvetica, sans-serif;
    box-sizing: border-box;
    margin: 0;
}

#header {
    background-color: lightgray;
    padding: 1vw 10px;
    font-size: larger;
    display: flex;
    flex-direction: row;
    align-items: center;
    border-bottom: 1px solid gray;
    max-height: 50px;
    box-sizing: border-box;
}

#container {
    display: flex;
    flex-direction: column;
}

.body,
#body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    row-gap: 3px;
    column-gap: 3px;
    padding: 6px;
    overflow-y: auto;
    flex: 1;
    align-content: flex-start;
}

.large_image {
    flex: 1;
}

.gallery {
    overflow-y: hidden;
    height: min(25%, 75px);
    flex-direction: initial;
    overflow-x: auto;
    display: flex !important;
}

.gallery .file_container {
    width: min(20%, 100px);
    display: inline-block;
    height: 100%;
}

.file_container {
    aspect-ratio: 16 / 9;
    position: relative;
    border: 1px solid lightgray;
    background-color: ghostwhite;
    border-radius: 3px;
    cursor: pointer;
    background-size: cover;
}

    .file_container img {
        object-fit: cover;
        width: 100%;
        height: 100%;
        position: absolute;
        background-image: url('/resource/loading.svg');
        background-size: 64px;
        background-position-y: center;
        background-position-x: center;
        background-repeat: no-repeat;
    }

.file_bar {
    position: absolute;
    bottom: 0;
    padding: 2px;
    background-color: rgba(255, 255, 255, 0.6);
    width: 100%;
    box-sizing: border-box;
    cursor: initial;
}

.file_bar div:nth-child(2) {
    font-size: smaller;
}

.file_download {
    position: absolute;
    right: 0;
    top: 0;
}

.file_download div {
    margin-right: 5px;
    display: inline-block;
    font-size: small;
}

.album_container[style="background-image: url('/resource/lock.svg')"] {
    background-position: center;
}

.file_container img[src=""]:after,
.file_container[style="background-image: url('')"]:after {
    content: '⌛';
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-align: center;
    top: 25%;
}

a {
    text-decoration: none;
    font-weight: bolder;
}

.no_album {
    text-align: center;
    font-style: italic;
    padding-top: 10px;
}

.button img {
    width: 32px;
    height: 32px;
}

.toolbar {
    margin-left: auto;
    cursor: pointer;
    display: flex;
}

.album_container {
    background-size: 50% 50%, 50% 50%, 50% 50%, 50% 50%;
    background-repeat: no-repeat;
    background-position: left top, right top, left bottom, right bottom;
}

.toolbar .button {
    margin: 0 5px;
    padding: 0 5px;
    background-position-x: center;
}

iframe {
    position: absolute;
    right: 1px;
    z-index: 1000;
    top: calc(2vw + 24px);
    background-color: inherit;
    border: 1px solid;
    height: 170px;
}

#bad_password {
    margin-top: 4px;
    color: red;
    font-size: smaller;
}

#home {
    background-image: url('/resource/home.svg');
    margin-right: 10px;
}

#download {
    margin: 0;
    padding: 0;
}

#home, #album {
    padding-right: 5px;
    border-right: 1px solid gray;
}

#album {
    background-image: url('/resource/album.svg');
    /*border-left: 1px solid gray;*/
    border-right: 0;
    padding-right: 0;
}

#download {
    background-image: url('/resource/download.svg');
}

.button {
    display: flex;
    width: 32px;
    height: 32px;
    background-size: contain;
    background-repeat: no-repeat;
}

.file_container.video::after {
    background-image: url('/resource/play.svg');
    content: '';
    width: 50%;
    height: 50%;
    position: relative;
    display: block;
    background-size: 50%;
    background-repeat: no-repeat;
    background-position: -5px -10px;
}

.album #large_preview {
    flex: 1;
    background-size: contain;
    background-repeat: no-repeat;
    background-position-x: center;
    background-position-y: center;
}

.album #body {
    height: 100%;
    display: flex;
    min-width: min-content;
    padding: 0;
    margin: 0 3px;
    flex: 0;
}

#preview_container {
    height: 15%;
    max-height: 200px;
    overflow-x: auto;
    padding-top: 10px;
}

.album .file_container {
    width: 200px;
}

.album .file_container.selected {
    border: 3px solid black;
}

#version {
    font-size: small;
    margin: 0 0 3px 3px;
    color: gray;
    font-style: italic;
}

#subtitle {
    font-size: smaller;
    font-style: italic;
}