/**
 * Gallery Lightbox Styles
 * Styles for the post image gallery lightbox
 */

/* Lightbox Container */
.gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-lightbox.active {
    display: block;
    opacity: 1;
}

/* Overlay */
.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    cursor: pointer;
}

/* Content Container */
.lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px 20px;
}

/* Image Wrapper */
.lightbox-image-wrapper {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Image */
.lightbox-image {
    max-width: 100%;
    max-height: calc(90vh - 100px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: lightboxZoomIn 0.3s ease;
}

@keyframes lightboxZoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Caption */
.lightbox-caption {
    margin-top: 20px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.95);
    color: #1f2937;
    border-radius: 8px;
    font-size: 14px;
    max-width: 600px;
    text-align: center;
    line-height: 1.5;
}

/* Counter */
.lightbox-counter {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    color: #1f2937;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    z-index: 10001;
}

/* Close Button */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    transition: all 0.2s ease;
    color: #1f2937;
}

.lightbox-close:hover {
    background: #ffffff;
    transform: scale(1.1);
}

.lightbox-close svg {
    width: 24px;
    height: 24px;
}

/* Navigation Buttons */
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    transition: all 0.2s ease;
    color: #1f2937;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: #ffffff;
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev svg,
.lightbox-next svg {
    width: 24px;
    height: 24px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .lightbox-content {
        padding: 80px 10px 10px;
    }
    
    .lightbox-image-wrapper {
        max-width: 95%;
        max-height: 95%;
    }
    
    .lightbox-image {
        max-height: calc(90vh - 120px);
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-close {
        width: 40px;
        height: 40px;
        top: 15px;
        right: 15px;
    }
    
    .lightbox-counter {
        top: 15px;
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .lightbox-caption {
        font-size: 13px;
        padding: 10px 15px;
        margin-top: 15px;
    }
}

/* Accessibility - Focus Styles */
.lightbox-close:focus,
.lightbox-prev:focus,
.lightbox-next:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Prevent body scroll when lightbox is open */
body.lightbox-open {
    overflow: hidden;
}
