/**
 * -----------------------------------------------------------------------------
 * --- Overlay -----------------------------------------------------------------
 * -----------------------------------------------------------------------------
 */
.lightbox-overlay {
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    overflow: auto;
    width: 100%;
    height: 100%;
    padding: 0;
    background-color: #000000e7; /* Black w/ opacity */
}

/**
 * -----------------------------------------------------------------------------
 * --- Content -----------------------------------------------------------------
 * -----------------------------------------------------------------------------
 */
.lightbox-content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

/**
 * -----------------------------------------------------------------------------
 * --- Loader ------------------------------------------------------------------
 * -----------------------------------------------------------------------------
 */
.lightbox-content__image-loader {
    position: absolute;
    z-index: 1002;
    width: 80px;
    height: 80px;
    margin: auto;
    animation: spin 1s linear infinite;
    border: 10px solid var(--color-action);
    border-top-color: white;
    border-radius: 50%;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/**
 * -----------------------------------------------------------------------------
 * --- Image -------------------------------------------------------------------
 * -----------------------------------------------------------------------------
 */

/* Mobile */
.lightbox-content img {
    position: relative;
    z-index: 1001;
    min-width: 1px;
    max-width: calc(100vw - 120px);
    min-height: 1px;
    max-height: calc(100vh - 100px);
    margin: auto;
    border-radius: 10px;
    background-color: #999999;
}

/* Tablet */
@media screen and (min-width: 425px) {
    .lightbox-content img {
        max-width: calc(100vw - 130px);
        max-height: calc(100vh - 110px);
    }
}

/* Desktop */
@media screen and (min-width: 768px) {
    .lightbox-content img {
        max-width: calc(100vw - 140px);
        max-height: calc(100vh - 120px);
    }
}

/**
 * -----------------------------------------------------------------------------
 * --- Counter -----------------------------------------------------------------
 * -----------------------------------------------------------------------------
 */
.lightbox-content__index-counter {
    font-size: 16px;
    position: absolute;
    z-index: 1003;
    top: 10px;
    margin: auto;
    padding: 5px;
    color: #ffffff;
}

/**
 * -----------------------------------------------------------------------------
 * --- Description -------------------------------------------------------------
 * -----------------------------------------------------------------------------
 */
.lightbox-content__description {
    font-size: 14px;
    position: absolute;
    z-index: 1003;
    bottom: 12px;
    margin: auto;
    padding: 5px 60px;
    color: #ffffff;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    width: 100%;
    text-align: center;
}

/**
 * -----------------------------------------------------------------------------
 * --- Buttons -----------------------------------------------------------------
 * -----------------------------------------------------------------------------
 */
.lightbox-content__button-close {
    font-size: 40px;
    font-weight: bold;
    position: absolute;
    top: 0;
    right: 10px;
    cursor: pointer;
    transition: 0.25s;
    text-decoration: none;
    color: #ffffff;
    border: none;
    background-color: transparent;
}

.lightbox-content__button-close:hover,
.lightbox-content__button-close:focus {
    color: #e30613;
}

.lightbox-content__button-previous,
.lightbox-content__button-previous:link,
.lightbox-content__button-previous:active,
.lightbox-content__button-previous:visited,
.lightbox-content__button-next,
.lightbox-content__button-next:link,
.lightbox-content__button-next:active,
.lightbox-content__button-next:visited {
    font-size: 16px;
    font-weight: bold;
    position: absolute;
    z-index: 1002;
    top: 50%;
    width: auto;
    padding: 16px;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    transition: 0.25s;
    transform: translateY(-50%);
    text-decoration: none;
    color: #333333;
    background-color: #ffffff;
}

.lightbox-content__button-previous {
    left: 0;
    border-radius: 0 3px 3px 0;
}

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

.lightbox-content__button-previous:hover,
.lightbox-content__button-next:hover {
    text-decoration: none;
    color: #ffffff;
    background-color: #e30613;
}
