﻿/* =========================
   Image tiles
========================= */

.image-tile {
    margin: auto;
    overflow: hidden;
}

.image-tile-landscape {
    aspect-ratio: 4 / 3;
}

.image-tile-portrait {
    aspect-ratio: 3 / 4;
}

.image-tile-square {
    aspect-ratio: 1 / 1;
}

.image-tile img,
.listItemOverlayContainer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =========================
   Overlay container
========================= */

.listItemOverlayContainer {
    position: relative;
    display: inline-block;
    overflow: hidden;
    cursor: pointer;
}

.listItemOverlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
}

.image-tile img {
    position: relative;
    z-index: 1;
}

/* Hover effects */
.image-tile:hover .listItemOverlay,
.listItemOverlayContainer:hover .listItemOverlay {
    opacity: 1;
}

.listItemOverlayContainer:hover img {
    opacity: 0.7;
}

/* =========================
   Overlay content
========================= */
.listItemOverlayText {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    white-space: nowrap;
    color: white;
    font-size: 16px;
    cursor: pointer;
}


.listItemOverlayContainer:hover .listItemOverlayText,
.listItemOverlayButton:hover {
    color: lightgray;
}

.listItemOverlayButton {
    pointer-events: auto;
    cursor: pointer;
    color: #fff;
    font-size: 1.25rem;
}

.listItemOverlayContent {
    display: block;
    width: 100%;
}

/* =========================
   Thumbnails
========================= */

.overlayThumbnailListItem {
    width: 180px;
    height: 180px;
}

/* =========================
   Slideshow modal (base)
========================= */

.slideshow-modal {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 7000;
    padding-top: 100px;
    overflow: auto;
    background-color: black;
}

.slideshow-modal-content {
    position: relative;
    margin: auto;
    width: 100%;
    max-width: 1000px;
    background-color: #fefefe;
}

.slideshow-close {
    position: absolute;
    top: 10px;
    right: 25px;
    font-size: 35px;
    font-weight: bold;
    color: white;
    cursor: pointer;
}

    .slideshow-close:hover,
    .slideshow-close:focus {
        color: #999;
        text-decoration: none;
    }

/* =========================
   Slideshow navigation
========================= */

.slideshow-prev,
.slideshow-next {
    position: absolute;
    top: 50%;
    padding: 8px;
    margin-top: -50px;
    font-size: 25px;
    font-weight: bold;
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    user-select: none;
    transition: background-color 0.6s ease;
}

.slideshow-next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.slideshow-prev {
    border-radius: 0 3px 3px 0;
}

    .slideshow-prev:hover,
    .slideshow-next:hover {
        background-color: rgba(0, 0, 0, 0.9);
    }

/* =========================
   Slideshow caption
========================= */

.slideshow-caption-container {
    text-align: center;
    background-color: black;
    padding: 2px 16px;
    color: white;
}

/* =========================
   Color previews
========================= */

.color-square,
.color-preview {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid #ccc;
}

/* =========================
   Responsive
========================= */

@media screen and (max-width: 770px) {
    .imageModal-content {
        width: 100%;
    }

    .cmpt-folder-list-card-item {
        width: 160px;
        height: 345px;
    }

    .slideshow-prev,
    .slideshow-next {
        font-size: 20px;
    }
}

@media screen and (min-width: 771px) {
    .cmpt-folder-list-card-item {
        width: 220px;
        height: 415px;
    }
}
