/* Lightbox Modal Styles */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.lightbox-content {
    max-width: 95vw;
    max-height: 95vh;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.lightbox-overlay.active .lightbox-content {
    transform: scale(1);
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 0.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Scrollable lightbox variant for tall images */
.lightbox-overlay.scrollable .lightbox-content {
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 0.5rem;
    background: white;
}

.lightbox-overlay.scrollable .lightbox-image {
    max-height: none;
    width: auto;
    max-width: 100%;
    border-radius: 0;
}

/* Cropped preview for tall images */
.lightbox-preview-cropped {
    overflow: hidden;
    position: relative;
}

.lightbox-preview-cropped img {
    object-fit: cover;
    object-position: top;
    width: 100%;
    height: 100%;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 9999px;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.lightbox-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.lightbox-hint {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}
