/*
 * Copyright (C) 2012, 2013, 2014, 2015 Apple Inc.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
 */

/* You'll see a lot of !important rules in this file. This is because
   the inheritance and specificity of Shadow DOM trees is slightly
   tricky. The page might have accidentally set a style and we have
   to make sure it is reset. */

audio {
    min-width: 260px;
    height: 39px;
}

body:-webkit-full-page-media {
    background-color: rgb(38, 38, 38);
}

video:-webkit-full-page-media {
    margin: auto;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

video:-webkit-full-page-media::-webkit-media-controls-panel {
    bottom: 0px;
}

::-webkit-media-controls {
    width: inherit;
    height: inherit;
    position: relative;
    display: -webkit-flex;
    -webkit-align-items: stretch;
    -webkit-justify-content: flex-end;
    -webkit-flex-direction: column;
    font-family: -apple-system;
    overflow: hidden;
}

video::-webkit-media-controls-panel input[type="button"],
audio::-webkit-media-controls-panel input[type="button"],
video::-webkit-media-controls-panel button,
audio::-webkit-media-controls-panel button {
    padding: 0;
    border: none;
    -webkit-appearance: none;
}

video::-webkit-media-controls-inline-playback-placeholder,
audio::-webkit-media-controls-inline-playback-placeholder {
    display: block;
    z-index: 0;
    width: 100%;
    height: 100%;
    background-color: black;
    background-repeat: no-repeat;
    background-position: 50% 50%;
    background-size: 100% 50%;
}

video::-webkit-media-controls-inline-playback-placeholder.hidden,
audio::-webkit-media-controls-inline-playback-placeholder.hidden {
    display: none;
}

video::-webkit-media-text-track-container,
audio::-webkit-media-text-track-container {
    position: relative;
    -webkit-flex: 1 1 auto;
}

video::-webkit-media-controls-panel-container {
    -webkit-transform: translateZ(0);
    width: 100%;
    direction: ltr;
    height: 50px;
    position: absolute;
    bottom: 0;
    pointer-events: none;
}

audio::-webkit-media-controls-panel-container {
    width: 100%;
    direction: ltr;
    height: 39px;
    position: absolute;
    bottom: 0;
}

video::-webkit-media-controls-panel-background {
    -webkit-transform: translateZ(0);
    width: 101%; /* Due to some rounding issues we make this a little bit wider than should be necessary. */
    height: 51px; /* And taller. */
    -webkit-appearance: media-controls-light-bar-background;
    transition: opacity 0.25s linear;
    opacity: 0;
    pointer-events: none;
    bottom: 0;
    position: absolute;
}

audio::-webkit-media-controls-panel-background {
    display: none;
}

video::-webkit-media-controls-panel-background.show,
video::-webkit-media-controls-panel-background.paused {
    opacity: 1;
}

audio::-webkit-media-show-controls {
    display: none !important;
}
video::-webkit-media-show-controls {
    position: absolute;
    left: 0;
    bottom: 0;
    display: block;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 10px;
    opacity: 0;
    border: 0;
    background: none;
    -webkit-appearance: none;
}

audio::-webkit-media-controls-panel,
video::-webkit-media-controls-panel {
    box-sizing: border-box;
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 0;

    -webkit-user-select: none;

    display: -webkit-flex;
    -webkit-flex-direction: row;
    -webkit-flex-wrap: nowrap;
    -webkit-justify-content: flex-start;
    -webkit-align-items: center;

    transition: opacity 0.25s linear;
    -webkit-transform-origin: bottom left;
}

video::-webkit-media-controls-panel .hidden,
audio::-webkit-media-controls-panel .hidden,
video::-webkit-media-controls-panel .dropped,
audio::-webkit-media-controls-panel .dropped {
    display: none;
}

video::-webkit-media-controls-panel {
    height: 50px;
    opacity: 0;
    pointer-events: none;
    -webkit-transform: translate3d(0, 0, 0);
}

audio::-webkit-media-controls-panel {
    height: 39px;
    background-color: rgba(212, 212, 212, 1);
}

video::-webkit-media-controls-panel.show,
video::-webkit-media-controls-panel.paused {
    pointer-events: auto;
    opacity: 1;
}

video::-webkit-media-controls-panel.picture-in-picture {
    pointer-events: none;
}

video::-webkit-media-controls-rewind-button,
audio::-webkit-media-controls-rewind-button,
video::-webkit-media-controls-panel .mute-box,
audio::-webkit-media-controls-panel .mute-box,
video::-webkit-media-controls-mute-button,
audio::-webkit-media-controls-mute-button,
video::-webkit-media-controls-volume-max-button,
video::-webkit-media-controls-panel .volume-box,
audio::-webkit-media-controls-panel .volume-box,
audio::-webkit-media-controls-volume-slider,
video::-webkit-media-controls-volume-slider {
    display: none !important;
}

video::-webkit-media-controls-start-playback-button {
    -webkit-appearance: none;
    position: absolute;
    width: 72px;
    height: 72px;
    left: calc(50% - 36px);
    top: calc(50% - 36px);
    -webkit-clip-path: circle(36px);
    -webkit-transform: translate3d(0, 0, 0);
}

video::-webkit-media-controls-start-playback-background {
    -webkit-appearance: none;
    position: absolute;
    width: 72px;
    height: 72px;
    background-color: rgba(255, 255, 255, 0.2);
    -webkit-backdrop-filter: blur(10px) saturate(200%);
}

video::-webkit-media-controls-start-playback-tint {
    -webkit-appearance: none;
    position: absolute;
    width: 72px;
    height: 72px;
    background-color: rgb(210, 210, 210);
    mix-blend-mode: darken;
}

video::-webkit-media-controls-start-playback-button .webkit-media-controls-start-playback-glyph {
    -webkit-appearance: none;
    position: absolute;
    width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GP8kXgjDApY6TrIqBexX/SVbGANeFuB8y/QED3MjB3N6J+WTy2fgfTCpSvPtS7BRVzIOe72+lsej6ZSNjLIoYPWNRw2Qe9VEiYrSNJTpG41giY3JPminhMXrHEgmjeywRMM6zofdjYcZi7DG1jLGEw7yYGUsYjKPhd64qxtxYmmJMjqUJJlV+NW6pgzE9lkYY42Opjym+2aHUwKTKOh8HRcJYGktNjOU/sFSNxep75CqMzbH8wOh43KKKeTfybiAUxvpYAoyAsXxh3OSHbcN3MsbCGGOMMcYYY4wxxv57n0aw2iHhyI0VAAAAAElFTkSuQmCC');
    background-repeat: no-repeat;
    background-position: 50% 50%;
    background-size: 100% 100%;
}

video::-webkit-media-controls-start-playback-button .webkit-media-controls-start-playback-background.active {
    background-color: rgba(192, 192, 192, 0.2);
}

video::-webkit-media-controls-start-playback-button .webkit-media-controls-start-playback-glyph.failed {
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIwAAACMCAMAAACZHrEMAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAACMVBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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OSQmbq1EhbJeAAAAAElFTkSuQmCC');
}

/* ================== ALL INLINE BUTTONS ====================== */

video::-webkit-media-controls-play-button,
audio::-webkit-media-controls-play-button,
video::-webkit-media-controls-fullscreen-button,
audio::-webkit-media-controls-fullscreen-button,
video::-webkit-media-controls-wireless-playback-picker-button,
audio::-webkit-media-controls-wireless-playback-picker-button,
video::-webkit-media-controls-picture-in-picture-button,
audio::-webkit-media-controls-picture-in-picture-button {
    -webkit-appearance: none;
    display: block;
    padding: 0;
    border: 0;
    -webkit-user-select: none;
    background-repeat: no-repeat;
    background-position: 50% 50%;
    mix-blend-mode: plus-darker;
    opacity: 0.55;
    -webkit-mask-position: 50% 50%;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-origin: border-box;
    background-color: black;
    transition: background-color 250ms;
}

video::-webkit-media-controls-play-button,
video::-webkit-media-controls-fullscreen-button,
video::-webkit-media-controls-wireless-playback-picker-button,
video::-webkit-media-controls-picture-in-picture-button {
    -webkit-transform: translate3d(0, 0, 0);
}

video::-webkit-media-controls-play-button:active,
audio::-webkit-media-controls-play-button:active,
video::-webkit-media-controls-fullscreen-button:active,
audio::-webkit-media-controls-fullscreen-button:active,
audio::-webkit-media-controls-wireless-playback-picker-button:active,
video::-webkit-media-controls-wireless-playback-picker-button:active,
video::-webkit-media-controls-picture-in-picture-button:active,
audio::-webkit-media-controls-picture-in-picture-button:active {
    mix-blend-mode: normal;
    opacity: 1;
    background-color: white;
    transition: background-color 0ms;
}

/* ================== PLAY BUTTON ====================== */

audio::-webkit-media-controls-play-button,
video::-webkit-media-controls-play-button {
    margin-left: 4px;
    -webkit-mask-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAsCAYAAAANUxr1AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAFVJREFUeNrs2bENgEAMA0AHsf/EIB5GcIGgOEvpIuf6TJIjXfZyv+qfe67ywJT7Vf+WnwUICAgICAgICAgICAgICAgICAgICAjoyzxvgvPlG1X/EmAASwgGTpkrSW0AAAAASUVORK5CYII=');
    -webkit-mask-size: 18px 22px;
    -webkit-order: 1;
}

audio::-webkit-media-controls-play-button {
    width: 42px;
    height: 39px;
}

video::-webkit-media-controls-play-button {
    width: 44px;
    height: 50px;
}

audio::-webkit-media-controls-play-button.paused,
video::-webkit-media-controls-play-button.paused {
    -webkit-mask-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAsCAYAAAATmipGAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAUZJREFUeNrU2S8sRWEYgPFzD7PZbDYbQSAoBBKFwgQTmKRpJE3SaBKFRKJJJphiCslNt1AERRBsNpvN/DmeL7ybGfLzne3Xn517d873vqcsimIOtSKDq0Id0zmEhktM5hAazjGWQ2g4xUgOocknjjFkDw0fOMSAPfR78AH67KHhDXvotYeGV+yg2x4aXrCFLntoeMYGOuyh4QnraLeHhkesos0eGh6wglZ7aLjHMlrsoeEOi2i2h4ZbLKC0h4ZrzP8XXMk0MPvbeFRJXf0cjyq5NB5NlIX/qsX/1non6/afvvHXrsESeGN/PMUDv8n8Cl0yv0L1hxL9MU9/cE6jyJp5FNEPd2lc3kSneQGxbV5ApJXOLnqsK5137JuXZLF27Dcvco8waF7knmDYvBo/w6j5Y8MFxs2fb9LEN2UfnmaKDD4xfgkwANpCXZrruKGvAAAAAElFTkSuQmCC');
    -webkit-mask-size: 21px 22px;
}

/* ================== FULLSCREEN BUTTON ====================== */

video::-webkit-media-controls-fullscreen-button {
    width: 44px;
    height: 50px;
    -webkit-mask-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAO5JREFUeNrs2F8KwjAMBvAoXsID6GEUPIKPw2sLPiu+CCIYO1nFhf1pWkw+YR9kTyv8KCNpR0TEyjqSUZiZ5vQH+d6dZ6gDDIy5BbyjISVwi4aUQEJDdgGhkH1AGOQQEAI5BnRHpgBdkalAN2QEnpsiNGQEamKKzAFK5CPUCg0YkbdQe8QdjFkifoPmjRr+wDoBJ2Bh1r9uRaW4UzNxKsQ2sxFjsUID1tmVIK0adQ7y/QfDcpJokeZALdIFqEG6AVORrsAUpDtwDAkBHELCAPuQUMAuJBxQIj/AheUVI2eRJfCifP9aP2boV7uXAAMArhj6EAChbh4AAAAASUVORK5CYII=');
    -webkit-mask-size: 20px 20px;
    -webkit-order: 5;
}

/* ================== AIRPLAY BUTTON ====================== */

audio::-webkit-media-controls-wireless-playback-picker-button,
video::-webkit-media-controls-wireless-playback-picker-button {
    -webkit-mask-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAkCAYAAAD/yagrAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAARlJREFUeNrsmDEOgjAUhtuYMLgwuTG6Mrt7AC/gCVycHLwBN+AEXIADuDO76ubm5OJgYnw+kldDiEb6aElJ3ku+gYSWL4/yl1QrpUCNoLSIehbVgfmBiIqoiIqoiIqoiIpoUKLmAhz+7u2QpUPRj5tL0TXyQm5IGqpo3cVHY64LkoQmmlIXocURiUMRnSHnL5KGAxK5Fu1CiUxooilSdRhTNBIlpk7bPtfq5orkFMmWFmOzRqcSWsNeRE/0mk3ljK5sOqzrn6Kc2jMka57IaqjdwmQlMLkjC9+S7azkckXmviRt15TtmndSnK/UNkV6Fzf3OLnMroh2FvBM3vcArRhA0rDlimYDSrIzdjOw5N+M1QCjOMdVbwEGAJbOn8QOMeI8AAAAAElFTkSuQmCC');
    -webkit-mask-size: 21px 18px;
    -webkit-order: 3;
}

audio::-webkit-media-controls-wireless-playback-picker-button {
    width: 44px;
    height: 39px;
}

video::-webkit-media-controls-wireless-playback-picker-button {
    width: 44px;
    height: 50px;
}

audio::-webkit-media-controls-wireless-playback-picker-button.playing,
video::-webkit-media-controls-wireless-playback-picker-button.playing {
    opacity: 1;
    mix-blend-mode: normal;
    background-color: -apple-wireless-playback-target-active;
}

/* ================== PICTURE IN PICTURE BUTTON ====================== */

video::-webkit-media-controls-picture-in-picture-button {
    width: 35px;
    height: 44px;
    -webkit-order: 5;
    -webkit-mask-size: 23px 18px;
    -webkit-mask-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAkCAYAAAD2IghRAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAANhJREFUeNrslzEOwjAMRR2UA3AQ7sLKwsTEglg6sTIgLgs7qCZBRbIsWpDayHH1v/SHJmn0ZFutHYiIqX4F+cDMtCCncgseh1JiLJ5lxH+Br2qGZ2Gpa/IjeVMZ1/ur0ndgLdaeydsvF9/7LrYEz7oo+J0X8Kyz2GuT917As04K/uAFPKtR5xov4FnHLuIy+i7AqavxVr1jAh7H/HbRZE3QZGndBvaW1k1Z6VqdHtjzIBELZrHoKIfRzbpUxqY4IOJzLpWAiAMc4AAHOMAB/m9T9Bn1veklwACtBYmnlYBaIQAAAABJRU5ErkJggg==');
}

video::-webkit-media-controls-picture-in-picture-button.return-from-picture-in-picture {
    -webkit-mask-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAkCAYAAAD2IghRAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAOZJREFUeNpiZGBg+M8w+AEjMuf///8MTAxDFAxZh7Pgi5IBBv+HZYgPS4f/JwJ/GA1xCjMnIfAejf9poHPvfyy5GFvS6KdjyYPLXeAKiFiH/0ZiT6GT46ni8CAg/onEn0WH/EEVh4OAL5rjFwIx81BwOAh4APE3JPGlNHQ8VR0OAs5A/BVJbjUQsw0Fh4OAHRB/RpLPG0wOJwSsoTXnfBolF5o5HARUBqL2pYbDB6bGBDqchYYlAk27cqPt8YFuHVIaxYyjIT6ckwrjaIiPOnzU4aMOH3X4qMNHHU5sowjWmxhqACDAAI3lmdvpn4aTAAAAAElFTkSuQmCC');
}

/* ================== SPACER ====================== */

video::-webkit-media-controls-spacer,
audio::-webkit-media-controls-spacer {
    -webkit-appearance: none !important;
    -webkit-flex: 1 1 0; /* Should be the same as the timeline container. */
    -webkit-order: 2;
    height: 8px;
    margin: 0;
    background-color: transparent !important;
}

/* ================== TIMELINE ====================== */

video::-webkit-media-controls-timeline,
audio::-webkit-media-controls-timeline {
    -webkit-appearance: none !important;
    -webkit-flex: 1 1 0;
    height: 8px;
    margin: 0;
    background-color: transparent !important;
    background-size: 100% 100%;
    border: none !important;
    border-radius: 0 !important;
    box-sizing: content-box !important;
}

video::-webkit-media-controls-timeline {
    -webkit-transform: translate3d(0, 0, 0);
    mix-blend-mode: plus-darker;
}

audio::-webkit-media-controls-timeline::-webkit-slider-runnable-track,
video::-webkit-media-controls-timeline::-webkit-slider-runnable-track {
    -webkit-appearance: none !important;
    background: none !important;
    border: none !important;
}

video::-webkit-media-controls-timeline::-webkit-slider-thumb,
audio::-webkit-media-controls-timeline::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    width: 15px;
    height: 50px;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAiCAYAAABIiGl0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAxNpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDE0IDc5LjE1Njc5NywgMjAxNC8wOC8yMC0wOTo1MzowMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gP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QMsAD1EJAQHpdSpk7GAARaYAPuISE5OQpYfeYwwmBeYrMhjZeJuHkKWAtj7B7DnJchQaQsylgvwHGktL6qwXsH0TE7NETw091gjiecFFtYzmNFSo3LICyysBzBxsI5xoWUJWllHL8lSfTnViFyTyGO4PhgMbrP2lgxNpnPAdBXkkBYDsg48lqbRDLrd7t18Pn9P21PYhG3zl8yoXsY+1zCjDEufgIxjMqPCHMm5wpdBBsVeQK2QpUzZs8dKsGY+SrG8DSxvj8j6DdOKHUPZhkO3KOiDBWiZDGW3MC4f7FPVYvKQyuE8YQvzFJMUcJg+qfit3YVKc4clqB8H3zAThWzmJmzstGN1fI511LVJXYzl7hZQ00F+2dA4sH3P7Am4a0zAeDklEODZYueoVgz+DS4rWk5tTdj2cmqt4tr9sccJFqyG3N4CGxrSu3AZ0MiPAAMAZrLkuVVmRJsAAAAASUVORK5CYII=');
    background-repeat: no-repeat;
    background-size: 15px 17px;
    background-position: 0px 18px;
    background-color: transparent !important;
    border: none !important;
    -webkit-transform: rotateZ(0deg);
}

