/* components/text/TextImage.module.scss */
.mk-text-image__image { order: 1; grid-column: 7 / span 6; margin-bottom: 3rem; }
.mk-text-image__content { grid-column: 1 / span 5; }
@media (min-width: 720px) {
    .mk-text-image__container {
        --column-count: 12;
        display: grid;
        row-gap: var(--grid-gutter);
        column-gap: min(var(--grid-gutter), calc(100% / 11));
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }
    .mk-text-image__image { margin-bottom: 0; margin-top: clamp(5rem, calc(5rem + 5 * ((100vw - 48rem) / 80)), 10rem); }
}
@media (min-width: 1080px) {
    .mk-text-image__image { grid-column: 8 / span 5; }
    .mk-text-image__content { grid-column: 2 / span 5; }
}
.mk-text-image__image img { width: 100%; }
/* The subheading's space is in em of its own size (its text style). */
.mk-text-image__subheading > * { margin: 0.3em 0 1.1em; }

/*
 * Images with a winter (dark-mode) variant: both are rendered, the one that does not
 * match <html class="dark-mode"> is hidden. The dark one keeps the light one's box
 * (next/image layout="responsive" did the same).
 */
html.dark-mode img[data-mk-light],
html:not(.dark-mode) img[data-mk-dark] { display: none !important; }
/* --mk-ar (the light image's width / height) is set on the image's parent. */
img[data-mk-dark] { width: 100%; aspect-ratio: var(--mk-ar, auto); object-fit: cover; }

/* The builder's design system colours :where(h1…h6) with --color-heading, which does not
   follow dark mode; the original headings use the text colour. */
.mk-text-image :is(h2, h3) { color: inherit; }

/* Editable look (unset = the original): image left, image format, offset and corners. */
.mk-text-image__image img { border-radius: var(--mk-text-image-image-radius, 0); }
.mk-text-image--ratio .mk-text-image__image img { height: auto; aspect-ratio: var(--mk-text-image-ratio); object-fit: cover; }
@media (min-width: 720px) {
    .mk-text-image__image { margin-top: var(--mk-text-image-image-offset, clamp(5rem, calc(5rem + 5 * ((100vw - 48rem) / 80)), 10rem)); }
    .mk-text-image--reverse :is(.mk-text-image__image, .mk-text-image__content) { grid-row: 1; }
    .mk-text-image--reverse .mk-text-image__image { grid-column: 1 / span 6; }
    .mk-text-image--reverse .mk-text-image__content { grid-column: 8 / span 5; }
}
@media (min-width: 1080px) {
    .mk-text-image--reverse .mk-text-image__image { grid-column: 1 / span 5; }
    .mk-text-image--reverse .mk-text-image__content { grid-column: 7 / span 5; }
}

/* The link (a minkButton block) follows the rich text block: its last paragraph keeps the
   bottom margin it had before the link in the original. */
.mk-text-image__copy > .el-richtext:not(:last-child) > p:last-child { margin-bottom: 1.875em; }
