/* Lightweight overlay viewer for clickable thumbnails.
 * Activated by <a data-pv-lightbox href="..."> anchors.
 * Keeps ticket attachments (and future image sets) in-page instead of
 * opening a separate tab, while still letting the user download via the
 * original link target if they want.
 */

.pv-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.86);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}
.pv-lightbox.open {
    opacity: 1;
    pointer-events: auto;
}
.pv-lightbox__img {
    max-width: 100%;
    max-height: calc(100vh - 120px);
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
    user-select: none;
    cursor: zoom-out;
}
.pv-lightbox__caption {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.88rem;
    margin-top: 12px;
    text-align: center;
    max-width: 90%;
    word-break: break-word;
    pointer-events: none;
}
.pv-lightbox__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.pv-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.22);
}
.pv-lightbox__download {
    position: absolute;
    bottom: 20px;
    right: 20px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    text-decoration: none;
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s ease;
}
.pv-lightbox__download:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}
.pv-lightbox__spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: pv-lightbox-spin 0.8s linear infinite;
}
@keyframes pv-lightbox-spin {
    to { transform: rotate(360deg); }
}
