/* lightbox.css - Styling for image lightbox/modal with enhanced features */

.lightbox-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.lightbox-container.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    animation: lightboxFadeIn 0.3s ease;
}

.lightbox-image-container {
    position: relative;
    overflow: hidden;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    max-height: 70vh;
    margin-bottom: 10px;
}

.lightbox-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.lightbox-caption-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.5);
    margin-top: 10px;
    border-radius: 4px;
}

.lightbox-caption {
    text-align: left;
    font-size: 1.1rem;
    max-width: 80%;
}

.lightbox-counter {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    z-index: 1001;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.lightbox-close:hover {
    opacity: 1;
}

/* Navigation arrows */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s, background-color 0.3s;
    z-index: 1001;
}

.lightbox-nav:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.8);
}

.lightbox-prev {
    left: -70px;
}

.lightbox-next {
    right: -70px;
}

/* Thumbnail gallery */
.lightbox-thumbnails-container {
    margin-top: 15px;
    max-width: 100%;
    overflow-x: auto;
    text-align: center;
}

.lightbox-thumbnails {
    display: inline-flex;
    gap: 10px;
    padding: 10px 0;
}

.lightbox-thumbnail {
    width: 60px;
    height: 50px;
    border-radius: 4px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s, transform 0.2s;
    border: 2px solid transparent;
}

.lightbox-thumbnail:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.lightbox-thumbnail.active {
    opacity: 1;
    border-color: var(--primary);
}

/* Slideshow controls */
.lightbox-controls {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.lightbox-slideshow-toggle {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s;
}

.lightbox-slideshow-toggle:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.lightbox-slideshow-toggle.playing .fa-play {
    display: none;
}

.lightbox-slideshow-toggle:not(.playing) .fa-pause {
    display: none;
}

/* Animation */
@keyframes lightboxFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Mobile styling */
@media (max-width: 768px) {
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-image {
        max-height: 60vh;
    }
    
    .lightbox-thumbnail {
        width: 50px;
        height: 40px;
    }
    
    .lightbox-caption {
        font-size: 0.9rem;
    }
}