/* Extracted from ui/templates/cms_plugins/column_container_component.html. Linked via sekizai so a page loads it once,
   however many instances it renders. */

.column-container {
    max-width: 100%;
    min-width: 0;
}

.column-container > div {
    max-width: 100%;
    min-width: 0;
}

/* Content Alignment also places the column itself once a Column Width or
   Width Override makes it narrower than the row. Auto margins absorb the
   leftover space — evenly for Center, all on the left for End — and work
   both when the column is a flex item of the row and when the row's
   legacy layout wraps it in a block-level child. Below 768px the column
   is forced to 100% width, so the auto margins resolve to 0 on their
   own and mobile is unaffected. */
.column-container--align-center {
    margin-left: auto;
    margin-right: auto;
}

.column-container--align-end {
    margin-left: auto;
    margin-right: 0;
}

@media (max-width: 767px) {
    .column-container {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        flex: 0 0 auto !important;
        overflow-x: clip;
    }

    .column-container > div {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow-x: clip;
    }

    .column-container h1,
    .column-container h2,
    .column-container h3,
    .column-container h4 {
        max-width: 100%;
        overflow-wrap: break-word;
        word-break: normal;
        white-space: normal !important;
    }

    .column-container img {
        max-width: 100%;
    }
}
