/*
 * The program action rail must be the last layout layer.
 *
 * The legacy template rules are loaded before this file on purpose. Some of
 * them use content-box together with width: 100%, which makes padded cards
 * and action buttons wider than the dark grid column. Keep this layer limited
 * to containment so it cannot change the visual language of the card.
 *
 * Keep the universal box-sizing rule here as a last-resort guard. The rail is
 * also rendered by older cached template combinations, and one content-box
 * descendant is enough to make the white card or an action button protrude.
 */
:where(.copp-program-article[data-copp-entity-type="program"]) .copp-program-article__layout {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px) !important;
    min-width: 0 !important;
}

:where(.copp-program-article[data-copp-entity-type="program"]) .copp-program-article__aside,
:where(.copp-program-article[data-copp-entity-type="program"]) .copp-program-article__aside *,
:where(.copp-program-article[data-copp-entity-type="program"]) .copp-program-article__aside > *,
:where(.copp-program-article[data-copp-entity-type="program"]) .copp-program-article__aside .copp-enrollment-box,
:where(.copp-program-article[data-copp-entity-type="program"]) .copp-program-article__aside .copp-enrollment-box__head,
:where(.copp-program-article[data-copp-entity-type="program"]) .copp-program-article__aside .copp-enrollment-box__actions,
:where(.copp-program-article[data-copp-entity-type="program"]) .copp-program-article__aside .copp-enrollment-box__form,
:where(.copp-program-article[data-copp-entity-type="program"]) .copp-program-article__aside .copp-news-btn {
    box-sizing: border-box !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

:where(.copp-program-article[data-copp-entity-type="program"]) .copp-program-article__aside {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 14px !important;
    overflow: hidden !important;
    width: 100% !important;
    inline-size: 100% !important;
    max-inline-size: 100% !important;
    padding: 22px !important;
}

:where(.copp-program-article[data-copp-entity-type="program"]) .copp-program-article__aside > *,
:where(.copp-program-article[data-copp-entity-type="program"]) .copp-program-article__aside .copp-enrollment-box,
:where(.copp-program-article[data-copp-entity-type="program"]) .copp-program-article__aside .copp-enrollment-box__actions,
:where(.copp-program-article[data-copp-entity-type="program"]) .copp-program-article__aside .copp-enrollment-box__form,
:where(.copp-program-article[data-copp-entity-type="program"]) .copp-program-article__aside .copp-news-btn {
    margin-inline: 0 !important;
    width: 100% !important;
}

:where(.copp-program-article[data-copp-entity-type="program"]) .copp-program-article__aside .copp-enrollment-box,
:where(.copp-program-article[data-copp-entity-type="program"]) .copp-program-article__aside .copp-enrollment-box__actions,
:where(.copp-program-article[data-copp-entity-type="program"]) .copp-program-article__aside .copp-enrollment-box__form,
:where(.copp-program-article[data-copp-entity-type="program"]) .copp-program-article__aside .copp-enrollment-box__actions > * {
    flex: 0 1 auto !important;
}

:where(.copp-program-article[data-copp-entity-type="program"]) .copp-program-article__aside .copp-enrollment-box__head {
    display: flex;
    flex-wrap: wrap !important;
    gap: 14px;
}

:where(.copp-program-article[data-copp-entity-type="program"]) .copp-program-article__aside .copp-enrollment-box__head > *,
:where(.copp-program-article[data-copp-entity-type="program"]) .copp-program-article__aside .copp-enrollment-box__status,
:where(.copp-program-article[data-copp-entity-type="program"]) .copp-program-article__aside .copp-news-btn > span {
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-wrap: anywhere;
    white-space: normal !important;
}

:where(.copp-program-article[data-copp-entity-type="program"]) .copp-program-article__aside .copp-enrollment-box__actions {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 10px;
}

:where(.copp-program-article[data-copp-entity-type="program"]) .copp-program-article__aside .copp-enrollment-box__actions > *,
:where(.copp-program-article[data-copp-entity-type="program"]) .copp-program-article__aside .copp-enrollment-box__form {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

:where(.copp-program-article[data-copp-entity-type="program"]) .copp-program-article__aside .copp-news-btn {
    display: flex !important;
    justify-content: center;
    overflow-wrap: anywhere;
    text-align: center;
    white-space: normal !important;
}

@media (max-width: 1199px) {
    :where(.copp-program-article[data-copp-entity-type="program"]) .copp-program-article__layout {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    :where(.copp-program-article[data-copp-entity-type="program"]) .copp-program-article__aside {
        position: static !important;
    }
}
