.lightbox-trigger {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
    text-align: inherit;
}

.lightbox-trigger:focus-visible {
    outline: 2px solid var(--brand-colour-link-dark);
    outline-offset: 2px;
}

.lightbox {
    width: min(100vw, 100%);
    max-width: none;
    height: 100%;
    max-height: none;
    padding: 0;
    margin: 0;
    border: 0;
    background: rgb(0 0 0 / 95%);
    color: var(--brand-colour-text);
}

.lightbox::backdrop {
    background: transparent;
}

.lightbox__header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1;
    padding: 4.75rem 4.5rem 1rem;
    pointer-events: none;
}

.lightbox__caption {
    max-width: min(1200px, 100%);
    margin: 0 auto;
    text-align: center;
    font-size: 1.125rem;
    line-height: 1.4;
}

.lightbox__caption:empty {
    display: none;
}

.lightbox__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100%;
    padding: 6.5rem 1rem 2rem;
    box-sizing: border-box;
}

.lightbox__figure {
    margin: 0;
    max-width: min(1200px, 100%);
}

.lightbox__image {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 8rem);
    width: auto;
    height: auto;
    margin: 0 auto;
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
    position: fixed;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgb(255 255 255 / 12%);
    color: var(--brand-colour-text);
    cursor: pointer;
}

.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover {
    background: rgb(255 255 255 / 22%);
}

.lightbox__close {
    top: 1rem;
    right: 1rem;
}

.lightbox__prev {
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
}

.lightbox__next {
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
}

.lightbox__close:focus-visible,
.lightbox__prev:focus-visible,
.lightbox__next:focus-visible {
    outline: 2px solid var(--brand-colour-link-light);
    outline-offset: 2px;
}
