/*
 * Copyright (C) 2012 Google Inc.
 *
 * 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 COMPUTER, 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 COMPUTER, 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.
 */

/* Media controls for Chromium on Android*/

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

audio {
    width: 300px;
    height: 35px;
}

audio:-webkit-full-page-media, video:-webkit-full-page-media {
    max-height: 100%;
    max-width: 100%;
}

audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel {
    display: -webkit-box;
    -webkit-box-orient: horizontal;
    -webkit-box-align: center;
    -webkit-box-pack: center;
    bottom: auto;
    height: 35px;
    background-color: rgba(20, 20, 20, 0.8);
}

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

::-webkit-media-controls {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-box-pack: end;
    -webkit-box-align: center;
}

audio::-webkit-media-controls-enclosure, video::-webkit-media-controls-enclosure {
    width: 100%;
    max-width: 800px;
    height: 35px;
    bottom: 0;
    text-indent: 0;
    padding: 0;
    box-sizing: border-box;
}

video::-webkit-media-controls-enclosure {
    padding: 0px 5px 5px 5px;
    height: 35px;
}

audio::-webkit-media-controls-overlay-enclosure {
    display: none;
}

video::-webkit-media-controls-overlay-enclosure {
    display: -webkit-box;
    -webkit-box-orient: horizontal;
    -webkit-box-pack: center;
    -webkit-box-align: center;
    -webkit-box-flex: 1;
    width: 100%;
    height: 100%;
    max-width: 800px;
    text-indent: 0;
    box-sizing: border-box;
    overflow: hidden;
}

audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button {
    display: none;
}

audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button {
    -webkit-appearance: media-play-button;
    display: inline;
    border: none;
    box-sizing: border-box;
    width: 35px;
    height: 35px;
    line-height: 35px;
    margin-left: 9px;
    margin-right: 9px;
    padding: 0;
}

video::-webkit-media-controls-overlay-play-button {
    -webkit-appearance: media-overlay-play-button;
    -webkit-box-align: center;
    display: -webkit-box;
    border: none;
    box-sizing: border-box;
    background-color: transparent;
    width: 80px;
    height: 80px;
    padding: 0;
}

audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display,
audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display {
    -webkit-appearance: media-current-time-display;
    -webkit-user-select: none;
    display: block;
    border: none;
    cursor: default;

    height: 35px;
    margin: 0 9px 0 0;
    padding: 0;

    line-height: 35px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 18px;
    font-weight: bold;
    color: white;

    letter-spacing: normal;
    word-spacing: normal;
    text-transform: none;
    text-indent: 0;
    text-shadow: none;
    text-decoration: none;
}

audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline {
    -webkit-appearance: media-slider;
    display: -webkit-box;
    -webkit-box-flex: 1;
    height: 8px;
    margin: 0 15px 0 0;
    padding: 0;
    background-color: transparent;
    min-width: 25px;
}


video::-webkit-media-controls-fullscreen-button {
    -webkit-appearance: media-enter-fullscreen-button;
    display: inline;
    border: none;
    box-sizing: border-box;
    width: 35px;
    height: 35px;
    line-height: 35px;
    margin-left: -5px;
    margin-right: 9px;
    padding: 0;
}

input[type="range"]::-webkit-media-slider-container {
    display: -webkit-box;
    -webkit-box-align: center;
    -webkit-box-orient: horizontal;
    box-sizing: border-box;
    height: 100%;
    width: 100%;
    border: 1px solid rgba(230, 230, 230, 0.35);
    border-radius: 4px;
    background-color: transparent;
}

/* The negative right margin causes the track to overflow its container. */
input[type="range"]::-webkit-media-slider-container > div {
    margin-right: -14px;
}

input[type="range"]::-webkit-media-slider-thumb {
    margin-left: -7px;
    margin-right: -7px;
}

audio::-webkit-media-controls-fullscreen-button {
    display: none;
}

audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider {
    display: none;
}
