/*
 * Static Gallery grid for server-rendered, AMP and script-free readers. A host that lists the `image-gallery` cascade
 * layer before its own layers restyles these classes with ordinary selectors.
 */
@layer image-gallery {
    .gallery {
        margin: 1.5rem 0;
        min-width: 0;
    }

    .gallery__items {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
        gap: 1rem;
    }

    .gallery__item {
        min-width: 0;
        margin: 0;
    }

    .gallery__item img {
        display: block;
        max-width: 100%;
        height: auto;
    }

    .gallery__item img[hidden] {
        display: none;
    }

    .gallery__item figcaption, .gallery__status {
        overflow-wrap: anywhere;
    }

    .gallery__status:empty {
        display: none;
    }

    .gallery[aria-busy="true"] .gallery__status {
        opacity: .8;
    }

    .gallery__continuation {
        display: inline-block;
        margin-top: 1rem;
        overflow-wrap: anywhere;
    }
}
