body {
    background-color: #444;
    color: #eee;
    font-family: sans-serif;
}

.focused, .tutorial img, .tutorial video {
    display: block;
    margin: 2em auto;
    max-width: 90%;
}
.rating-btns {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}
.rating-btns a {
    margin: 0 .5em;
}
.rating-btns .navigation a {
    width: 4em;
}

.filename {
    text-align: center;
    margin: .5em;
    font-size: .75em;
    position: relative;
}
.filename svg {
    position: relative;
    top: .33em;
}

.comment-box {
    position: absolute;
    margin-top: 3em;
    top: 50%;
    left: 50%;
    margin-right: -50%;
    transform: translate(-50%, -50%);
}

a:visited, a:hover, a:active, a:focus, a:link {
   color: #aaf !important;
   text-decoration: none !important;
   outline: none !important;
}

.hidden { display: none; }
.relative { position: relative; }
.fit-width { width: fit-content; }
.fit-width img { max-width: 100%;}

.btn {
   background-color: #4CAF50;
   border: none;
   color: white;
   padding: .5em;
   text-align: center;
   text-decoration: none;
   display: inline-block;
   font-size: 1em;
   cursor: pointer;
   border-radius: 4px;
}

a.btn {
    color: white !important;
}

small {
    font-size: .6em;
}
.btn.green {background-color: #4CAF50;}
.btn.turquoise {background-color: #4CAFAF;}
.btn.yellow {background-color: #dc0; color: #666 !important;}
.btn.red {background-color: #f33;}
.btn.grey {background-color: #aaa;}
.btn.green.disabled {background-color: #9ac7a2;}
.btn.turquoise.disabled {background-color: #9ac7c7;}
.btn.yellow.disabled {background-color: #993;}
.btn.red.disabled {background-color: #944;}
.btn.grey.disabled {background-color: #444;}
.btn.grey.active {background-color: #666;} /* for star ratings */

.margin-left-s {
    margin-left: .5em;
}
.margin-right-s {
    margin-right: .5em;
}
.margin-l {
    margin: 2em;
}

.inline-block {
    display: inline-block;
}

header .title { font-size: 2em; margin-right: 1em;}
header .small-title { font-size: 1.5em; }

header {
    position: sticky;
    color: #222;
    height: 3em;
    width: 100%;
    top: 0;
    z-index: 10;
    min-height: 3em;
    background-color: #bbb;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.95;
}

footer {
    position: relative;
    bottom: 0;
    float: right;
    margin: 5em .5em .5em .5em;
}

header .left .genericons-neue-previous {
    position: relative;
    top: .1em;
    margin-left: .3em;
    margin-right: .4em;
}
header .left {
    left: 1%;
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
}
header .right {
    right: 1%;
    position: absolute;
    float: right;
}
.uncertain-count {
    position: relative;
    top: -.5em;
}

.bar {
    height: 18px;
    background: green;
}

.admin-pic, .pic {
    display: inline-block;
}

.border.green { box-shadow: 0 1px 1.5em rgba(102,221,102,.8); }
.border.turquoise { box-shadow: 0 1px 1.5em rgba(102,221,221,.8); }
.border.yellow { box-shadow: 0 1px 1.5em rgba(221,221,0,.8); }
.border.red { box-shadow: 0 1px 1.5em rgba(255,119,119,.8); }

.pic-grid-item {
    width: 24%;
}

.pic-grid-item > a {
    display: inline-block;
    margin: 0.5em;
}

.shoot-grid-item {
    margin: 0.5%;
    width: 48%;
}

.shoot-grid-item img {
    max-width: 80%;
    max-height: 30em;
}

.pic-grid-item img { max-width: 100%; }

.modal {
    color: #333;
    /*overflow-y: scroll;
    max-height: 80%;*/
}
.modal .title {
    font-size: 1.5em;
    margin-bottom: .5em;
}
.modal .btn { float: right; }

.modal ul {
    padding-left: 0;
    /*overflow-y: scroll;*/
    overflow-x: hidden;
    max-height: 20em;
}
.modal ul li { list-style-type: none;}

.modal textarea {
    width: 98%;
    min-height: 5em;
}

.form, .top-margin {
    margin-top: 1em;
}
.small-bot-margin {
    margin-bottom: .4em;
}
.half-width {
    display: inline-grid;
    width: 47%;
    margin-left: 1%;
    margin-right: 1%;
}
.half-width .title, .third-width .title {
    font-size: 1.5em;
    width: 70%;
    display: inline-block;
}
#copy-confirm {
    float: right;
    width: 25%;
    display: none;
}
.filename #copy-confirm {
    position: absolute;
    top: .33em;
    padding-left: 1em;
    width: initial;
}

.third-width {
    display: inline-grid;
    width: 30%;
    margin-left: 1%;
    margin-right: 1%;
}

#prune-confirm {
    display: none;
}

.tutorial {
    margin: 2em;
}

.pic-grid-item.pic {
    position: relative;
}
.star-overlay {
    position: absolute;
    top: 0.5em;
    left: 0.5em;
    background-color: rgba(255,255,255,0.3);
    border-radius: 0 0 0.3em 0;
}
.relative .star-overlay {
    top: 0;
    left: 0;
}

.rating-overlay {
    position: absolute;
    bottom: .25em;
    right: 0;
    padding: .25em;
    background-color: rgba(255,255,255,0.3);
    border-radius: .3em 0 0 0;
    color: #000;
}
.rating-overlay.green { background-color: rgba(102,221,102,.8); }
.rating-overlay.turquoise { background-color: rgba(102,221,221,.8); }
.rating-overlay.yellow { background-color: rgba(221,221,0,.8); }
.rating-overlay.red { background-color: rgba(255,119,119,.8); }

#shooting-info {
    margin: 2em .5em;
    font-size: 1.3em;
}
#shooting-info h1 {
    font-size: 1.6em;
}

#shooting-info svg, .filename svg {
    filter: invert(89%) sepia(0%) saturate(348%) hue-rotate(205deg) brightness(97%) contrast(79%);
}

#overview-container {
    display: flex;
    flex-direction: column;
    margin: 1em 0;
    font-size: 1.3em;
}
#overview-container .btn {
    margin: 1em .2em 0 .2em;
}

.genericons-neue-skip-back, .genericons-neue-skip-ahead {
    position: relative;
    top: 1px;
}

@media only screen and (min-width: 801px) {
    .hide-big { display: none !important; }

    #home-icon {
        margin-right: 1em;
    }

    .rating-btns {
        margin-bottom: 1em;
    }
}

@media only screen and (max-width:800px){
    .hide-small { display: none !important; }
    .rating-btns {
        display: flex;
        flex-direction: column;
    }
    .rating-btns a {
        margin-bottom: 1em;
        width: 15em;
    }
    .rating-btns .navigation {
        display: inline-flex;
    }
    .rating-btns .navigation a {
        width: 6.5em;
    }

    .pic-grid-item {
        width: 49%;
    }

    .shoot-grid-item {
        margin: 1%;
        width: 98%;
    }

    #admin-shoot-overview, .small-flex-column {
        display: flex;
        flex-direction: column;
    }

    #admin-shoot-overview .third-width, #new-shooting-form .half-width {
        width: 98%; /* Ignore half/third width on small viewports */
        margin-bottom: 1em;
    }

    #edit-shoot-modal form {
        overflow: scroll;
    }

    .filename #copy-confirm {
        position: absolute;
        top: 2em;
        right: 15%;
        padding-left: 0;
        width: initial;
    }
}


/* Taken from https://stackoverflow.com/questions/36962903/javascript-shake-html-element */
@-webkit-keyframes shake {
    0% { -webkit-transform: translate(2px, 1px) rotate(0deg); }
    10% { -webkit-transform: translate(-1px, -2px) rotate(-1deg); }
    20% { -webkit-transform: translate(-3px, 0px) rotate(1deg); }
    30% { -webkit-transform: translate(0px, 2px) rotate(0deg); }
    40% { -webkit-transform: translate(1px, -1px) rotate(1deg); }
    50% { -webkit-transform: translate(-1px, 2px) rotate(-1deg); }
    60% { -webkit-transform: translate(-3px, 1px) rotate(0deg); }
    70% { -webkit-transform: translate(2px, 1px) rotate(-1deg); }
    80% { -webkit-transform: translate(-1px, -1px) rotate(1deg); }
    90% { -webkit-transform: translate(2px, 2px) rotate(0deg); }
    100% { -webkit-transform: translate(1px, -2px) rotate(-1deg); }
}
.shake {
    -webkit-animation-name: shake;
    -webkit-animation-duration: 0.5s;
    -webkit-transform-origin:50% 50%;
    -webkit-animation-iteration-count: infinite;
    /*display:inline-block*/
}
