/*
 * Copyright (C) 2015 Devin Rousso <webkit@devinrousso.com>. 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.
 */

.visual-style-property-container.background-picker > .visual-style-property-value-container {
    display: flex;
}

.visual-style-property-container.background-picker > .visual-style-property-value-container > .inline-swatch.gradient {
    width: 38px;
    height: 18px;
    margin: 1px 0 0;
    border: 1px solid hsla(0, 0%, 25%, 0.4);
    border-radius: 4px;
}

.visual-style-property-container.background-picker > .visual-style-property-value-container:not(.gradient-value) > .inline-swatch.gradient {
    display: none;
}

.visual-style-property-container.background-picker > .visual-style-property-value-container > .inline-swatch.gradient:hover {
    border-color: hsla(0, 0%, 25%, 0.8);
}

.visual-style-property-container.background-picker > .visual-style-property-value-container > .inline-swatch.gradient:active {
    border-color: hsl(0, 0%, 25%);
}

.visual-style-property-container.background-picker > .visual-style-property-value-container > .inline-swatch.gradient > span {
    border: none;
}

.visual-style-property-container.background-picker > .visual-style-property-value-container.gradient-value > .inline-swatch.gradient + .value-input {
    margin-left: -3px;
    padding-left: 5px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: none;
}

.visual-style-property-container.background-picker > .visual-style-property-value-container > .value-input {
    margin: 1px 4px 3px 0;
    padding: 0 3px;
    border-radius: 4px;
    border: solid 1px hsl(0, 0%, 83%);
    text-align: left;
    font-size: 10px;
}

.visual-style-property-container.background-picker > .visual-style-property-value-container > .value-input[disabled] {
    opacity: 0.7;
    pointer-events: none;
}

.visual-style-property-container.background-picker > .visual-style-property-value-container > .value-type-picker-select {
    max-width: 170px;
}
