/* ==========================================================================
   Lightbox — shared by all four designs.
   Each design sets --lb-ink / --lb-accent / --lb-paper; the fallbacks here
   keep it legible if one doesn't.
   ========================================================================== */

.lb-open-html,
.lb-open-html body { overflow: hidden; }

.lb[hidden] { display: none !important; }

.lb {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lb-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 8, 8, 0.92);
    cursor: zoom-out;
}

.lb-inner {
    position: relative;
    width: min(94vw, 1100px);
    max-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.lb-figure {
    margin: 0;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    pointer-events: auto;
}

.lb-img {
    display: block;
    max-width: 100%;
    /* Leave headroom for the caption underneath. */
    max-height: calc(92vh - 3.25rem);
    width: auto;
    height: auto;
    object-fit: contain;
    border: 3px solid var(--lb-paper, #e6e4dd);
    background: #111;
}

.lb-caption {
    font-family: inherit;
    font-size: clamp(0.68rem, 2.2vw, 0.8rem);
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--lb-paper, #e6e4dd);
    text-align: center;
    max-width: 60ch;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}
.lb-caption[hidden] { display: none; }

/* --- Controls ----------------------------------------------------------- */
.lb-btn {
    position: absolute;
    pointer-events: auto;
    appearance: none;
    border: 2px solid var(--lb-paper, #e6e4dd);
    background: rgba(10, 10, 10, 0.75);
    color: var(--lb-paper, #e6e4dd);
    font-family: inherit;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.lb-btn:hover,
.lb-btn:focus-visible {
    background: var(--lb-accent, #c9412c);
    border-color: var(--lb-accent, #c9412c);
    color: var(--lb-ink, #101010);
    outline: none;
}
.lb-btn[hidden] { display: none; }

.lb-prev, .lb-next {
    top: 50%;
    transform: translateY(-50%);
    width: clamp(38px, 8vw, 52px);
    height: clamp(52px, 11vw, 72px);
    font-size: clamp(1.6rem, 5vw, 2.2rem);
    padding-bottom: 0.12em;
}
.lb-prev { left: clamp(-0.25rem, -1vw, 0rem); }
.lb-next { right: clamp(-0.25rem, -1vw, 0rem); }

.lb-close {
    top: 0;
    right: 0;
    width: clamp(38px, 8vw, 46px);
    height: clamp(38px, 8vw, 46px);
    font-size: clamp(1.4rem, 4vw, 1.8rem);
    transform: translate(35%, -35%);
}

/* On a phone the side arrows would sit on top of the poster, so drop the
   controls into a row beneath it. */
@media (max-width: 620px) {
    .lb-inner { flex-direction: column; }
    .lb-figure { padding-bottom: 3.75rem; }
    .lb-img { max-height: calc(88vh - 7rem); }
    .lb-prev, .lb-next, .lb-close {
        top: auto;
        bottom: 0;
        transform: none;
        width: 52px;
        height: 46px;
        font-size: 1.5rem;
    }
    .lb-prev { left: calc(50% - 82px); }
    .lb-next { left: calc(50% + 30px); right: auto; }
    .lb-close { left: calc(50% - 26px); right: auto; }
}

/* --- Triggers ----------------------------------------------------------- */
button[data-lb] {
    appearance: none;
    padding: 0;
    margin: 0;
    border: 0;
    background: none;
    display: block;
    cursor: zoom-in;
    font: inherit;
    color: inherit;
}
/* Only the wall tiles fill their column. Scoped deliberately: a bare
   button[data-lb] rule would outrank the schedule thumb's class and stretch
   those to full width. */
.wall button[data-lb] { width: 100%; }
button[data-lb]:focus-visible {
    outline: 2px solid var(--lb-accent, #c9412c);
    outline-offset: 2px;
}
