/*
 * Copyright (C) 2013, 2014 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. AND ITS CONTRIBUTORS ``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 ITS CONTRIBUTORS
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 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.
 */

.toolbar .dashboard-container {
    position: relative;

    width: 375px;

    border-radius: 4px;
    background-color: rgb(252, 252, 252);

    border: 1px solid transparent;
    border-top-color: white;

    box-shadow: rgba(0, 0, 0, 0.15) 0 1px 0;

    margin: 4px 10px;
    overflow: hidden;
}

body.mac-platform.legacy .toolbar .dashboard-container {
    border: 1px solid rgb(163, 163, 163);
    background-color: transparent;
    box-shadow: rgba(255, 255, 255, 0.45) 0 0px 0;
}

body.window-inactive .toolbar .dashboard-container {
    border: 1px solid rgb(220, 220, 220);
    background-color: rgb(246, 246, 246);
    box-shadow: none;
}

body.mac-platform.legacy.window-inactive .toolbar .dashboard-container {
    border: 1px solid rgb(196, 196, 196);
    background-image: none;
    background-color: rgb(239, 239, 239);
    box-shadow: rgba(255, 255, 255, 0.45) 0 1px 0;
}

.toolbar.collapsed .dashboard-container {
    width: 175px;
}

.toolbar.small-size.icon-and-label-vertical .dashboard-container,
.toolbar.normal-size.icon-and-label-vertical .dashboard-container {
    margin-top: 6px;
}

/* Styles for the extra short style, one row with quite a small y-margin */

.toolbar.label-only .dashboard-container,
.toolbar.small-size.icon-only .dashboard-container,
.toolbar.small-size.icon-and-label-vertical .dashboard-container,
.toolbar.small-size.icon-and-label-horizontal .dashboard-container {
    height: 22px;
}

/* Styles for the fairly short style, one row with quite a bit of y-margin */

.toolbar.normal-size.icon-only .dashboard-container,
.toolbar.normal-size.icon-and-label-vertical .dashboard-container,
.toolbar.normal-size.icon-and-label-horizontal .dashboard-container {
    height: 30px;
}

/* Default styles for dashboards */

.toolbar .dashboard {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;

    padding: 0 10px 0 5px;

    -webkit-animation-duration: 0.4s;
}

body.window-inactive .toolbar .dashboard {
    background-color: rgb(246, 246, 246);
    box-shadow: none;
}

body.mac-platform.legacy .toolbar .dashboard,
body.mac-platform.legacy.window-inactive .toolbar .dashboard {
    background-image: linear-gradient(to bottom, rgba(0, 128, 255, 0), rgba(0, 128, 255, 0.075)),
        linear-gradient(to right, rgba(0, 0, 0, 0.09), transparent, rgba(0, 0, 0, 0.09)),
        linear-gradient(to bottom, rgb(240, 244, 251), rgb(250, 253, 255));
    background-size: 100% 6px, auto, auto;
    background-position: bottom, center, center;
    background-repeat: no-repeat;
    background-color: transparent;
    box-shadow: none;
}

.toolbar .dashboard.visible {
    z-index: 1; /* Establish a stacking context. */
}

.toolbar .dashboard:not(.visible) {
    opacity: 0;
}

.toolbar .dashboard.slide-out-up {
    -webkit-animation-name: slide-top-edge;
    -webkit-animation-direction: reverse;
}

.toolbar .dashboard.slide-out-down {
    -webkit-animation-name: slide-bottom-edge;
}

.toolbar .dashboard.slide-in-up {
    -webkit-animation-name: slide-bottom-edge;
    -webkit-animation-direction: reverse;
}

.toolbar .dashboard.slide-in-down {
    -webkit-animation-name: slide-top-edge;
}

@-webkit-keyframes slide-top-edge {
    from {
        -webkit-transform: translateY(-30px);
    }
    to {
        -webkit-transform: translateY(0);
    }
}

@-webkit-keyframes slide-bottom-edge {
    from {
        -webkit-transform: translateY(0);
    }
    to {
        -webkit-transform: translateY(30px);
    }
}

.dashboard-container .advance-arrow {
    position: absolute;
    right: 0px;
    width: 10px;
    height: 10px;
    margin: 4px;
    opacity: 0.6;

    z-index: 1000;
    background-repeat: no-repeat;
    background-size: 8px;
    background-image: url(../Images/UpDownArrows.svg);

    transition-property: opacity;
    transition-duration: 0.2s;
}

body.mac-platform.legacy .dashboard-container .advance-arrow {
    background-image: url(../Images/Legacy/UpDownArrows.svg);
}

.dashboard-container .advance-arrow:hover {
    opacity: 0.8;
}

.dashboard-container .advance-arrow:active {
    opacity: 1;
}

.dashboard-container .advance-arrow.inactive {
    opacity: 0;
    pointer-events: none;
}

.toolbar.label-only .dashboard-container .advance-arrow {
    width: 8px;
    height: 8px;
    margin: 2px 4px 2px 2px;
    background-size: 6px;
}

.dashboard-container .advance-arrow.advance-forward {
    top: 0;
    background-position: 0% 0%;
}

.dashboard-container .advance-arrow.advance-backward {
    bottom: 0;
    background-position: 0% 100%;
}
