.tb_text_wrap figure.apa-section-image,
figure.apa-section-image {
    box-sizing: border-box;
    width: 300px;
    min-width: 0;
    max-width: 300px;
    margin-top: 0.25rem;
    margin-bottom: 1rem;
}

.tb_text_wrap figure.apa-section-image.alignright,
figure.apa-section-image.alignright {
    float: right;
    margin-left: 1.5rem;
}

.tb_text_wrap figure.apa-section-image.alignleft,
figure.apa-section-image.alignleft {
    float: left;
    margin-right: 1.5rem;
}

.tb_text_wrap figure.apa-section-image img.apa-section-image__img,
figure.apa-section-image img.apa-section-image__img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    height: 200px;
    object-fit: cover;
}

.apa-section-image__link {
    display: block;
    cursor: zoom-in;
}

.apa-section-image__caption {
    margin-top: 0.4rem;
    color: #555;
    font-size: 0.85em;
    line-height: 1.35;
}

.apa-section-image__credit {
    font-style: italic;
}

.apa-float-clear {
    clear: both;
}

.apa-lightbox {
    position: fixed;
    z-index: 999999;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.88);
}

.apa-lightbox[hidden] {
    display: none;
}

.apa-lightbox__image {
    display: block;
    max-width: min(94vw, 1600px);
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

.apa-lightbox__close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    border: 0;
    padding: 0.25rem 0.65rem;
    color: #fff;
    background: transparent;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

@media (max-width: 767px) {
    .apa-section-image.alignright,
    .apa-section-image.alignleft {
        float: none;
        width: min(300px, 100%);
        max-width: 100%;
        margin: 0 0 1rem;
    }

    .apa-lightbox {
        padding: 1rem;
    }
}
