.eprojekt-image-text {
    display: flex;
    align-items: center;
    width: 100%;
}

.eprojekt-image-text__media,
.eprojekt-image-text__content {
    min-width: 0;
}

.eprojekt-image-text__media {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.eprojekt-image-text__content {
    flex: 1 1 0;
}

.eprojekt-image-text__image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto !important;
    aspect-ratio: auto !important;
}

.eprojekt-image-text__heading {
    margin: 0;
}

.eprojekt-image-text__description > :first-child {
    margin-top: 0;
}

.eprojekt-image-text__description > :last-child {
    margin-bottom: 0;
}

@media (max-width: 767px) {
    /*
     * Wymuszamy spójny układ mobilny. Klasa jest wyliczana po stronie PHP
     * także dla starszych widgetów, które nie mają zapisanego direction_mobile.
     */
    .eprojekt-image-text.eprojekt-image-text--mobile-row {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
    }

    .eprojekt-image-text.eprojekt-image-text--mobile-row-reverse {
        flex-direction: row-reverse !important;
        flex-wrap: nowrap !important;
    }

    .eprojekt-image-text.eprojekt-image-text--mobile-row .eprojekt-image-text__content,
    .eprojekt-image-text.eprojekt-image-text--mobile-row-reverse .eprojekt-image-text__content {
        width: 0 !important;
        min-width: 0 !important;
        flex: 1 1 0 !important;
    }

    .eprojekt-image-text.eprojekt-image-text--mobile-row .eprojekt-image-text__media,
    .eprojekt-image-text.eprojekt-image-text--mobile-row-reverse .eprojekt-image-text__media {
        min-width: 0 !important;
        flex-shrink: 0 !important;
    }
}