video::-webkit-media-controls-timeline::-webkit-slider-thumb:active,
audio::-webkit-media-controls-timeline::-webkit-slider-thumb:active {
    background-color: transparent !important;
}

audio::-webkit-media-controls-timeline::-webkit-slider-thumb {
    height: 39px;
    background-position: 0px 12px;
}

video::-webkit-media-controls-current-time-display,
video::-webkit-media-controls-time-remaining-display,
audio::-webkit-media-controls-current-time-display,
audio::-webkit-media-controls-time-remaining-display {
    -webkit-user-select: none;
    -webkit-flex: 0 0 0;
    display: -webkit-flex;
    -webkit-align-items: center;
    overflow-y: hidden;
    overflow-x: hidden;
    letter-spacing: normal;
    word-spacing: normal;
    line-height: normal;
    text-transform: none;
    text-indent: 0px;
    text-decoration: none;
    color: black;
    mix-blend-mode: plus-darker;
    opacity: 0.55;
    height: 50px;
    font-size: 13px;
    font-family: -apple-system-monospaced-numbers;
}

audio::-webkit-media-controls-current-time-display,
video::-webkit-media-controls-current-time-display {
    min-width: 32px;
    -webkit-justify-content: flex-end;
    padding-right: 6px;
}

audio::-webkit-media-controls-time-remaining-display,
video::-webkit-media-controls-time-remaining-display {
    min-width: 38px;
    -webkit-justify-content: flex-start;
    padding-left: 6px;
    margin-right: 6px;
}

