/* Lightbox (static/js/utils/lightbox.js) — shared public/admin viewer.
   Self-contained: no admin.css variables required. */
#image-lightbox-modal {
    display: none;
}
#image-lightbox-modal.is-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    z-index: 100;
    background-color: rgba(7, 11, 19, 0.92);
    backdrop-filter: blur(8px);
    color: #fff;
}
#lightbox-stage {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    padding: 0.5rem;
}
#lightbox-img-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    max-height: 100%;
    overflow: hidden;
}
#lightbox-img {
    max-width: 92vw;
    max-height: 76vh;
    object-fit: contain;
    border-radius: 0.75rem;
    transition: transform 0.2s ease;
    cursor: zoom-in;
}
#lightbox-img.zoom-2x {
    transform: scale(2);
    cursor: zoom-out;
}
.lightbox-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    transition: background-color 0.15s ease;
    flex-shrink: 0;
}
.lightbox-btn:hover {
    background-color: rgba(255, 255, 255, 0.25);
}
.lightbox-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.5rem 1rem;
    color: #fff;
    z-index: 30;
}
.lightbox-topbar-left,
.lightbox-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.lightbox-topbar-actions {
    gap: 0.5rem;
}
.lightbox-counter {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    white-space: nowrap;
}
.lightbox-title {
    display: none;
    font-size: 0.75rem;
    color: #cbd5e1;
    max-width: 28rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}
@media (min-width: 640px) {
    .lightbox-title {
        display: inline;
    }
}
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 30;
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
}
.lightbox-nav-prev {
    left: 0.5rem;
}
.lightbox-nav-next {
    right: 0.5rem;
}
.lightbox-thumbs-bar {
    width: 100%;
    padding: 0.25rem 0.5rem 0.75rem;
    z-index: 30;
}
.lightbox-thumbs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    overflow-x: auto;
    max-width: 56rem;
    margin: 0 auto;
}
.lightbox-thumb {
    width: 3.5rem;
    height: 2.5rem;
    object-fit: cover;
    border-radius: 0.375rem;
    cursor: pointer;
    opacity: 0.65;
    flex-shrink: 0;
    transition: opacity 0.15s ease, outline 0.15s ease;
}
.lightbox-thumb:hover {
    opacity: 1;
}
.lightbox-thumb.active {
    opacity: 1;
    outline: 2px solid #ea580c;
}
