/**
 * Chapter Photos Frontend Styles
 */

.chapter-swiper-container {
    width: 100%;
    padding-bottom: 50px;
    /* Space for pagination */
    position: relative;
    overflow: hidden;
    margin: 20px 0;
}

.chapter-swiper-container .swiper-slide {
    background-position: center;
    background-size: cover;
    width: 300px;
    /* Default width */
    height: 300px;
    /* Fixed height for uniformity */
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    overflow: hidden;
}

.chapter-swiper-container .swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Nav Buttons */
.chapter-swiper-container .swiper-button-next,
.chapter-swiper-container .swiper-button-prev {
    color: #fff;
    filter: drop-shadow(0px 0px 5px rgba(0, 0, 0, 0.8));
    z-index: 10;
}

/* Pagination: Fraction Style */
.chapter-swiper-container .swiper-pagination-fraction {
    color: #fff;
    bottom: 5px;
    font-weight: bold;
    font-family: sans-serif;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 15px;
    border-radius: 20px;
    display: inline-block;
    width: auto;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}


/* Album Link */
.chapter-photos-album-link-wrapper {
    text-align: center;
    margin-top: 14px;
    margin-bottom: 4px;
}

.chapter-photos-album-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    background-color: var(--color-primary-red, #8B0000);
    border-radius: var(--radius-sm, 8px);
    color: #fff;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.chapter-photos-album-link:hover {
    background-color: var(--color-primary-red-dark, #6E0000);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 0, 0, 0.25);
    text-decoration: none;
}


/* LIGHTBOX STYLES */
#chapter-lightbox {
    display: none;
    /* Hidden by default */
    position: fixed;
    z-index: 999999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
}

/* Modal Content (image) */
#chapter-lightbox .lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    animation-name: zoom;
    animation-duration: 0.3s;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

@keyframes zoom {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* The Close Button */
#chapter-lightbox .close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #f1f1f1;
    font-size: 50px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    line-height: 1;
    z-index: 100;
}

#chapter-lightbox .close:hover,
#chapter-lightbox .close:focus {
    color: #fff;
    text-shadow: 0 0 10px #fff;
    text-decoration: none;
    cursor: pointer;
}

/* Prev/Next Navigation Arrows */
#chapter-lightbox .lightbox-prev,
#chapter-lightbox .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    line-height: 1;
    user-select: none;
    cursor: pointer;
    padding: 10px 20px;
    transition: 0.3s;
    z-index: 100;
}

#chapter-lightbox .lightbox-prev {
    left: 10px;
}

#chapter-lightbox .lightbox-next {
    right: 10px;
}

#chapter-lightbox .lightbox-prev:hover,
#chapter-lightbox .lightbox-next:hover {
    color: #fff;
    text-shadow: 0 0 10px #fff;
}