/**
 * Frontend styles for AI Image Generator block
 */

/* Block container */
.wp-block-aifi-ai-image-generator {
    margin: 0 0 1.5em;
    box-sizing: border-box;
    max-width: 100%;
}

/* Image styling - ensures image never exceeds container */
.wp-block-aifi-ai-image-generator img {
    max-width: 100%;
    width: auto;
    height: auto;
    display: block;
}

/* Alignment support */
.wp-block-aifi-ai-image-generator.alignwide {
    margin-left: auto;
    margin-right: auto;
    max-width: var(--wp--style--global--wide-size, 1200px);
}

.wp-block-aifi-ai-image-generator.alignfull {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    max-width: 100vw;
    width: 100vw;
}

.wp-block-aifi-ai-image-generator.alignfull img {
    width: 100%;
}

/* Center alignment */
.wp-block-aifi-ai-image-generator.aligncenter {
    text-align: center;
}

.wp-block-aifi-ai-image-generator.aligncenter img {
    margin-left: auto;
    margin-right: auto;
}

/* Remove figure default margins */
figure.wp-block-aifi-ai-image-generator {
    margin-left: 0;
    margin-right: 0;
}

/* Left and right alignment */
.wp-block-aifi-ai-image-generator.alignleft {
    float: left;
    margin-right: 1.5em;
    margin-bottom: 1em;
    max-width: 50%;
}

.wp-block-aifi-ai-image-generator.alignright {
    float: right;
    margin-left: 1.5em;
    margin-bottom: 1em;
    max-width: 50%;
}

/* Clear floats after aligned blocks */
.wp-block-aifi-ai-image-generator.alignleft + *,
.wp-block-aifi-ai-image-generator.alignright + * {
    clear: none;
}

/* Responsive: stack aligned images on small screens */
@media (max-width: 600px) {
    .wp-block-aifi-ai-image-generator.alignleft,
    .wp-block-aifi-ai-image-generator.alignright {
        float: none;
        margin-left: auto;
        margin-right: auto;
        max-width: 100%;
    }
}
