/* Core gallery blocks tagged fa-gallery: caption below the thumbnail (includes/class-gallery-tools.php). */

.wp-block-gallery.has-nested-images.fa-gallery {
    align-items: flex-start;
}

.wp-block-gallery.has-nested-images.fa-gallery figure.wp-block-image {
    flex-direction: column;
    justify-content: flex-start;
}

/* Core blurs the image behind an overlaid caption; there is no overlay here. */
.wp-block-gallery.has-nested-images.fa-gallery figure.wp-block-image:has(figcaption)::before {
    display: none;
}

/* Thumbnails are uncropped (gallery imageCrop off): whole screenshot, natural height. */
.wp-block-gallery.has-nested-images.fa-gallery figure.wp-block-image img {
    flex: none;
    height: auto;
}

.wp-block-gallery.has-nested-images.fa-gallery figure.wp-block-image figcaption {
    position: static;
    max-height: none;
    overflow: visible;
    margin: 0;
    padding: 6px 2px 0;
    background: none;
    color: #555;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
    text-shadow: none;
}
