:root {
    --vsag-color: #2c2d3f;
    --background-color: #151111;
}


* {
    box-sizing: border-box;
}
html {
    height:100%;
}
body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: #151111;
    color: #bbb;
    font-size: 12pt;
    margin: 0px;
    height:100%;
}


h3,h4,h2,h1 {
    text-align: center;
}

h3,h4,h2,h1 {
    margin:0px;
    padding: 0.6em 0em;
    text-align: center;
}

input, textarea, select {
    font-size: 1em;
    background-color: #222;
    color: #ccc;
    border: 1px solid #666;
}

input.error {
    border: 1px solid red;
}
input[type="submit"], input[type="file"] {
    cursor:pointer;
}
button {
    font-size: 1em;
    background-color: #222;
    padding:3px;
    color: #ccc;
    border: 1px solid #999;
    border-radius: 2px;
    cursor:pointer;
}

button:disabled, input[type='submit']:disabled {
    color: #444;
}

table {
    border-spacing: 10px;
}


table.gapped {
    border-spacing: 0px;
    text-align: center;
}

table.gapped th,table.gapped td{
    padding:0.5em;
}

table.bordered th,table.bordered td{
    border: 1px solid #444;
}
table.bordered th {
    background-color: #333;
}
table.centered {
    text-align: center;
}

table.labled-input td:first-child {
    text-align: right;
}

a, a:visited {
    color: #888;
    text-decoration: none;
}

.h2-thin {
    font-size: x-large;
    font-weight: 100;
    text-align: center;
    padding:15px;
}

.h4-thin {
    font-size: larger;
    font-weight: 100;
    text-align: center;
    padding:15px;
}

.main,#main {
    display: grid;
    height: 100%;
    grid-template-rows: auto 1fr auto;
    gap: 4px;
}
.title {
    text-align: center;
}

.subtitle {
    color:#888;
}

.title.highlight {
    background-color: #222;
}

.inline {
    display:inline;
}

.inline-block {
    display:inline-block;
}

.header {
    background-color: var(--vsag-color);
    padding: 5px;
}

.header-grid {
    display:grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap:10px;
}
.content {
    overflow: auto;
}

.footer {
    background-color: #111;
    color: #888;
    font-size: smaller;

    padding:5px 10px ;
}
.footer.spaced {
    padding:1em 1em;
}
.main-content {
    padding: 3px 3px;
}

.main-content.overflow {
    overflow:auto;
}

.two-col-grid {
    display:grid;
    grid-template-columns: auto 1fr;   
}

.title-content-container {
    display:grid;
    grid-template-rows: auto 1fr;
}
.title-content-container div:nth-child(2) {
    overflow: auto;
    max-height: 20em;
}

.hidden {
    display:none !important;
}
.overlay {
    position:absolute;
    top:0px;
    bottom:0px;
    right:0px;
    left:0px;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}
.overlay.hidden {
    display:none;
}
.overlay-background {
    position:absolute;
    height:100%;
    width:100%;
    background-color: #111111;
    opacity: 0.8;
}
.overlay-content {
    position:relative;
}
.nav-container {
    display:flex;
    justify-content: center;
    align-items: center;
    padding: 3px;
}
.nav-icon {
    border: 1px solid #888;
    border-radius: 5px;
    padding: 5px;
    font-size: larger;
    font-weight: bold;
    text-align: center;

}
.nav-icon.narrow-thin-small {
    font-size: smaller;

}

.large-image-browser {
    position:relative;
    /* background-color: #888; */
    height:95vh;
    /* max-height:95%; */
    width:95%;
    overflow: none;
    display:grid;
    grid-template-columns: auto 1fr auto;
    /* grid-template-rows: 1fr auto; */
}

.image-container {
    position:relative;
    /* height:100%; */
}

.large-image:focus {
    outline:none;
}
.large-image {
    position:relative;
    background-color: #000;
    width:100%;
    /* hack to fit the image to the parent element*/
    height:95vh;
    border: 1px solid #444;
    display:flex;
    justify-content: center;
    align-items: center;
}
.large-image img{
    max-width:100%;
    height: inherit;
    max-height:100%;
    object-fit: contain;
}
.image-data {
    position:absolute;
    bottom:0px;
    height:auto;
    width:100%;
    font-size: smaller;
    padding: 3px 10px;
    opacity: 0.6;
    background-color: #333;
    color: #eee;
    display:flex;
    flex-direction: row;
    justify-content: space-between;
}
.image-data span:nth-child(odd) {
    font-weight: 100;
    padding-right:15px;
    color: #999;
}
.image-data span:nth-child(even) {
    font-weight: bold;    
    color: #fff;
}
#close-overlay{
    position:absolute;
    right:5px;
    top:5px;
    z-index: 100;
    width:auto;
    background-color: #111;
    opacity: 0.6;
    color: #ccc;
    font-size: smaller;
}

