﻿#lightbox {
    position: fixed;
    inset: 0; /* shortcut for top/left/right/bottom: 0 */
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    cursor: zoom-out;
    padding: 20px;
}

    #lightbox.active {
        opacity: 1;
        pointer-events: auto;
    }

/* The "Polaroid" Frame */
.lightbox-content {
    background: white;
    padding: 15px 15px 15px 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    max-width: 95vw;
    max-height: 90vh;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#lightbox.active .lightbox-content {
    transform: scale(1);
}

#lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    cursor: zoom-out;
}

#lightbox-caption {
    margin-top: 15px;
    color: #333;
    font-family: sans-serif;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Big Close Button for Thumbs */
.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    color: white;
    font-size: 40px;
    padding: 10px;
    line-height: 1;
    cursor: pointer;
}

/* --- MOBILE SPECIFIC FIXES --- */
@media (max-width: 600px) {
    .lightbox-content {
        padding: 10px 10px 30px 10px; /* Thinner borders on mobile */
        width: 100%;
    }

    #lightbox-caption {
        font-size: 0.9rem;
        margin-top: 10px;
    }
}
