/* Lightbox - image viewer */
.lightbox {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(0.5px);
    text-align: center;
}

/* The active state when the lightbox is open */
.lightbox.lightbox-active {
    display: block; /* For desktop */
}

.dark .lightbox {
    background-color: rgba(0, 0, 0, 0.7);
}

.light .lightbox {
    background-color: rgba(250, 250, 250, 0.4);
}

.lightbox-content {
    max-width: 85%;
    max-height: 85vh;
    margin: 5% auto; /* Provides some spacing from the edges */
    border-radius: 8px;
}

.close, .prev, .next {
    position: absolute;
    cursor: pointer;
    user-select: none;
    color: white;
    text-shadow: 0 0 8px rgba(0,0,0,0.8);
    -webkit-tap-highlight-color: transparent;
}

.close:hover {
    transform: scale(1.1);
}

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

.close {
    top: 0;
    right: 0;
    font-size: 3rem;
    padding: 1rem 2rem; /* Larger click area */
}

.prev, .next {
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    padding: 1rem 2rem; /* Larger click area */
}

.prev {
    left: 0;
}

.next {
    right: 0;
}
