/* ============================================================
   LM Gallery — Lightbox Overlay
   ============================================================ */
.lm-lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.lm-lightbox-img-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 85vh;
    padding: 20px;
}

.lm-lightbox-img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    user-select: none;
    -webkit-user-drag: none;
}

.lm-lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 2;
    line-height: 1;
    padding: 4px 8px;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.lm-lightbox-close:hover {
    opacity: 1;
}

.lm-lightbox-prev,
.lm-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    opacity: 0.8;
    transition: opacity 0.2s ease, background 0.2s ease;
}

.lm-lightbox-prev:hover,
.lm-lightbox-next:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.25);
}

.lm-lightbox-prev svg,
.lm-lightbox-next svg {
    width: 24px;
    height: 24px;
}

.lm-lightbox-prev {
    left: 16px;
}

.lm-lightbox-next {
    right: 16px;
}

.lm-lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    z-index: 2;
}

/* Mobile adjustments */
@media (max-width: 576px) {
    .lm-lightbox-prev,
    .lm-lightbox-next {
        width: 38px;
        height: 38px;
    }

    .lm-lightbox-prev svg,
    .lm-lightbox-next svg {
        width: 20px;
        height: 20px;
    }

    .lm-lightbox-prev {
        left: 8px;
    }

    .lm-lightbox-next {
        right: 8px;
    }

    .lm-lightbox-close {
        top: 8px;
        right: 12px;
        font-size: 2rem;
    }

    .lm-lightbox-img-wrapper {
        padding: 10px;
    }
}