/* ==========================================================================
   Edy London: press logos: mobile swipe slider + press scan popup
   Markup: template-parts/home/press.php (.el-press__logos--slider,
   [data-press-image] buttons)
   Scripts: assets/js/press-slider.js (adds the loop clones),
   assets/js/press-popup.js (builds the .el-lightbox dialog)
   Desktop and tablet keep the static row from edy.css.
   ========================================================================== */

/* Loop clones are only used on mobile. */
.el-press__logos--slider > li[data-el-clone] {
    display: none;
}

/* ---------- Mobile: one centred logo per view, native swipe + snap */
@media (max-width: 767px) {
    .el-press__logos--slider {
        position: relative;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 0;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .el-press__logos--slider::-webkit-scrollbar {
        display: none;
    }

    .el-press__logos--slider > li,
    .el-press__logos--slider > li[data-el-clone] {
        display: flex;
        flex: 0 0 100%;
        align-items: center;
        justify-content: center;
        scroll-snap-align: center;
    }

    /* Hover zoom is a desktop effect. */
    .el-press__logos--slider a:hover img,
    .el-press__logos--slider .el-press__image-trigger:hover img {
        transform: none;
    }
}

/* ---------- Press scan popup (reusable: any [data-press-image] button) */
.el-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(56px, 7vw, 80px) clamp(16px, 4vw, 48px);
    background: rgba(29, 25, 20, .88);
}

.el-lightbox[hidden] {
    display: none;
}

.el-lightbox__img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
    background: #fff;
}

.el-lightbox__close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .6);
    border-radius: 50%;
    background: rgba(0, 0, 0, .25);
    color: #fff;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}

.el-lightbox__close:hover,
.el-lightbox__close:focus-visible {
    background: #fff;
    color: var(--el-ink);
}

.el-lightbox__close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.el-lightbox__close svg {
    width: 20px;
    height: 20px;
}

/* Page scroll is locked while the popup is open. */
.el-lightbox-open {
    overflow: hidden;
}
