/* --- MEDIA ROW EXTENDED (media-row-extended.html.twig) ---
   The shared media-row with extras. Every rule is scoped to .media-row--extended or to a new
   element class (media-row__play, media-row__dialog, media-row__logo…), so rows built from
   media-row.html.twig are untouched. Load it after media-row.css. */

/* --- titleLight: the title's first words in a lighter weight --- */
.media-row__title-light {
    font-weight: var(--media-row-title-light-weight, 300);
}

/* --- align: 'top' — image and text start at the same height --- */
.media-row--extended.media-row--align-top .media-row__inner {
    align-items: flex-start;
}

/* --- video: a round play button over the image --- */
.media-row--extended .media-row__media {
    position: relative;
}
.media-row__play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--media-row-play-size, 80px);
    height: var(--media-row-play-size, 80px);
    padding: 0 0 0 var(--media-row-play-icon-offset, 6px);
    border: var(--media-row-play-border, 2px solid #FFFFFF);
    border-radius: 50%;
    background: var(--media-row-play-bg, rgba(0, 0, 0, 0.2));
    color: var(--media-row-play-color, #FFFFFF);
    transform: translate(-50%, -50%);
    cursor: pointer;
}
.media-row__play:hover {
    background: var(--media-row-play-hover-bg, var(--media-row-play-bg, rgba(0, 0, 0, 0.2)));
    border-color: var(--media-row-play-hover-border-color, #FFFFFF);
}
.media-row__play-icon {
    width: var(--media-row-play-icon-width, 24px);
    height: var(--media-row-play-icon-height, 34px);
}

/* --- the video dialog. margin: auto keeps it centred under a reset that zeroes margins. --- */
.media-row__dialog {
    width: var(--media-row-dialog-width, min(90vw, 1134px));
    max-width: calc(100% - 2em);
    margin: auto;
    padding: 0;
    overflow: visible;
    border: 0;
    background: var(--media-row-dialog-bg, #000000);
}
.media-row__dialog::backdrop {
    background: var(--media-row-dialog-backdrop, rgba(0, 0, 0, 0.8));
}
.media-row__dialog-frame {
    position: relative;
    aspect-ratio: 16 / 9;
}
.media-row__dialog-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.media-row__dialog-close {
    position: absolute;
    top: var(--media-row-dialog-close-top, -44px);
    right: var(--media-row-dialog-close-right, -10px);
    padding: 0 10px;
    border: 0;
    background: none;
    font-size: var(--media-row-dialog-close-size, 40px);
    line-height: 1;
    color: var(--media-row-dialog-close-color, #FFFFFF);
    cursor: pointer;
}

@media (max-width: 767px) {
    .media-row__play {
        width: var(--media-row-play-size-mobile, var(--media-row-play-size, 80px));
        height: var(--media-row-play-size-mobile, var(--media-row-play-size, 80px));
    }
}

/* --- bleed: edge to edge, the image filling its half of the viewport --- */
.media-row--extended.media-row--bleed {
    padding: var(--media-row-bleed-padding, 0);
}
.media-row--extended.media-row--bleed .media-row__inner {
    max-width: none;
    padding: 0;
    gap: 0;
}
@media (min-width: 768px) {
    .media-row--extended.media-row--bleed .media-row__media {
        flex-basis: 50%;
    }
}
.media-row--extended.media-row--bleed .media-row__body {
    padding: var(--media-row-bleed-body-padding, 40px 20px);
}

/* --- textAlign: 'center' --- */
.media-row--extended.media-row--text-center .media-row__body {
    text-align: center;
}
.media-row--extended.media-row--text-center .media-row__ctas {
    justify-content: center;
}

/* --- divider: a short rule under the title --- */
.media-row__divider {
    width: var(--media-row-divider-width, 32px);
    height: var(--media-row-divider-height, 3px);
    margin: var(--media-row-divider-margin, 0 0 16px);
    border: 0;
    background: var(--media-row-divider-color, var(--color-primary));
}
.media-row--extended.media-row--text-center .media-row__divider {
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 767px) {
    .media-row--extended.media-row--bleed .media-row__body {
        padding: var(--media-row-bleed-body-padding-mobile, var(--media-row-bleed-body-padding, 40px 20px));
    }
}

/* --- quote: a square picture at the viewport's edge beside a quote between marks --- */
.media-row--extended.media-row--quote {
    padding: var(--media-row-quote-padding, 0);
}
.media-row--extended.media-row--quote .media-row__inner {
    max-width: none;
    padding: 0;
    gap: 0;
}
.media-row--extended.media-row--quote .media-row__media {
    flex: 0 0 var(--media-row-quote-image-size, 263px);
}
.media-row--extended.media-row--quote .media-row__image {
    aspect-ratio: 1;
    height: auto;
}
.media-row--extended.media-row--quote .media-row__body {
    display: flex;
    justify-content: var(--media-row-quote-justify, center);
    padding: var(--media-row-quote-body-padding, 0 63px);
}
.media-row__quote {
    position: relative;
    width: 100%;
    max-width: var(--media-row-quote-max-width, 782px);
    margin: 0;
    padding: 0;
    border: 0;
}
.media-row__quote::before,
.media-row__quote::after {
    content: '';
    position: absolute;
    top: var(--media-row-quote-mark-top, -10px);
    width: var(--media-row-quote-mark-width, 33px);
    height: var(--media-row-quote-mark-height, 20px);
    background: center / contain no-repeat;
}
.media-row__quote::before {
    left: calc(-1 * var(--media-row-quote-mark-offset, 63px));
    background-image: var(--media-row-quote-open, none);
}
.media-row__quote::after {
    right: calc(-1 * var(--media-row-quote-mark-offset, 63px));
    background-image: var(--media-row-quote-close, none);
}
.media-row__quote-text {
    font-size: var(--media-row-quote-size, 32px);
    line-height: var(--media-row-quote-line-height, 35px);
    color: var(--media-row-quote-color, var(--color-text-dark));
}
.media-row__quote-text p {
    margin: 0;
    font: inherit;
    color: inherit;
}
.media-row__quote-text em,
.media-row__quote-text i {
    font-style: var(--media-row-quote-emphasis-style, italic);
}
.media-row__quote-author {
    margin: var(--media-row-quote-author-margin, 18px 0 0);
    font-family: var(--media-row-quote-author-font-family, inherit);
    font-size: var(--media-row-quote-author-size, 12px);
    line-height: var(--media-row-quote-author-line-height, 15px);
    color: var(--media-row-quote-author-color, var(--color-primary));
}
/* quote.authorHtml / quote.signature: paragraphs in the author's type; the signature aligned right, its bold words in
   --media-row-quote-signature-weight */
.media-row__quote-author p {
    margin: 0;
    font: inherit;
    color: inherit;
}
.media-row__quote-signature {
    text-align: right;
}
.media-row__quote-signature b,
.media-row__quote-signature strong {
    font-weight: var(--media-row-quote-signature-weight, 700);
}

@media (max-width: 767px) {
    .media-row--extended.media-row--quote .media-row__media {
        flex-basis: auto;
    }
    .media-row--extended.media-row--quote .media-row__image {
        aspect-ratio: auto;
        height: var(--media-row-quote-image-height-mobile, 243px);
    }
    .media-row--extended.media-row--quote .media-row__body {
        padding: var(--media-row-quote-body-padding-mobile, 31px 50px 19px);
    }
    .media-row__quote-text {
        font-size: var(--media-row-quote-size-mobile, 28px);
    }
    .media-row__quote::before {
        top: var(--media-row-quote-open-top-mobile, -12px);
        left: var(--media-row-quote-open-left-mobile, -45px);
    }
    .media-row__quote::after {
        top: auto;
        right: var(--media-row-quote-close-right-mobile, -35px);
        bottom: var(--media-row-quote-close-bottom-mobile, 20px);
    }
}

/* The button's hover (media-row has none outside its list layout): the primary button's hover colour, and a
   transition (--media-row-btn-transition). Without the tokens the button is unchanged. */
.media-row--extended .media-row__btn {
    transition: var(--media-row-btn-transition, none);
}
.media-row--extended .media-row__btn:hover {
    background: var(--color-button-primary-hover-bg, var(--color-button-primary-bg));
}

.media-row__play {
    transition: var(--media-row-play-transition, none);
}

/* wrap (media-row--wrap), from 992px: the picture floats on its side, half the row wide, and a long text flows
   around it and on under it */
@media (min-width: 992px) {
    .media-row--extended.media-row--wrap .media-row__inner {
        display: flow-root;
    }
    .media-row--extended.media-row--wrap .media-row__media {
        float: left;
        width: calc((100% - var(--media-row-gap, 64px)) / 2);
        margin: 0 var(--media-row-gap, 64px) var(--media-row-wrap-media-margin-bottom, 0) 0;
    }
    .media-row--extended.media-row--wrap.media-row--image-right .media-row__media {
        float: right;
        margin: 0 0 var(--media-row-wrap-media-margin-bottom, 0) var(--media-row-gap, 64px);
    }
    .media-row--extended.media-row--wrap .media-row__body {
        display: block;
    }
}
/* wrap 'narrow' (media-row--wrap-narrow): the same from 992 to 1439px only */
@media (min-width: 992px) and (max-width: 1439px) {
    .media-row--extended.media-row--wrap-narrow .media-row__inner {
        display: flow-root;
    }
    .media-row--extended.media-row--wrap-narrow .media-row__media {
        float: left;
        width: calc((100% - var(--media-row-gap, 64px)) / 2);
        margin: 0 var(--media-row-gap, 64px) var(--media-row-wrap-media-margin-bottom, 0) 0;
    }
    .media-row--extended.media-row--wrap-narrow.media-row--image-right .media-row__media {
        float: right;
        margin: 0 0 var(--media-row-wrap-media-margin-bottom, 0) var(--media-row-gap, 64px);
    }
    .media-row--extended.media-row--wrap-narrow .media-row__body {
        display: block;
    }
}

/* --- media: trusted markup in the media column (media-row__media--slot), e.g. a video; the column rounds and
   clips it --- */
.media-row__media--slot {
    overflow: hidden;
    border-radius: var(--media-row-media-radius, 0);
}

/* --- logo: a picture above the title, on the texts' side (centred with textAlign: 'center') --- */
.media-row__logo-wrap {
    display: flex;
    justify-content: var(--media-row-logo-align, flex-start);
    margin: var(--media-row-logo-margin, 0 0 24px);
}
.media-row--extended.media-row--text-center .media-row__logo-wrap {
    justify-content: var(--media-row-logo-align, center);
}
.media-row__logo {
    display: block;
    width: auto;
    max-width: var(--media-row-logo-max-width, 100%);
    height: auto;
    max-height: var(--media-row-logo-max-height, none);
}

/* --- header: 'across' (media-row--header-across) — the title above both columns, the buttons centred under the
   row. The header is the row's first item, the buttons follow the row, so phones read title, media, text,
   buttons. --- */
.media-row__header {
    min-width: 0;
    text-align: var(--media-row-header-align, inherit);
}
.media-row--extended.media-row--text-center .media-row__header {
    text-align: var(--media-row-header-align, center);
}
.media-row--header-across > .media-row__ctas {
    justify-content: center;
    margin-top: var(--media-row-across-ctas-margin-top, 32px);
    padding: 0 var(--media-row-gutter, 12px);
}
@media (min-width: 768px) {
    .media-row--extended.media-row--header-across .media-row__inner {
        flex-wrap: wrap;
        row-gap: var(--media-row-header-gap, 0px);
    }
    .media-row--header-across .media-row__header {
        flex: 0 0 100%;
    }
}

@media (max-width: 767px) {
    .media-row__media--slot {
        border-radius: var(--media-row-media-radius-mobile, var(--media-row-media-radius, 0));
    }
    .media-row__logo {
        max-width: var(--media-row-logo-max-width-mobile, var(--media-row-logo-max-width, 100%));
        max-height: var(--media-row-logo-max-height-mobile, var(--media-row-logo-max-height, none));
    }
    .media-row--header-across > .media-row__ctas {
        margin-top: var(--media-row-across-ctas-margin-top-mobile, 0);
        padding: 0 var(--media-row-gutter-mobile, var(--media-row-gutter, 12px));
    }
}
