
/* -----------------------------
   LIGHTBOX OVERLAY
----------------------------- */

#wiki-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1300;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

#wiki-lightbox[hidden] {
    display: none;
}

/* -----------------------------
   IMAGE STAGE
----------------------------- */

#wiki-lightbox-stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    cursor: default;
}

#wiki-lightbox-img {
    max-width: 90%;
    max-height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
    transform-origin: center center;
    transition: opacity 0.15s ease;
    display: block;
}

#wiki-lightbox-img.lightbox-loading {
    opacity: 0.3;
}

/* -----------------------------
   NAVIGATION ARROWS
----------------------------- */

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #fff;
    font-size: 2.8rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.5rem 0.9rem;
    border-radius: 4px;
    z-index: 10;
    transition: background 0.15s;
    user-select: none;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.28);
}

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

/* -----------------------------
   CLOSE BUTTON
----------------------------- */

#wiki-lightbox-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #fff;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.35rem 0.6rem;
    border-radius: 4px;
    z-index: 10;
    transition: background 0.15s;
}

#wiki-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.28);
}

/* -----------------------------
   INFO BAR (bottom)
----------------------------- */

#wiki-lightbox-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.55);
    color: #ddd;
    font-size: 0.85rem;
    min-height: 2.6rem;
    flex-shrink: 0;
}

.lightbox-counter {
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
    min-width: 3.5rem;
}

.lightbox-caption {
    flex: 1;
    text-align: center;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: #bbb;
    font-style: italic;
}

.lightbox-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.lightbox-action-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ddd;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    text-decoration: none;
    line-height: 1.4;
    transition: background 0.12s, color 0.12s;
    user-select: none;
}

.lightbox-action-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.lightbox-action-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

/* -----------------------------
   WIKI CONTENT IMAGE CURSOR
----------------------------- */

.wiki-main img:not(.no-zoom) {
    cursor: zoom-in;
}

/* -----------------------------
   BODY SCROLL LOCK
----------------------------- */

body.lightbox-open {
    overflow: hidden;
}
