/* ============================================================
   Rotaz — lightbox.css
   Full-screen carousel overlay
   ============================================================ */

/* ─── Root overlay ──────────────────────────────────────────── */
#rotaz-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    background-color: rgba(0, 0, 0, 0.96);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

#rotaz-lightbox.lb--open {
    opacity: 1;
    pointer-events: all;
}

/* ─── Backdrop (click to close) ────────────────────────────── */
.lb__backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    cursor: zoom-out;
}

/* ─── Close button ──────────────────────────────────────────── */
.lb__close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 20;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    transition: background-color 0.15s;
    line-height: 1;
}

.lb__close:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

/* ─── Counter ───────────────────────────────────────────────── */
.lb__counter {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    background-color: rgba(0, 0, 0, 0.4);
    padding: 4px 12px;
    border-radius: 999px;
    pointer-events: none;
    white-space: nowrap;
}

/* ─── Chevrons ──────────────────────────────────────────────── */
.lb__chevron {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    transition: background-color 0.15s, opacity 0.15s;
    /* Keep above backdrop but below nothing */
    pointer-events: all;
}

/* Chevrons sit centered within the track area (above thumb strip) */
.lb__chevron {
    bottom: calc(80px + 16px); /* thumb strip height + spacing */
    top: auto;
    transform: translateY(50%);
}

.lb__chevron--prev { left: 12px; }
.lb__chevron--next { right: 12px; }

.lb__chevron:hover {
    background-color: rgba(255, 255, 255, 0.28);
}

.lb__chevron:disabled {
    opacity: 0.2;
    cursor: default;
}

@media (max-width: 600px) {
    .lb__chevron {
        width: 36px;
        height: 36px;
        font-size: 22px;
    }
    .lb__chevron--prev { left: 6px; }
    .lb__chevron--next { right: 6px; }
}

/* ─── Track wrap (takes remaining vertical space) ───────────── */
.lb__track-wrap {
    position: relative;
    z-index: 1;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* ─── Track: horizontal scroll-snap ────────────────────────── */
.lb__track {
    display: flex;
    width: 100%;
    height: 100%;
    overflow-x: scroll;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;        /* Firefox */
    cursor: grab;
}

.lb__track:active {
    cursor: grabbing;
}

.lb__track::-webkit-scrollbar {
    display: none;
}

/* ─── Individual slide ──────────────────────────────────────── */
.lb__slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 64px 16px;
    box-sizing: border-box;
    position: relative;
}

@media (max-width: 600px) {
    .lb__slide {
        padding: 56px 12px 12px;
    }
}

/* ─── Image ─────────────────────────────────────────────────── */
.lb__img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
    user-select: none;
    pointer-events: none;  /* so drag doesn't break scroll */
}

/* ─── Video ─────────────────────────────────────────────────── */
.lb__video {
    max-width: 100%;
    max-height: 100%;
    border-radius: 6px;
    background-color: #000;
    outline: none;
}

/* ─── Download link (non-playable video) ───────────────────── */
.lb__download-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 48px;
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 15px;
    transition: background-color 0.15s, color 0.15s;
}

.lb__download-link span:first-child {
    font-size: 3rem;
}

.lb__download-link:hover {
    background-color: rgba(245, 181, 48, 0.15);
    color: #f5b530;
    text-decoration: none;
}

.lb__download-link small {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ─── Thumbnail strip ───────────────────────────────────────── */
.lb__thumbs {
    position: relative;
    z-index: 10;
    height: 80px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    background-color: rgba(0, 0, 0, 0.5);
    scroll-behavior: smooth;
}

.lb__thumbs::-webkit-scrollbar {
    display: none;
}

/* ─── Individual thumbnail button ───────────────────────────── */
.lb__thumb {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.08);
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s, transform 0.15s, opacity 0.15s;
    opacity: 0.55;
}

.lb__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.lb__thumb-icon {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.6);
}

.lb__thumb:hover {
    opacity: 0.85;
    transform: scale(1.06);
}

.lb__thumb--active {
    border-color: #f5b530;
    opacity: 1;
    transform: scale(1.08);
}
