/*
 * Sculptors Lexicon Lightbox
 * Deliberately quiet: warm white, charcoal, bronze, and square-edged artwork.
 */

:root {
    --slxlb-ink: #111111;
    --slxlb-paper: #f7f5ef;
    --slxlb-accent: #8a7456;
    --slxlb-serif: var(--font-serif, Georgia, "Times New Roman", serif);
    --slxlb-sans: var(--font-sans, Arial, Helvetica, sans-serif);
}

/* Only images the script has intentionally enrolled receive this cue. */
[data-slxlb-item] {
    cursor: zoom-in;
}

img[data-slxlb-item]:focus-visible,
a[data-slxlb-item]:focus-visible {
    outline: 1px solid var(--slxlb-accent);
    outline-offset: 4px;
}

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

.slxlb {
    position: fixed;
    inset: 0;
    z-index: 100100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(20px, 4vw, 56px);
    background: rgba(12, 11, 10, 0.95);
    color: var(--slxlb-paper);
    opacity: 1;
    transition: opacity 160ms ease;
    overscroll-behavior: contain;
}

@supports (backdrop-filter: blur(3px)) {
    .slxlb {
        backdrop-filter: blur(3px);
    }
}

.slxlb__stage {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 0;
}

.slxlb__figure {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: min(92vw, 1440px);
    max-height: 90vh;
    min-width: 0;
    min-height: 0;
}

.slxlb__image {
    display: block;
    width: auto;
    height: auto;
    max-width: min(92vw, 1440px);
    max-height: 82vh;
    object-fit: contain;
    border-radius: 0;
    box-shadow: 0 24px 72px rgba(0, 0, 0, 0.38);
    opacity: 1;
    transform: scale(1);
    transition: opacity 150ms ease, transform 180ms ease;
}

.slxlb__image.is-loading {
    opacity: 0.25;
    transform: scale(0.995);
}

.slxlb__caption {
    max-width: 880px;
    margin: 14px auto 0;
    color: rgba(247, 245, 239, 0.88);
    font-family: var(--slxlb-serif);
    font-size: clamp(0.9rem, 1.3vw, 1rem);
    line-height: 1.5;
    text-align: center;
    letter-spacing: 0.01em;
}

.slxlb__counter {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    color: var(--slxlb-accent);
    font-family: var(--slxlb-sans);
    font-size: 0.72rem;
    line-height: 1;
    letter-spacing: 0.18em;
    font-variant-numeric: tabular-nums;
}

.slxlb__button {
    position: absolute;
    z-index: 3;
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    padding: 0;
    background: transparent;
    color: rgba(247, 245, 239, 0.86);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    font-family: var(--slxlb-serif);
    font-weight: 400;
    line-height: 1;
    transition: color 140ms ease, background-color 140ms ease;
}

.slxlb__button:hover,
.slxlb__button:focus-visible {
    color: #ffffff;
    background: rgba(138, 116, 86, 0.15);
}

.slxlb__button:focus-visible {
    outline: 1px solid var(--slxlb-accent);
    outline-offset: 2px;
}

.slxlb__close {
    top: -12px;
    right: -12px;
    font-size: 32px;
}

.slxlb__prev,
.slxlb__next {
    top: 50%;
    transform: translateY(-50%);
    font-size: 46px;
}

.slxlb__prev {
    left: -14px;
}

.slxlb__next {
    right: -14px;
}

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

body.slxlb-open {
    overflow: hidden;
}

@media (max-width: 760px) {
    .slxlb {
        padding: 52px 12px 26px;
    }

    .slxlb__figure,
    .slxlb__image {
        max-width: 94vw;
    }

    .slxlb__image {
        max-height: 76vh;
    }

    .slxlb__counter {
        top: -30px;
        left: 4px;
    }

    .slxlb__close {
        top: -40px;
        right: 0;
    }

    .slxlb__prev,
    .slxlb__next {
        width: 42px;
        height: 54px;
        font-size: 40px;
        background: rgba(12, 11, 10, 0.38);
    }

    .slxlb__prev {
        left: 0;
    }

    .slxlb__next {
        right: 0;
    }

    .slxlb__caption {
        margin-top: 11px;
        padding: 0 18px;
        font-size: 0.9rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .slxlb,
    .slxlb__image,
    .slxlb__button {
        transition: none !important;
    }
}