video::-webkit-media-controls-timeline-container,
audio::-webkit-media-controls-timeline-container {
    display: -webkit-flex;
    -webkit-flex-direction: row;
    -webkit-align-items: center;
    -webkit-user-select: none;
    -webkit-flex: 1 1 0; /* Any changes here should also be made on the spacer. */
    position: relative;
    padding: 0;
    -webkit-order: 2;
    -webkit-text-size-adjust: auto;
}

audio::-webkit-media-controls-timeline-container {
    padding-right: 10px;
}

audio::-webkit-media-controls-current-time-display.three-digit-time,
video::-webkit-media-controls-current-time-display.three-digit-time {
    min-width: 31px;
}

audio::-webkit-media-controls-time-remaining-display.three-digit-time,
video::-webkit-media-controls-time-remaining-display.three-digit-time {
    min-width: 40px;
}

audio::-webkit-media-controls-current-time-display.four-digit-time,
video::-webkit-media-controls-current-time-display.four-digit-time {
    min-width: 40px;
}

audio::-webkit-media-controls-time-remaining-display.four-digit-time,
video::-webkit-media-controls-time-remaining-display.four-digit-time {
    min-width: 49px;
}

audio::-webkit-media-controls-current-time-display.five-digit-time,
video::-webkit-media-controls-current-time-display.five-digit-time {
    min-width: 51px;
}

