/* Gallery captions sit below the image, without overlays or gradients. */
:is(.entry-content, .editor-styles-wrapper) .wp-block-gallery.has-nested-images figure.wp-block-image:has(figcaption)::before {
    content: none;
    display: none;
}

:is(.entry-content, .editor-styles-wrapper) .wp-block-gallery.has-nested-images figure.wp-block-image > figcaption,
:is(.entry-content, .editor-styles-wrapper) .wp-block-gallery:not(.has-nested-images) .blocks-gallery-item figcaption,
:is(.entry-content, .editor-styles-wrapper) .wp-block-gallery:not(.has-nested-images) .blocks-gallery-image figcaption {
    position: static;
    flex: 0 0 auto;
    width: 100%;
    max-height: none;
    margin: 0;
    padding: 0.75rem 0.5rem 0;
    overflow: visible;
    background: none;
    color: #333;
    text-shadow: none;
    font-size: 0.875rem;
    font-style: normal;
    line-height: 1.5;
    text-align: center;
    scrollbar-gutter: auto;
    will-change: auto;
}

:is(.entry-content, .editor-styles-wrapper) .wp-block-gallery figcaption a {
    color: inherit;
    text-decoration: none;
}

:is(.entry-content, .editor-styles-wrapper) .wp-block-gallery figcaption a:hover,
:is(.entry-content, .editor-styles-wrapper) .wp-block-gallery figcaption a:focus-visible {
    color: var(--color_base_dark, #4f1d16);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}
