/* ============================================================
   Global Lightbox — lightbox.css
   Works with lightbox.js  |  No external dependencies
   ============================================================ */

/* ── Backdrop ─────────────────────────────────────────────── */
.lb-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, .92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 16px 80px;   /* top: room for close btn; bottom: thumbnails */
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

/* ── Stage (image container) ──────────────────────────────── */
.lb-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 900px;
    flex: 1;
    min-height: 0;
}

/* ── Main image ───────────────────────────────────────────── */
.lb-image {
    max-width: 100%;
    max-height: calc(100vh - 200px);  /* leave room for thumbnails + caption */
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    cursor: zoom-in;
    transition: transform .35s cubic-bezier(.4, 0, .2, 1),
                box-shadow .35s ease;
    box-shadow: 0 8px 48px rgba(0, 0, 0, .6);
    user-select: none;
}

.lb-image.lb-zoomed {
    transform: scale(1.85);
    cursor: zoom-out;
    z-index: 2;
}

.lb-image.lb-img-hidden {
    opacity: 0;
    pointer-events: none;
}

/* ── Caption ──────────────────────────────────────────────── */
.lb-caption {
    position: absolute;
    bottom: -36px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .4px;
    padding: 5px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, .15);
    pointer-events: none;
}

/* ── Close button ─────────────────────────────────────────── */
.lb-btn-close {
    position: fixed;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: background .2s, transform .2s;
    z-index: 10001;
}
.lb-btn-close:hover {
    background: rgba(255, 255, 255, .22);
    transform: rotate(90deg);
}

/* ── Zoom button ──────────────────────────────────────────── */
.lb-btn-zoom {
    position: fixed;
    top: 16px;
    right: 64px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: background .2s;
    z-index: 10001;
}
.lb-btn-zoom:hover { background: rgba(255, 255, 255, .22); }

/* ── Counter badge ────────────────────────────────────────── */
.lb-counter {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, .75);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .5px;
    pointer-events: none;
    z-index: 10001;
}

/* ── Navigation arrows ────────────────────────────────────── */
.lb-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: background .2s, transform .2s;
    z-index: 10001;
}
.lb-arrow:hover {
    background: rgba(255, 255, 255, .22);
}
.lb-arrow-left  { left: 16px; }
.lb-arrow-right { right: 16px; }
.lb-arrow-left:hover  { transform: translateY(-50%) translateX(-2px); }
.lb-arrow-right:hover { transform: translateY(-50%) translateX(2px); }

/* ── Thumbnail strip ──────────────────────────────────────── */
.lb-thumbnails {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
    padding: 10px 4px 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.3) transparent;
}
.lb-thumbnails::-webkit-scrollbar { height: 4px; }
.lb-thumbnails::-webkit-scrollbar-track { background: transparent; }
.lb-thumbnails::-webkit-scrollbar-thumb { background: rgba(255,255,255,.3); border-radius: 2px; }

.lb-thumb {
    flex-shrink: 0;
    width: 60px;
    height: 44px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    opacity: .55;
    transition: opacity .2s, border-color .2s, transform .2s;
    padding: 0;
    background: #222;
}
.lb-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}
.lb-thumb:hover { opacity: .85; transform: translateY(-2px); }
.lb-thumb.lb-thumb-active {
    border-color: #49ABC8;   /* your primary colour */
    opacity: 1;
    transform: translateY(-3px);
}

/* ── Spinner ──────────────────────────────────────────────── */
.lb-spinner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lb-spin {
    animation: lb-rotate .7s linear infinite;
}
@keyframes lb-rotate { to { transform: rotate(360deg); } }

/* ── Transitions ──────────────────────────────────────────── */
.lb-fade-enter-active, .lb-fade-leave-active { transition: opacity .25s ease; }
.lb-fade-enter, .lb-fade-leave-to            { opacity: 0; }

.lb-img-fade-enter-active, .lb-img-fade-leave-active { transition: opacity .2s ease; }
.lb-img-fade-enter, .lb-img-fade-leave-to            { opacity: 0; }

/* ── Mobile ───────────────────────────────────────────────── */
@media (max-width: 640px) {
    .lb-arrow { width: 38px; height: 38px; }
    .lb-arrow-left  { left: 6px; }
    .lb-arrow-right { right: 6px; }
    .lb-image { max-height: calc(100vh - 160px); }
    .lb-thumb { width: 48px; height: 36px; }
}