audio::-webkit-media-controls-time-remaining-display.five-digit-time,
video::-webkit-media-controls-time-remaining-display.five-digit-time {
    min-width: 60px;
}

audio::-webkit-media-controls-current-time-display.six-digit-time,
video::-webkit-media-controls-current-time-display.six-digit-time {
    min-width: 60px;
}

audio::-webkit-media-controls-time-remaining-display.six-digit-time,
video::-webkit-media-controls-time-remaining-display.six-digit-time {
    min-width: 69px;
}

/* ================== STATUS DISPLAY ====================== */

video::-webkit-media-controls-status-display,
audio::-webkit-media-controls-status-display {

    overflow: hidden;
    font-family: -apple-system;
    letter-spacing: normal;
    word-spacing: normal;
    line-height: normal;
    text-transform: none;
    text-indent: 0px;
    text-decoration: none;
    color: black;
    mix-blend-mode: plus-darker;
    opacity: 0.55;
    -webkit-order: 2;
}

/* ================== CAPTIONS ====================== */

video::-webkit-media-text-track-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding-bottom: 5px;
    z-index: 0;

    text-align: center;
    color: rgba(255, 255, 255, 1);

    letter-spacing: normal;
    word-spacing: normal;
    text-transform: none;
    text-indent: 0;
    text-decoration: none;
    pointer-events: none;
    -webkit-user-select: none;
    word-break: break-word;

    -webkit-flex: 1 1;

    -webkit-line-box-contain: block inline-box replaced;
}

