//==============================================================================
// widget_gallery
//==============================================================================

&.widget_media_gallery
{
    $minimum_nr_of_columns: 1;
    $maximum_nr_of_columns: 9;
    
    .gallery
    {
        display: flex;
        flex-wrap: wrap;
        
        .gallery-item
        {
            margin: 0;
            width: calc(100% / 3);
           
            a
            {
                display: flex;
                
                &:after
                {
                    content: "";
                    display: block;
                    padding-bottom: 100%;
                }
                
                img
                {
                    border-right: 1px solid transparent;
                    border-bottom: 1px solid transparent;
                    position: absolute;
                    top: 0;
                    bottom: 0;
                    left: 0;
                    right: 0;
                    width: 100%;
                    height: 100%;
                    object-position: center;
                    object-fit: cover;
                    transition: filter .25s ease-in-out;
                }
            }

            .wp-caption-text,
            .gallery-caption
            {
                font-size: 11px;
                font-style: italic;
                padding: 6px 12px 12px 12px;
            }
        }
    }
}