/*
 * Copyright (c) 2014 The Chromium Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

:host {
    flex: none;
    padding: 0 2px;
}

.toolbar-shadow {
    position: relative;
    white-space: nowrap;
    height: 26px;
    overflow: hidden;
    z-index: 12;
    display: flex;
    flex: none;
    align-items: center;
}

.toolbar-shadow.wrappable {
    flex-wrap: wrap;
}

.toolbar-shadow.wrappable-reverse {
    flex-direction: row-reverse;
}

.toolbar-shadow.vertical {
    flex-direction: column;
    height: auto;
    width: 26px;
}

.toolbar-item {
    position: relative;
    display: flex;
    background-color: transparent;
    flex: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    height: 26px;
    border: none;
    color: #5a5a5a;
}

.toolbar-dropdown-arrow {
    -webkit-mask-image: url(Images/toolbarButtonGlyphs.png);
    -webkit-mask-size: 352px 168px;
    -webkit-mask-position: -18px -96px;
    background-color: #6D6D6D;
    width: 12px;
    height: 12px;
    display: inline-block;
    pointer-events: none;
    margin: auto 0;
    flex: none;
}

@media (-webkit-min-device-pixel-ratio: 1.5) {
    .toolbar-dropdown-arrow {
        -webkit-mask-image: url(Images/toolbarButtonGlyphs_2x.png);
    }
} /* media */

/* Toolbar item */

.toolbar-button {
    white-space: nowrap;
    overflow: hidden;
    min-width: 28px;
    background: transparent;
}

.toolbar-text {
    margin: 0 5px;
    flex: none;
    color: #5a5a5a;
}

.toolbar-has-dropdown {
    justify-content: space-between;
}

.toolbar-has-dropdown .toolbar-text {
    margin: 0 4px 0 0;
    text-overflow: ellipsis;
    flex: auto;
    overflow: hidden;
    text-align: right;
    color: #333 !important;
}

.toolbar-button .toolbar-dropdown-arrow {
    background-color: #333 !important;
}

.toolbar-has-glyph .toolbar-text {
    margin-left: 0;
}

.toolbar-button:not(.toolbar-has-glyph):not(.toolbar-has-dropdown):not(.menu-toolbar-item) {
    font-weight: bold;
}

.toolbar-button:not(.toolbar-has-glyph):not(.toolbar-has-dropdown):not(.menu-toolbar-item).hover {
    background-color: #f3f3f3;
}

.toolbar-glyph {
    -webkit-mask-image: url(Images/toolbarButtonGlyphs.png);
    -webkit-mask-size: 352px 168px;
    background-color: #5a5a5a;
    width: 28px;
    height: 24px;
    flex: none;
    transform: translateX(-2px);
}

@media (-webkit-min-device-pixel-ratio: 1.5) {
.toolbar-glyph {
    -webkit-mask-image: url(Images/toolbarButtonGlyphs_2x.png);
}
} /* media */

/* Button */

.toolbar-button:disabled {
    opacity: 0.5;
}

.toolbar-button:enabled.hover:not(:active) .toolbar-glyph {
    background-color: #333;
}

.toolbar-button:enabled.hover:not(:active) .toolbar-text {
    color: #333;
}

.toolbar-button.toolbar-state-on .toolbar-glyph,
.toolbar-blue-on-hover .toolbar-button:not(.toolbar-state-on):enabled.hover:not(:active),
.-theme-selection-color {
    background-color: hsl(218, 81%, 59%);
}

.toolbar-button.toolbar-state-on .toolbar-text,
.-theme-selection-color {
    color: hsl(218, 81%, 59%);
}

.toolbar-blue-on-hover .toolbar-button:not(.toolbar-state-on):enabled.hover .toolbar-glyph {
    background-color: white;
}

.toolbar-blue-on-hover .toolbar-button:not(.toolbar-state-on):enabled.hover .toolbar-text {
    color: white;
}

.toolbar-button.toolbar-state-on:enabled.hover:not(:active) .toolbar-glyph,
.toolbar-blue-on-hover .toolbar-button:not(.toolbar-state-on):enabled:active.hover,
.-theme-selection-color {
    background-color: hsl(218, 96%, 54%);
}

.toolbar-button.toolbar-state-on:enabled.hover:not(:active) .toolbar-text,
.-theme-selection-color {
    color: hsl(218, 96%, 54%);
}

.toolbar-toggled-gray .toolbar-button.toolbar-state-on {
    background-color: #f3f3f3 !important;
}

/* Checkbox */

.toolbar-item.checkbox {
    padding: 0 5px 0 2px;
}

.toolbar-item.checkbox.hover {
    color: #333;
}

/* Select */

.toolbar-select-container {
    display: inline-flex;
    flex-shrink: 0;
    margin-right: 6px;
}

select.toolbar-item {
    min-width: 48px;
    -webkit-appearance: none;
    border: 0;
    border-radius: 0;
    padding: 0 15px 0 5px;
    margin-right: -10px;
    position: relative;
}

/* Input */