video::cue {
    background-color: rgba(0, 0, 0, 0.8);
}

video::-webkit-media-text-track-display {
    position: absolute;
    overflow: hidden;
    white-space: pre-wrap;
    -webkit-box-sizing: border-box;
    font: 22px sans-serif;
}

video::-webkit-media-text-track-display-backdrop {
    display: inline-block;
}

video::cue(:future) {
    color: gray;
}

video::-webkit-media-text-track-container b {
    font-weight: bold;
}

video::-webkit-media-text-track-container u {
    text-decoration: underline;
}

video::-webkit-media-text-track-container i {
    font-style: italic;
}

/* ==================== PLAYBACK PLACARD ==================== */

video::-webkit-media-controls-wireless-playback-status,
audio::-webkit-media-controls-wireless-playback-status {
    display: block;
    position: absolute;
    left: 0px;
    top: 0px;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 131 90"><g fill="none" stroke="-apple-system-gray" stroke-width="4"><rect x="2" y="2" width="127" height="76"/><line x1="30" y1="88" x2="101" y2="88"/></g></svg>');
    background-color: rgb(51, 51, 53);
    background-repeat: no-repeat;
    background-position: 50% calc(.5 * (100% - 25px) - 21pt);
    background-size: 131px auto;
    color: -apple-system-gray;
    font: -apple-system;
    font-weight: 400;
    vertical-align: text-bottom;
}

