/* Overlay the caption above the player's bottom control bar. */
body figure.rc-video-caption {
    display: block;
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 24px 0;
    padding: 0;
    clear: both;
}

body figure.rc-video-caption > p {
    margin: 0;
}

body figure.rc-video-caption .wp-video,
body figure.rc-video-caption .wp-video-shortcode {
    margin: 0;
}

body figure.rc-video-caption video,
body figure.rc-video-caption iframe {
    display: block;
    max-width: 100%;
}

body figure.rc-video-caption > figcaption.rc-video-caption-text {
    display: block;
    position: absolute;
    z-index: 5;
    left: 0;
    right: 0;
    bottom: 40px;
    box-sizing: border-box;
    margin: 0;
    padding: 32px 20px 12px;
    background: linear-gradient(to top, rgba(0, 0, 0, .8), transparent);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: normal;
    line-height: 1.5;
    text-align: left;
    text-shadow: 0 2px 4px rgba(0, 0, 0, .25);
    overflow-wrap: anywhere;
    pointer-events: none;
}

/* Keep the caption editable in the visual editor. */
body#tinymce figure.rc-video-caption > figcaption.rc-video-caption-text {
    pointer-events: auto;
}
