/* To set the foreground to black of the fa-stacked icons */
.icon-foreground {
    color: black;
    margin-left: 0 !important;
}

/* The background (content of album page) */
#body.hidden {
    filter: blur(10px);
    -webkit-filter: blur(10px);
}

/* Content of photo popup: wrapper without any real properties (but allows placing the popup in another page) */
#popupcontent {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;

    z-index: 2;
    background-color: rgba(0, 0, 0, 0.7);
    text-align: center;
}

#popupcontent.active {
    display: block;
}

/* The titlebar of the popup. Contains year and album name and links */
#titlebar {
    /* Vertically center using line-height */
    line-height: 50px;
    height: 50px;
    vertical-align: middle;

    color: #ccc;
    border-bottom: solid 1px #ccc;
    background-color: rgba(0, 0, 0, 0.5);
}

/* The title and its buttons, centered horizontally with a maximum size */
#title {
    width: 100%;
    max-width: 1050px;
    margin: 0 auto;
}

/* The buttons (close and set public/members only) */
#title_buttons {
    float: right;
    margin-left: -145px;
    width: 145px;
}

/* The title text/links */
#title_text {
    /* Do not wrap on too little space, but show "..." */
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    margin: 0 145px 0 5px;
}
#title_text a {
    color: inherit;
    text-decoration: none;
}

/* The buttons in the titlebar */
#visibility, #close, #download, #viewNewTab {
    font-size: 15px;
    color: white;
    float: right;
    line-height: 30px;
    display: block;
    width: 30px;
    height: 30px;
    margin: 10px 5px 10px 0;
    transition: color 0.2s;
}
#visibility:hover, #close:hover, #download:hover, #viewNewTab:hover {
    color: #185943;
}

/* The maximum photo size (screen minus margins) */
#photo_box {
    position: absolute;
    top: 60px;
    left: 65px;
    right: 65px;
    bottom: 10px;
    text-align: center;
}

/* The actual photo + links etc. Defines the maximum size of the photo to prevent scaling when not needed. */
#photo {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 1310px;
    max-height: 830px;
    margin: 0 auto;
}

/* The photo img element. Auto-scales to the maximum allowed size. */
#photo_img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    -webkit-transform: translate(-50%, -50%);

    max-width: 100%;
    max-height: 100%;
    height: auto;
    width: auto;

    color: white;
    font-size: 20pt;
}

/* The previous, next buttons */
#previous, #next {
    position: absolute;
    top: 0;
    bottom: 0;

    display: block;
    width: 55px;
    transition: color 0.2s, opacity 0.2s, visibility 0s linear 0s;

    color: white;
}
#previous {
    left: -60px;
}
#next {
    right: -60px;
}
#previous span, #next span {
    position: absolute;
    top: 50%;
    left: 0;

    margin-top: -37px;
    width: 55px;
    height: 75px;
    font-size: 75px;
}
#previous:hover, #next:hover {
    color: #185943;
}
#previous.hidden, #next.hidden {
    visibility: hidden;
    opacity: 0;
    transition: color 0.2s, opacity 0.2s, visibility 0s linear 0.2s; /* Both the hidden and non-hidden part need a different transition, to make sure visibility: hidden works correctly with the animation */
}

@media (max-width: 600px) and (orientation: portrait) {
    #photo_box {
        bottom: 95px;
        right: 10px;
        left: 10px;
    }

    #previous, #next {
        bottom: 10px;
        top: initial;
        bottom: -48px;
    }
    #previous {
        left: 10px;
    }
    #next {
        right: 10px;
    }
}