video::-webkit-media-controls-wireless-playback-text,
audio::-webkit-media-controls-wireless-playback-text {
    cursor: default;
    position: absolute;
    width: 100%;
    top: calc(.5 * (100% - 25px) + (.5 * (90px + 42pt) - 42pt));
    -webkit-user-select: none;
    margin: 0px;
    height: 42pt;
}

video::-webkit-media-controls-wireless-playback-text-top,
audio::-webkit-media-controls-wireless-playback-text-top {
    position: absolute;
    top: 15pt;
    width: 100%;
    line-height: 12pt;
    height: 12pt;
    font-size: 12pt;
    text-align: center;
    margin: 0px;
    color: -apple-system-gray;
}

video::-webkit-media-controls-wireless-playback-text-bottom,
audio::-webkit-media-controls-wireless-playback-text-bottom {
    position: absolute;
    bottom: 0;
    left: 5%;
    width: 90%;
    line-height: 10pt;
    height: 10pt;
    font-size: 10pt;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0px;
}

video::-webkit-media-controls-wireless-playback-status.small,
audio::-webkit-media-controls-wireless-playback-status.small {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 62 43"><g fill="none" stroke="rgb(146,146,146)" stroke-width="2"><rect x="1" y="1" width="60" height="36"/><line x1="14" y1="42" x2="48" y2="42"/></g></svg>');
    background-position: 50% calc(.5 * (100% - 25px) - 5pt);
    background-size: 62px auto;
}

