/**
 * Global Lightbox Styles
 * Consolidated from masonry, card, and portrait grids.
 */

#custom-lightbox, .lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
    cursor: default;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    display: block;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    object-fit: contain;
}

/* UI Elements */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 50px;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s;
    z-index: 100001;
}

.lightbox-close:hover {
    transform: scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: none;
    font-size: 40px;
    padding: 20px 15px;
    cursor: pointer;
    z-index: 100000;
    transition: background 0.3s, opacity 0.2s, transform 0.2s;
    border-radius: 4px;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    opacity: 1;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* Caption Styles */
.lightbox-caption {
    text-align: center;
    color: #fff;
    margin-top: 15px;
    padding: 0 10px;
    font-size: 16px;
    font-family: sans-serif;
    max-width: 800px;
}

/* Responsive Overrides */
@media (max-width: 600px) {
    .lightbox-nav {
        padding: 10px;
        font-size: 24px;
        background: rgba(0, 0, 0, 0.5);
    }
}