/* ════════════════════════════════════════════════════════════
   galleryLightbox.css
   Delicate Creations — Gallery Lightbox

   Link AFTER stylesheet.css:
   <link rel="stylesheet" href="css/galleryLightbox.css">
════════════════════════════════════════════════════════════ */

/* ─── Overlay ─── */
#lb-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 9, 8, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}

#lb-overlay.lb-active {
    opacity: 1;
    pointer-events: all;
}

/* ─── Image — the entire focus ─── */
#lb-img {
    display: block;
    max-width: 92vw;
    max-height: 92vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.25s ease;
    user-select: none;
    -webkit-user-drag: none;
}

/* ─── Loader spinner ─── */
#lb-loader {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lb-spinner {
    width: 28px;
    height: 28px;
    border: 2px solid rgba(201, 164, 93, 0.25);
    border-top-color: rgba(201, 164, 93, 0.85);
    border-radius: 50%;
    animation: lbSpin 0.75s linear infinite;
}

@keyframes lbSpin {
    to { transform: rotate(360deg); }
}

/* ─── Close — top-right corner ─── */
#lb-close {
    all: unset;
    position: fixed;
    top: 1.2rem;
    right: 1.4rem;
    z-index: 100001;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.75);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    box-sizing: border-box;
}

#lb-close:hover {
    background: rgba(201, 164, 93, 0.85);
    color: #fff;
}

/* ─── Counter — top-left corner ─── */
#lb-counter {
    position: fixed;
    top: 1.35rem;
    left: 1.5rem;
    z-index: 100001;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.58rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    pointer-events: none;
}

/* ─── Chevrons — floating left and right ─── */
#lb-prev,
#lb-next {
    all: unset;
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.2s;
    box-sizing: border-box;
}

#lb-prev { left: 1.2rem; }
#lb-next { right: 1.2rem; }

#lb-prev:hover,
#lb-next:hover {
    background: rgba(201, 164, 93, 0.75);
    color: #fff;
    transform: translateY(-50%) scale(1.1);
}

#lb-prev:active,
#lb-next:active {
    transform: translateY(-50%) scale(0.95);
}

#lb-prev svg,
#lb-next svg {
    width: 20px;
    height: 20px;
    pointer-events: none;
    flex-shrink: 0;
}

/* ─── Image enter animation ─── */
@keyframes lbFadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to   { opacity: 1; transform: scale(1); }
}

.lb-img-enter {
    animation: lbFadeIn 0.22s ease forwards;
}

/* ─── Cursor hint ─── */
.gallery-item {
    cursor: zoom-in;
}

/* ─── Mobile ─── */
@media (max-width: 640px) {
    #lb-img {
        max-width: 96vw;
        max-height: 88vh;
    }

    #lb-prev { left: 0.5rem; }
    #lb-next { right: 0.5rem; }

    #lb-prev,
    #lb-next {
        width: 38px;
        height: 38px;
    }

    #lb-prev svg,
    #lb-next svg {
        width: 18px;
        height: 18px;
    }

    #lb-close {
        top: 0.8rem;
        right: 0.8rem;
        width: 32px;
        height: 32px;
    }

    #lb-counter {
        top: 0.95rem;
        left: 0.9rem;
    }
}
