/**
 * Video Embed Alignment Styles
 *
 * Gutenberg video embeds need proper alignment styles.
 * These styles ensure that video blocks with align attributes are displayed correctly.
 */

/* Center alignment for video embeds */
.wp-block-embed.aligncenter,
figure.wp-block-embed.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    clear: both;
}

/* Left alignment for video embeds */
.wp-block-embed.alignleft,
figure.wp-block-embed.alignleft {
    float: left;
    margin-right: 1.5em;
    margin-bottom: 1em;
    clear: left;
}

/* Right alignment for video embeds */
.wp-block-embed.alignright,
figure.wp-block-embed.alignright {
    float: right;
    margin-left: 1.5em;
    margin-bottom: 1em;
    clear: right;
}

/* Wide and full width alignments */
.wp-block-embed.alignwide {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.wp-block-embed.alignfull {
    max-width: none;
    width: 100%;
}

/* Responsive video wrapper */
.wp-block-embed__wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.wp-block-embed__wrapper iframe,
.wp-block-embed__wrapper object,
.wp-block-embed__wrapper embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Clear floats after aligned embeds */
.wp-block-embed.alignleft + *,
.wp-block-embed.alignright + * {
    clear: none;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .wp-block-embed.alignleft,
    .wp-block-embed.alignright {
        float: none;
        margin-left: auto;
        margin-right: auto;
        max-width: 100%;
    }
}