input.toolbar-item {
    width: 200px;
    height: 20px;
    padding: 3px;
    margin: 1px 3px;
    background-color: white;
    border: solid 1px #d8d8d8;
}

input.toolbar-item:focus,
input.toolbar-item.hover {
    border: solid 1px rgb(202, 202, 202);
}

/* Separator */

.toolbar-divider {
    background-color: #ccc;
    width: 1px;
    margin: 5px 4px;
    height: 16px;
}

.toolbar-spacer {
    flex: auto;
}

/* Long click */

.long-click-glyph {
    position: absolute;
    background-color: #5a5a5a;
    -webkit-mask-image: url(Images/toolbarButtonGlyphs.png);
    -webkit-mask-position: -290px -46px;
    -webkit-mask-size: 352px 168px;
    width: 28px;
    height: 24px;
    top: 0;
    left:  0;
}

@media (-webkit-min-device-pixel-ratio: 1.5) {
.long-click-glyph {
    -webkit-mask-image: url(Images/toolbarButtonGlyphs_2x.png);
}
} /* media */

.toolbar-button.emulate-active {
    background-color: rgb(163, 163, 163);
}

.toolbar-shadow.floating {
    flex-direction: column;
    height: auto;
    background-color: white;
    border: 1px solid #ccc;
    margin-top: -1px;
    width: 28px;
    left: -2px;
}

/* Predefined items */

.dock-toolbar-item-undock.toolbar-glyph {
    -webkit-mask-position: 0 -48px;
}

.dock-toolbar-item-bottom.toolbar-glyph {
    -webkit-mask-position: -32px -24px;
}

.dock-toolbar-item-right.toolbar-glyph {
    -webkit-mask-position: -256px -48px;
}

.menu-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -192px -24px;
}

.node-search-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -320px -120px;
}

.delete-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -128px 0;
}

.clear-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -64px 0;
}

.refresh-toolbar-item.toolbar-glyph {
    -webkit-mask-position: 0 0;
}

.visibility-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -96px 0;
}

.large-list-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -224px 0;
}

.record-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -288px 0;
}

.toolbar-state-on .record-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -288px -24px;
}

.camera-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -96px -24px;
}

.step-in-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -64px -72px;
}

.step-out-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -96px -72px;
}

.step-over-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -128px -72px;
}

.play-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -64px -48px;
}

.play-backwards-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -64px -48px;
    transform: scaleX(-1);
}

.stop-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -96px -48px;
}

.pause-on-exceptions-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -256px 0;
}

.pause-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -32px -72px;
}

.toolbar-state-on .pause-toolbar-item.toolbar-glyph {
    -webkit-mask-position: 0 -72px;
}

.toolbar-state-on .breakpoint-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -32px 0;
}

.breakpoint-toolbar-item.toolbar-glyph {
    -webkit-mask-position: 0 -24px;
}

.notification-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -32px -120px;
}

.format-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -256px -24px;
}

.garbage-collect-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -128px -24px;
}

.filter-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -32px -48px;
}

.waterfall-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -128px -48px;
}

.pan-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -98px -120px;
}

.center-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -128px -120px;
}

.rotate-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -160px -120px;
}

.pin-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -256px -120px;
}

.animation-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -192px -120px;
}

.eyedropper-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -288px -120px;
}

.add-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -224px -120px;
}

.toolbar-state-pause-outline .animation-control-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -320px 0px;
}

.toolbar-state-replay-outline .animation-control-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -320px -24px;
    background-color: rgb(66, 129, 235) !important;
}

.toolbar-state-play-outline .animation-control-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -320px -48px;
    background-color: rgb(66, 129, 235) !important;
}

.background-color-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -96px -144px;
}

.foreground-color-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -128px -144px;
}

.layout-editor-toolbar-item.toolbar-glyph {
    -webkit-mask-position: 0 -144px;
}

.block-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -32px -144px;
}

.phone-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -320px -96px;
}

.rotate-screen-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -192px -144px;
}

.enter-fullscreen-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -256px -96px;
}

.responsive-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -288px -96px;
}

.frame-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -256px -144px;
}

.domain-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -160px -144px;
}

.folder-toolbar-item.toolbar-glyph {
    -webkit-mask-position: -224px -144px;
}

.goto-source-toolbar-item.toolbar-glyph {
    -webkit-mask-position: 0 -120px;
}

.toolbar-state-on .record-toolbar-item.toolbar-glyph,
.toolbar-state-active .filter-toolbar-item.toolbar-glyph,
.toolbar-state-active .block-toolbar-item.toolbar-glyph {
    background-color: rgb(216, 0, 0) !important;
}

:host-context(.-theme-with-dark-background) .toolbar-state-active .filter-toolbar-item.toolbar-glyph,
:host-context(.-theme-with-dark-background) .toolbar-state-active .block-toolbar-item.toolbar-glyph,
:host-context(.-theme-with-dark-background) .toolbar-state-on .record-toolbar-item.toolbar-glyph {
    background-color: hsl(0, 100%, 65%) !important;
}
