/* Forum Lightbox Styles */

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-caption {
    color: white;
    margin-top: 1rem;
    font-size: 1rem;
    text-align: center;
    max-width: 80%;
}

.lightbox-counter {
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: transparent;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    padding: 0;
    width: 50px;
    height: 50px;
    line-height: 50px;
    transition: transform 0.2s;
}

.lightbox-close:hover {
    transform: rotate(90deg);
    color: #ff4444;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 1rem;
    width: 50px;
    height: 80px;
    transition: background 0.2s;
    border-radius: 4px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
    left: -80px;
}

.lightbox-next {
    right: -80px;
}

/* Responsive */
@media (max-width: 768px) {
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 2rem;
    }
}

/* Inline images in posts - make them clickable */
.lightbox-inline-image {
    cursor: pointer;
    display: inline-block;
    transition: opacity 0.2s;
}

.lightbox-inline-image:hover {
    opacity: 0.9;
}

.lightbox-inline-image img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Forum attachment thumbnail styles */
.lightbox-image-link {
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.lightbox-image-link::after {
    content: '??';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    opacity: 0;
    transition: opacity 0.2s;
    background: rgba(0, 0, 0, 0.5);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image-link:hover::after {
    opacity: 1;
}

.lightbox-image-link:hover img {
    transform: scale(1.05);
    transition: transform 0.3s;
}
