/*
 * Video Content (`vc_video_content`)
 *
 * Loaded only on pages that use this element, after common.css. Rules
 * shared with other elements are in common.css.
 */

/*
 * Moved from the cognita-europe theme's custom-style.css in plugin 0.11.0
 * (element assets project, phase 4a), unchanged and in their original order.
 * They stayed in the theme at first because theme code still named their
 * classes. They come first here, as they came before every rule below.
 */

.video-content-sec{border-radius:0 3px 3px 0;padding:40px 20px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}

@media (max-width:767px) {
    .video-content-sec{border-radius:0 0 3px 3px;padding:15px}
}

.video-content-sec.section--blue{background:#c41f2f;color:#fff}

.video-content-sec.section--grey,.video-content-sec.section--white{color:#10171e}

/* Video Content — the right column is a white card by default.
 *
 * It used to get its white from `section--white`, which the element added
 * whenever no colour profile applied. That class was doing two jobs at once:
 * painting the background and hardcoding the text colour, and its partner
 * `section--blue` forced `color:#fff` for every profile — so a light profile
 * produced white text on a pale background.
 *
 * The colour profile is applied properly now, as an inline background with a
 * text colour worked out from it, and an inline declaration beats this rule.
 * A profile with no background colour configured falls back to this white,
 * which is what the old code did too. */
.video-content-sec { background-color: #fff; }

.middle-content-area {
    display: flex;
    height: 100%;
    align-items: center;
}

.callout--video.center--content{
    height: 400px;
}

@media (max-width: 767px) {
    .callout--video.center--content {
        height: 170px;
    }
}

/* Video Content thumbnail. It is a real <img> in a Bootstrap ratio box now, and
`.ratio > *` sizes it to 100%/100% without saying how to fill that box - the
default is `fill`, which stretched a 976x650 photo into a 16:9 slot. */
.cwb-video>.cwb-video__img{object-fit:cover;object-position:center}

/* The control that opens the video is a <button> rather than a <div>, so that it
can be reached and operated from a keyboard. A button brings the browser's own
chrome with it - grey fill, outset border, padding - which drew a box around
the play circle; the circle itself comes from .icon--border on the icon.
display:block rather than the button default of inline-block, so it does not
sit on a text baseline and reserve descender space under itself. */
.callout--video .img-overlay button.main-icon{
    display: block;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

/* Focus has to be visible now that this can be focused at all. */
.callout--video .img-overlay button.main-icon:focus-visible{
    outline: 3px solid currentColor;
    outline-offset: 4px;
}

.callout-img.center--content .img-overlay{-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}

.callout--video{height:100%;position:relative;background-repeat:no-repeat;background-size:cover;background-position:right;border-radius:3px;height:350px}

@media (max-width:767px) {
    .callout--video{height:170px;background-position:center}
}

.callout--video .img-overlay{position:absolute;top:0;bottom:0;left:0;right:0;background:rgba(0,0,0,.4);color:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;padding:80px;border-radius:3px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}

.callout--video .img-overlay .icon--border{border:3px solid;border-radius:50%;height:85px;width:85px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;background:rgba(0,0,0,.25)}

@media (max-width:767px) {
    .callout--video .img-overlay .icon--border{height:50px;width:50px;font-size:16px}
}

.video-content-sec.topbottom-content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}

.video-content-sec.topbottom-content .component{width:100%}

/* Video Content — the Video Thumbnail Image Ratio field.
*
* The thumbnail sits in a Bootstrap .ratio box, which takes its height from a
* ::before with padding-top set from --bs-aspect-ratio. The same element also
* carries .callout--video and .center--content, and those set an outright
* height — 400px, 170px under 768px — which wins over a height derived from
* content. So the field was inert: every choice rendered the same 400px box,
* and the thumbnail was cropped to whatever shape that left.
*
*     before   ratio-16x9 on a 732px column   box 732x400   the ratio wanted 412
*
* The two classes stay, because the play overlay and its circled icon are
* styled as their descendants. Only the height they impose is given back. */
.cwb-video.callout--video.center--content { height: auto; }

/* Video Content — the caption sits with the video, inside its column.
*
* It used to be written into a row of its own after the two column row, which
* put it below whichever column was taller rather than below the video. Where
* the right column ran past the video the caption was left stranded — 61px
* clear of it on Southbank's Our Community.
*
* A <figure> brings margin-bottom: 1rem with it. The old markup cancelled that
* with Bootstrap's mb-0; the class went with the row, so it is set here. */
.cwb-video-caption { margin-bottom: 0; }
