/* Lightbox Overlay */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 300ms ease-in-out;
    cursor: zoom-out;
}

.lightbox-overlay.active {
    opacity: 1;
}

/* Image Container */
.lightbox-image-container {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: default;
}

/* Lightbox Image */
.lightbox-image {
    max-width: 100%;
    max-height: 95vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-lg, 16px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    cursor: default;
    animation: lightbox-image-zoom-in 300ms ease-out;
}

@keyframes lightbox-image-zoom-in {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Close Button */
.lightbox-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 32px;
    line-height: 38px;
    color: var(--text-primary, #1A202C);
    cursor: pointer;
    transition: all 200ms ease-in-out;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: baseline;
    justify-content: center;
    z-index: 10000;
}

.lightbox-close-btn:hover {
    background-color: var(--color-primary, #FF6B35);
    color: white;
    transform: rotate(90deg);
}

.lightbox-close-btn:active {
    transform: rotate(90deg);
}

/* Loading Spinner */
.lightbox-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-spinner .spinner-border {
    width: 4rem;
    height: 4rem;
}

/* Error Message */
.lightbox-error {
    font-size: 1.2rem;
    padding: 2rem;
    text-align: center;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .lightbox-image {
        max-width: 96vw;
        max-height: 90vh;
        border-radius: 0;
    }
    
    .lightbox-close-btn {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 28px;
        line-height: 34px;
    }
}
