/* ============================================================
   WPCarSync — wpcs-lightbox.css
   Global lightbox overlay — used by wpcsInitLightbox() in wpcs-core.js.
   Loaded for both modern and legacy themes.
   ============================================================ */

.wpcs-lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(8, 10, 14, 0.96);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 300ms ease;
}

.wpcs-lightbox.open {
    opacity: 1;
    pointer-events: all;
}

.wpcs-lightbox__inner {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    width: 100%;
}

.wpcs-lightbox__img {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    display: block;
    border-radius: 4px;
}

.wpcs-lightbox__close {
    position: absolute;
    top: -48px;
    right: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 200ms ease;
}

.wpcs-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.22);
}

.wpcs-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 200ms ease;
}

.wpcs-lightbox__nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.wpcs-lightbox__nav--prev { left: -64px; }
.wpcs-lightbox__nav--next { right: -64px; }

.wpcs-lightbox__counter {
    position: absolute;
    bottom: -36px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 768px) {
    .wpcs-lightbox__inner {
        max-width: 100vw;
        padding: 0 52px;
        box-sizing: border-box;
    }
    .wpcs-lightbox__nav--prev { left: 8px; }
    .wpcs-lightbox__nav--next { right: 8px; }
}
