/* Frontend styles for FCA Image block */

.wp-block-fca-pages-fca-image {
    margin-bottom: var(--wp--style--block-gap, 1.5em); /* Add default bottom margin */
    max-width: 100%; /* Add this to constrain the figure element */
    display: block; /* Ensure figure behaves like a block */
    width: 100%; /* Add this */
}

.wp-block-fca-pages-fca-image figure {
    margin: 0; /* Remove default figure margin */
    max-width: 100%; /* Ensure inner figure also respects container */
}

.wp-block-fca-pages-fca-image img {
    max-width: 100%;
    height: auto;
    display: block; /* Prevents potential extra space below */
    /* Border radius is handled by inline style */
}

/* Alignment Styles (match core where possible) */
/* Center */
.wp-block-fca-pages-fca-image.aligncenter {
    text-align: center;
}
.wp-block-fca-pages-fca-image.aligncenter img {
    margin-left: auto;
    margin-right: auto;
}

/* Left */
.wp-block-fca-pages-fca-image.alignleft {
    float: left;
    margin: 0.5em 1.5em 1.5em 0; /* Adjust spacing as needed */
    /* width: auto; Ensure it doesn't take full width */
}

/* Right */
.wp-block-fca-pages-fca-image.alignright {
    float: right;
    margin: 0.5em 0 1.5em 1.5em; /* Adjust spacing as needed */
    /* width: auto; */
}

/* Clear floats after left/right aligned images */
.wp-block-fca-pages-fca-image.alignleft + *,
.wp-block-fca-pages-fca-image.alignright + * {
    clear: both;
}

/* Wide/Full - Often handled by theme, but add basic width */
.wp-block-fca-pages-fca-image.alignfull img,
.wp-block-fca-pages-fca-image.alignwide img {
    width: 100%;
}

/* Ensure figure takes up appropriate width for alignments */
/* These might conflict in columns, but keep for standard flow */
.wp-block-fca-pages-fca-image figure.alignleft,
.wp-block-fca-pages-fca-image figure.alignright {
     /* max-width: 50%; Remove this, rely on float behavior */
}

.wp-block-fca-pages-fca-image figure.aligncenter {
    margin-left: auto;
    margin-right: auto;
} 