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

.sidebar > .panel.details.css-style .visual > .details-section :matches(.details-section, .group).inactive {
    border-bottom: none;
}

.sidebar > .panel.details.css-style .visual > .details-section :matches(.details-section, .group).inactive > * {
    display: none;
}

.sidebar > .panel.details.css-style .visual > .details-section .details-section > .header {
    font-weight: normal;
}

.sidebar > .panel.details.css-style .visual > .details-section .details-section > .header > .options {
    width: 15px;
    height: 15px;
    background-image: url(../Images/NavigationItemTrash.svg);
    background-size: 15px 15px;
    opacity: 0.7;
}

.sidebar > .panel.details.css-style .visual > .details-section .details-section > .header > span {
    display: flex;
}

.sidebar > .panel.details.css-style .visual > .details-section .details-section.has-set-property > .header > span::after {
    width: 7px;
    height: 7px;
    margin: 4px 6px;
    border-radius: 50%;
    background-color: var(--selected-background-color);
    opacity: 0.5;
    content: "";
}

.sidebar > .panel.details.css-style .visual > .details-section .details-section > .content {
    margin-top: 5px;
}

.sidebar > .panel.details.css-style .visual > .details-section .details-section > .content .group > .row {
    display: flex;
    flex-wrap: wrap;
}

.sidebar > .panel.details.css-style .visual > .details-section .details-section > .content .group > .metric-section-row {
    flex-wrap: nowrap;
}

.sidebar > .panel.details.css-style .visual > .details-section .details-section > .content > .group + .group > .row:first-child {
    padding-top: 7px;
    border-top: none;
}

.sidebar > .panel.details.css-style .visual > .details-section .details-section > .content .group > .row:last-child {
    padding-bottom: 3px;
}

.sidebar > .panel.details.css-style .visual > .details-section .details-section > .content .group > .row.visual-style-separated-row {
    border-bottom: 1px solid hsl(0, 0%, 83%);
    margin-bottom: 5px;
    padding-bottom: 2px;
}

@media (-webkit-min-device-pixel-ratio: 2) {
    .sidebar > .panel.details.css-style .visual > .details-section .details-section > .content .group > .row.visual-style-separated-row {
        border-bottom-width: 0.5px !important;
    }
}

.sidebar > .panel.details.css-style .visual > .details-section .details-section > .content .group > .row > .visual-style-property-container > .visual-style-property-title {
    width: 55px;
}

.sidebar > .panel.details.css-style .visual.disabled > .details-section:not(.visual-style-selector-section) {
    opacity: 0.5;
    pointer-events: none;
}

.sidebar > .panel.details.css-style .visual.disabled > .details-section:not(.visual-style-selector-section) input {
    pointer-events: none;
}

.sidebar > .panel.details.css-style .visual > .details-section .details-section > .content .group > .row + .row.visual-style-tabbed-properties-row,
.sidebar > .panel.details.css-style .visual > .details-section.background .details-section.background-style .visual-style-property-container.comma-separated-keyword-editor.background {
    margin-top: 3px;
}

.sidebar > .panel.details.css-style .visual > .details-section.background .details-section.border .visual-style-property-container.keyword-checkbox.border-image-slice {
    flex: 1;
}
