/* File: wp-content/plugins/bm-core-customizations/assets/css/jcc-focus-slideshow.css */

/* 1. Setup the container as a perfect square and KILL native WP layouts */
.wp-block-gallery.is-style-jcc-focus-slideshow {
    display: block !important; /* Removes WP Flex/Grid behavior */
    position: relative !important; /* Acts as the anchor for absolute positioning */
    width: 100% !important;
    aspect-ratio: 1 / 1 !important; 
    margin: 0 auto !important;
    padding: 0 !important;
    border-radius: 4px;
    overflow: hidden !important; 
}

/* 2. Lock the figure to the exact boundaries of the square */
.wp-block-gallery.is-style-jcc-focus-slideshow figure.wp-block-image {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important; 
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0; 
    transition: opacity 1.2s ease-in-out; 
    z-index: 1;
}

/* 3. Neutralize the hidden <a> tag wrapper (if it exists) */
.wp-block-gallery.is-style-jcc-focus-slideshow figure.wp-block-image a {
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 4. Force the image to perfectly fill the space and center itself */
.wp-block-gallery.is-style-jcc-focus-slideshow figure.wp-block-image img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    display: block !important;
    object-fit: contain !important; /* Shrinks to fit */
    object-position: center !important; /* Centers within the absolute box */
    aspect-ratio: auto !important; 
    margin: 0 !important;
    padding: 0 !important;
}

/* 5. The class that reveals the active image */
.wp-block-gallery.is-style-jcc-focus-slideshow figure.wp-block-image.is-active-slide {
    opacity: 1;
    z-index: 2;
}

/* 6. Hide the captions from the slideshow */
.wp-block-gallery.is-style-jcc-focus-slideshow figure.wp-block-image figcaption {
    display: none !important;
}