/* ==========================================================================
   Region Gallery Lightbox
   Lightbox-only rules extracted verbatim from css/gallery-page.css so they can
   be linked into region pages WITHOUT importing gallery.html page chrome or its
   body{} theme override. Class names are byte-identical to gallery-page.css so
   css/light-theme.css overrides apply with no extra work.
   ========================================================================== */

.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
}
.lightbox-overlay.open { display: flex; }
.lightbox-container {
    display: flex;
    max-width: 1100px;
    max-height: 90vh;
    width: 90%;
    background: #161b22;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,0.6);
    animation: lightboxIn 0.25s ease-out;
}
@keyframes lightboxIn {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}
.lightbox-image-wrap {
    flex: 1 1 60%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0d1117;
    min-height: 300px;
}
.lightbox-image-wrap img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
}
.lightbox-info {
    flex: 0 0 320px;
    padding: 30px 25px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    border-left: 1px solid rgba(255,255,255,0.06);
}
.lightbox-info h2 {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    color: #f59e0b;
    margin: 0;
}
.lightbox-info .lb-category {
    font-size: 0.8rem;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.lightbox-info .lb-lore {
    color: #c9d1d9;
    line-height: 1.7;
    font-size: 0.95rem;
}
.lightbox-info .lb-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.lightbox-info .lb-tag {
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
    color: #8b949e;
}
.lightbox-close {
    position: absolute;
    top: 18px;
    right: 22px;
    color: #8b949e;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 10000;
    transition: color 0.2s;
    background: none;
    border: none;
    line-height: 1;
}
.lightbox-close:hover { color: #f59e0b; }
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    color: #c9d1d9;
    font-size: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10000;
}
.lightbox-nav:hover { background: rgba(245,158,11,0.3); border-color: #f59e0b; color: #fff; }
.lightbox-prev { left: 15px; }
.lightbox-next { right: 15px; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .lightbox-container { flex-direction: column; max-height: 95vh; }
    .lightbox-info { flex: 0 0 auto; max-height: 40vh; border-left: none; border-top: 1px solid rgba(255,255,255,0.06); }
    .lightbox-image-wrap { max-height: 55vh; }
}
