/* AZ Lepidoptera — slideshow styles */

/* Container for entire slideshow */
#slideshow {
    display: block;
    box-sizing: border-box;
    padding: 10px;
    background-color: var(--tile-bgr);
}

/* Main panel with slide and captions */
#main_panel {
    max-width: 100%;
    display: block;
    border: 0px;
    padding: 0px;
}

/* Placeholder for long caption text */
#caption_panel {
    box-sizing: border-box;
    height: 100%;
    width: 30%;
    display: inline-block;
    overflow: scroll;
    padding: 10px;
    padding-right: 20px;
    margin: 0px;
    font-size: 1em;
    border: 0px;
    text-align: left;
}

@media screen and (max-width: 1200px) {
    #caption_panel { padding: 0px; padding-right: 10px; }
}

/* Placeholder for slide */
#image_panel {
    display: inline-block;
    height: 100%;
    width: 70%;
    float: right;
    position: relative;
}

/* Container for thumbnail images */
#teaser_panel {
    max-width: 100%;
    display: flex;
    flex-wrap: nowrap;
    overflow: scroll;
    height: 110px;
    margin-top: 10px;
    align-items: flex-start;
    justify-content: flex-start;
}

/* Actual slide image */
.slide {
    position: absolute;
    max-width: 100%;
    max-height: 100%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Thumbnail image */
.thumbnail { flex: 0 0; height: 100px; margin-right: 10px; }

/* Navigation buttons */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    bottom: 50%;
    height: 1.5em;
    width: 1.5em;
    transform: translate(-50%, -50%);
    color: var(--very-bright-color);
    font-weight: bold;
    font-size: 2em;
    padding: 5px;
    text-align: center;
    border-radius: 5px;
    user-select: none;
    opacity: 0.75;
}

.next { right: 1%; }
.prev { left: 1%; transform: translate(50%, -50%); }
.prev:hover, .next:hover { background-color: rgba(0, 0, 0, 0.8); }

/* Slideshow slide change mechanics */
.cursor { cursor: pointer; }
.mySlides { display: none; opacity: 0; transition: opacity 0.4s ease; }
.demo { opacity: 0.6; transition: opacity 0.2s, transform 0.2s; }
.active, .demo:hover { opacity: 1; }
.demo:hover { transform: scale(1.05); }

/* Responsive: phone — caption above image, full width */
@media screen and (max-width: 768px) {
    #caption_panel {
        width: 100%;
        height: auto;
        max-height: 120px;
        display: block;
        font-size: 0.9em;
        padding: 5px;
    }

    #image_panel {
        width: 100%;
        float: none;
    }

    #teaser_panel {
        height: 70px;
    }

    .thumbnail {
        height: 60px;
    }

    .prev, .next {
        font-size: 1.5em;
    }
}
