/*
 * Copyright (C) 2015 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.
 */

.visual-style-property-container {
    display: flex;
    min-height: 22px;
    margin: 0 6px;

    flex-basis: 160px;
    flex-grow: 1;
}

.visual-style-property-container.inactive {
    display: none;
}

.visual-style-property-container > .visual-style-property-title {
    margin: 4px;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
}

.visual-style-property-container.layout-reversed > .visual-style-property-title {
    order: 2;
    text-align: left;
}

.visual-style-property-container > .visual-style-property-title > .property-reference-info {
    cursor: help;
}

.visual-style-property-container.disabled > .visual-style-property-title > :not(.property-reference-info) {
    opacity: 0.7;
}

.visual-style-property-container > .visual-style-property-editor-warning {
    display: none;
    position: relative;
    order: 1;
    top: 5px;
    width: 10px;
    height: 10px;
    margin-right: 4px;
}

.visual-style-property-container.layout-reversed > .visual-style-property-editor-warning {
    margin-right: 0;
    margin-left: 4px;
}

.visual-style-property-container.missing-dependency > .visual-style-property-editor-warning {
    display: block;
    content: url(../Images/Warning.svg);
}

.visual-style-property-container.invalid-value > .visual-style-property-editor-warning {
    display: block;
    content: url(../Images/Error.svg);
}

.visual-style-property-container > .visual-style-property-value-container {
    flex: 1;
    order: 2;
    position: relative;
}

.visual-style-property-container.layout-reversed > .visual-style-property-value-container {
    order: 0;
}

.visual-style-property-container.disabled > .visual-style-property-value-container {
    pointer-events: none;
    opacity: 0.4;
}

.visual-style-property-container:matches(.missing-dependency, .invalid-value) > *:first-child:matches(.visual-style-property-value-container) {
    margin-left: 2px;
}

.visual-style-property-container > .visual-style-property-value-container select {
    width: 100%;
    margin: 1px 0;
}

.visual-style-property-container > .visual-style-property-value-container input {
    width: calc(100% - 1px);
    margin: 0;
    outline: none;
}

.visual-style-property-container.disabled > .visual-style-property-value-container input {
    pointer-events: none !important;
}

.visual-style-property-container > .visual-style-property-value-container > .visual-style-special-property-placeholder {
    position: absolute;
    top: 2px;
    left: 1px;
    width: calc(100% - 20px);
    line-height: 16px;
    text-indent: 7px;
    border-radius: 4px;
    background-color: white;
    color: hsl(0, 0%, 50%);
    font-size: 11px;
    pointer-events: none;
    overflow: hidden;
    white-space: nowrap;
    z-index: 1;
}

.visual-style-property-container > *:first-child:matches(.visual-style-property-value-container) > .visual-style-special-property-placeholder {
    display: none;
}

.visual-style-property-info-popover {
    width: 190px;
    margin: 0 5px 3px;
    padding: 0;
}

.visual-style-property-info-popover > h3 {
    margin: 6px 3px;
}
