/*
 * 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.
 */

body.web .toolbar.collapsed .dashboard.default > .time,
body.web .toolbar.collapsed .dashboard.default > .resourcesSize,
body.web .toolbar.collapsed .dashboard.default > .logs {
    display: none;
}

body.javascript .toolbar .dashboard.default > .time,
body.javascript .toolbar .dashboard.default > .resourcesSize,
body.javascript .toolbar .dashboard.default > .resourcesCount {
    display: none;
}

.toolbar .dashboard.default {
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-between;
}

.toolbar .dashboard.default > .item {
    line-height: 13px;

    padding: 0 5px;

    display: flex;

    min-width: 45px;

    justify-content: center;
    align-items: center;

    border-radius: 4px;
    border: 1px solid transparent;
}

body.mac-platform.legacy .toolbar .dashboard.default > .item {
    font-family: Helvetica, sans-serif;
    font-weight: bold;
}

.toolbar .dashboard.default > .time,
.toolbar .dashboard.default > .resourcesSize {
    min-width: 70px;
}

.toolbar .dashboard.default > .item.enabled:hover {
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.toolbar .dashboard.default > .item.enabled:active {
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.toolbar .dashboard.default > .item > * {
    display: flex;
    align-items: center;
}

.toolbar .dashboard.default > .item > img {
    opacity: 0.2;
    width: 16px;
    height: 16px;
    pointer-events: none;
}

.toolbar .dashboard.default > .item.enabled > img {
    opacity: 0.5;
}

.toolbar .dashboard.default > .item.enabled:hover > img {
    opacity: 0.65;
}

.toolbar .dashboard.default > .item > div {
    display: flex;
    flex: 1;

    color: rgba(0, 0, 0, 0.2);
    padding-left: 2px;
}

.toolbar .dashboard.default > .item.enabled > div {
    color: rgba(0, 0, 0, 0.7);
}

.toolbar .dashboard.default > .item.enabled:hover > div {
    color: rgba(0, 0, 0, 0.85);
}

.toolbar .dashboard.default > .resourcesCount > img {
    content: url(../Images/Resources.svg);
}

.toolbar .dashboard.default > .time > img {
    content: url(../Images/Time.svg);
}

.toolbar .dashboard.default > .logs > img {
    content: url(../Images/Logs.svg);
}

.toolbar .dashboard.default > .resourcesSize > img {
    content: url(../Images/Weight.svg);
}

.toolbar .dashboard.default > .errors > img {
    content: url(../Images/Errors.svg);
}

.toolbar .dashboard.default > .errors.enabled > img {
    content: url(../Images/ErrorsEnabled.svg);
    opacity: 0.9;
}

body.mac-platform.legacy .toolbar .dashboard.default > .resourcesCount > img {
    content: url(../Images/Legacy/Resources.svg);
}

body.mac-platform.legacy .toolbar .dashboard.default > .time > img {
    content: url(../Images/Legacy/Time.svg);
}

body.mac-platform.legacy .toolbar .dashboard.default > .logs > img {
    content: url(../Images/Legacy/Logs.svg);
}

body.mac-platform.legacy .toolbar .dashboard.default > .resourcesSize > img {
    content: url(../Images/Legacy/Weight.svg);
}

body.mac-platform.legacy .toolbar .dashboard.default > .errors > img {
    content: url(../Images/Legacy/Errors.svg);
}

body.mac-platform.legacy .toolbar .dashboard.default > .errors.enabled > img {
    content: url(../Images/Legacy/ErrorsEnabled.svg);
}

.toolbar .dashboard.default > .errors.enabled:hover > img {
    opacity: 1;
}

.toolbar .dashboard.default > .errors.enabled > div {
    color: rgba(201, 55, 57, 0.9);
}

.toolbar .dashboard.default > .errors.enabled:hover > div {
    color: rgb(201, 55, 57);
}

.toolbar .dashboard.default > .issues > img {
    content: url(../Images/Issues.svg);
}

.toolbar .dashboard.default > .issues.enabled > img {
    content: url(../Images/IssuesEnabled.svg);
    opacity: 0.9;
}

body.mac-platform.legacy .toolbar .dashboard.default > .issues > img {
    content: url(../Images/Legacy/Issues.svg);
}

body.mac-platform.legacy .toolbar .dashboard.default > .issues.enabled > img {
    content: url(../Images/Legacy/IssuesEnabled.svg);
}

.toolbar .dashboard.default > .issues.enabled:hover > img {
    opacity: 1;
}

.toolbar .dashboard.default > .issues.enabled > div {
    color: rgba(224, 164, 4, 0.9);
}

.toolbar .dashboard.default > .issues.enabled:hover > div {
    color: rgb(224, 164, 4);
}

/* Styles for the pulsing animated state of console items */

.toolbar .dashboard.default > .item.pulsing {
    -webkit-animation-name: console-item-pulse;
    -webkit-animation-duration: 0.75s;
}

@-webkit-keyframes console-item-pulse {
    50% { opacity: 0.6; }
}


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

.toolbar.label-only .dashboard.default > .item,
.toolbar.small-size.icon-only .dashboard.default > .item,
.toolbar.small-size.icon-and-label-vertical .dashboard.default > .item,
.toolbar.small-size.icon-and-label-horizontal .dashboard.default > .item {
    margin: 1px 0;
}

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

.toolbar.normal-size.icon-only .dashboard.default > .item,
.toolbar.normal-size.icon-and-label-vertical .dashboard.default > .item,
.toolbar.normal-size.icon-and-label-horizontal .dashboard.default > .item {
    margin: 4px 0;
}