video::-webkit-media-controls-wireless-playback-text-top.small,
audio::-webkit-media-controls-wireless-playback-text-top.small {
    top: 4pt;
}

video::-webkit-media-controls-wireless-playback-text-bottom.small,
audio::-webkit-media-controls-wireless-playback-text-bottom.small {
    display: none;
}

video::-webkit-media-controls-wireless-playback-status.picture-in-picture,
audio::-webkit-media-controls-wireless-playback-status.picture-in-picture
{
    background-size: 304px auto;
    background-position: 50% calc(.5 * (100% - 25px));
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 304 150"><g fill="none" stroke="-apple-system-gray" stroke-width="3"><path d="m 172,106 -81,0 c -3.5,0 -6,-2.5 -6,-6 l 0,-89 c 0,-3.5 2.5,-6 6,-6 l 122,0 c 3.5,0 6,2.5 6,6 l 0,57" /><path d="m 233,119 -53,0 c -3,0 -3,-0 -3,-3 l 0,-40 c 0,-3 0,-3 3,-3 l 53,0 c 3,0 3,0 3,3 l 0,40 c 0,3 0,3 -3,3 z" /></g></svg>');
}

video::-webkit-media-controls-wireless-playback-text-top.picture-in-picture,
audio::-webkit-media-controls-wireless-playback-text-top.picture-in-picture {
    top: initial;
    bottom: 0;
}

video::-webkit-media-controls-wireless-playback-text-bottom.picture-in-picture,
audio::-webkit-media-controls-wireless-playback-text-bottom.picture-in-picture {
    display: none;
}

video::-webkit-media-controls-wireless-playback-status.hidden,
audio::-webkit-media-controls-wireless-playback-status.hidden {
    display: none;
}

/* When PiP is active, we don't want the controls container showing. */
video::-webkit-media-controls-panel-container.picture-in-picture {
    opacity: 0;
    pointer-events: none;
}