.gallery-folders {
    width:60%;
    margin: 0px auto;
}
.selected-gallery {
    display:flex;
    flex-direction: column;
    gap: 10px;
    width: 80%;
    padding: 10px; 
    margin: 0px auto;  
}

.winners {
    display:flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
    justify-content: center;
    margin-bottom: 20px;
}

.winners.hidden {
    display:none;
}

.winners:empty {
    margin-bottom: 0px;
}

.all-images {
    display:flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.gallery-image {
    max-width: 200px;
    max-height: 200px;
}
.gallery-image.winner {
    max-width: 400px;
    max-height: 400px;
}

.flex-col {
    display:flex;
    flex-direction: column;
    gap: 0.7em;
}
.flex-row {
    display:flex;
    flex-direction: row;
    gap: 0.7em;
    justify-content: center;
}

.centered{
    align-items: center;
}
.stretch {
    align-items: stretch;
}

.justify-start {
    justify-content: start;
}

.flex-row.wrap {
    flex-wrap: wrap;
}
.flex-start {
    align-items:flex-start
}

.grow {
    flex-grow: 1;
}

.card-space3 {
    border: 1px solid #888;
    border-radius: 5px;
    padding:20px;

}
.card-space1 {
    border: 1px solid #888;
    border-radius: 5px;
    padding:5px;
}
.card-space3.corner3 {
    border-radius: 15px;

}
.msgbox {
    background-color: #333;
}
.winner-card {
    max-width:450px;
    justify-content: space-between;
}

.clickable {
    user-select: none;
    cursor: pointer;
}

.errortext, .delete-action {
    color:red;
}
.warn {
    color:orange;
}

.ok {
    color:#44cc22;
}
.btn {
    background-color: #aaa;
    color: #222;
    padding: 5px;
    border: 1px solid #999;
    border-radius: 4px;
    font-size: 1em;
}
.btn.green {
    background-color: #106610;
    color: #efefef;
}
.btn.large {
    font-size: 1.5em;
}
.btn.x-large {
    font-size: 2.5em;
}

/*
    tailored for mobile use
*/
.photo-box-container {
    display:flex;
    flex-direction: column;
    gap: 3em;
    align-items: center;
    user-select: none;  
}
.photo-box {
    position: relative;
    border: 10px solid #555;
    border-radius: 20px;
    padding: 2em;
    display:flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    user-select: none;
    cursor: pointer;
}

.photo-box.selected {
    border-color: #44cc22;
}

.upload-image-container {
    height:150px;
    background-color:#111;
    color:#555;
}
.photo-box img {
    max-height:20vh;
}

.dark-transparent-background {
    background-color:rgb(0 0 0/0.7);
}

.smaller {
    font-size: smaller;
}

.larger {
    font-size: larger;
}
.comment {
    font-size: smaller;
}

#progress {
    position:relative;
    /* height:5px; */
    margin: 0 auto;
    padding:5px;
    width:200px;
}

#progressbar-container {
    width:100px;
    padding:2px;
    border: 1px solid #555;
}
#progressbar {
    width:0%;
    height:5px;
    border-radius: 2px;
    background-color: #106610;
}
details {
    
    border: 2px solid #2c2d3f;
}
details summary {
    flex-grow: 2;
    text-align: center;
    font-weight: bolder;
    background-color: #2c2d3f;
    padding: 3px;
    font-size: larger;
}

.mandatory-marker {
    font-weight: bolder;
    color: #b33;
}

.photo-table-container {
    padding-top:1.5em;
}
.photo-table-header-container{
    position: relative;
}

.photo-table-header {
    position: absolute;
    left: 0;
    width: 100%;
    border-radius: 5px;
    transform: translate(0, -2em);
    background-color: var(--background-color);
    border:1px solid #888;
    padding:0.2em;
}
/*
    Smartphone settings
*/
@media  only screen and  (pointer: coarse){
    /* disable double-tab zoom action */
    * {
      touch-action: manipulation; 
    }
    body {
        font-size:28pt;
    }
    .btn {
        font-size: 1.5em;
    }
    .btn.large {
        font-size: 2.5em;
    }
    .btn.x-large {
        font-size: 3.5em;
    }

    input, textarea, select {
        font-size: 1em;
        background-color: #222;
        color: #ccc;
        border: 1px solid #666;
    }


    .large-image-browser {
        height:100vh;
        width:100%;
    }
    .large-image-browser #previous-image, .large-image-browser #next-image {
        display:none;
    }
}