/*
 * Copyright (C) 2018 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.navigation.sources > .content {
    top: var(--navigation-bar-height);
}

.sidebar > .panel.navigation.sources > .navigation-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

.sidebar > .panel.navigation.sources > .navigation-bar .debugger-breakpoints {
    fill: none;
    stroke: var(--glyph-color);
}

.sidebar > .panel.navigation.sources > .navigation-bar .debugger-breakpoints.activated {
    fill: var(--glyph-color-active);
    stroke: var(--glyph-color-active);
}

.sidebar > .panel.navigation.sources > .navigation-bar .debugger-pause-resume {
    fill: none;
    stroke: var(--glyph-color);
}

.sidebar > .panel.navigation.sources > .navigation-bar .debugger-pause-resume.activated {
    stroke: var(--glyph-color-active);
}

.sidebar > .panel.navigation.sources > .content > .warning-banner {
    padding: 11px 6px;
    font-size: 11px;
    text-align: center;
    color: var(--yellow-highlight-text-color);
    background-color: var(--yellow-highlight-background-color);
    border-bottom: 1px solid var(--border-color);
}

.sidebar > .panel.navigation.sources > .content > .warning-banner + .warning-banner {
    display: none;
}

.sidebar > .panel.navigation.sources > .content > :matches(.pause-reason-container, .call-stack-container, .breakpoints-container, .local-overrides-container) {
    border-bottom: 1px solid var(--border-color);
}

.sidebar > .panel.navigation.sources > .content > .local-overrides {
    border-width: 1px !important;
}

.sidebar > .panel.navigation.sources > .content .details-section {
    font-size: 11px;
    --details-section-border-bottom: none;
}

.sidebar > .panel.navigation.sources > .content .details-section.collapsed > .header > .options,
.sidebar > .panel.navigation.sources > .content .details-section:not(.collapsed) > .content,
.sidebar > .panel.navigation.sources > .content .details-section:not(.collapsed) > .content > .group {
    display: block;
}

.sidebar > .panel.navigation.sources > .content > .breakpoints-container .create-breakpoint {
    width: 15px;
}

.sidebar > .panel.navigation.sources > .content > .navigation-bar {
    position: sticky;
    top: 0;
    z-index: var(--z-index-header);
    margin-bottom: 1px;
    background-color: var(--panel-background-color);
}

.sidebar > .panel.navigation.sources > .content > .resources-container {
    position: relative;
}

.sidebar > .panel.navigation.sources > .content .tree-outline.single-thread {
    -webkit-margin-start: -10px;
}

.sidebar > .panel.navigation.sources > .content .tree-outline.single-thread > .item.thread {
    display: none;
}

.sidebar > .panel.navigation.sources > .filter-bar .sources-resource-type-scope-bar.default-item-selected:not(:hover) {
    --scope-bar-text-color-override: var(--text-color);
    --scope-bar-background-color-override: transparent;
    --scope-bar-border-color-override: transparent;
}

.sidebar > .panel.navigation.sources > .filter-bar .sources-resource-type-scope-bar.default-item-selected:hover {
    --scope-bar-background-opacity-override: 0.5;
}

@media (min-height: 650px) {
    .sidebar > .panel.navigation.sources > .content {
        display: flex;
        flex-direction: column;
        overflow-y: hidden;
    }

    .sidebar > .panel.navigation.sources > .content .details-section {
        --details-section-header-top: 0;
    }

    .sidebar > .panel.navigation.sources > .content > :matches(.call-stack-container, .breakpoints-container, .resources-container, .local-overrides-container) {
        height: 100%;
        overflow-y: auto;
    }

    .sidebar > .panel.navigation.sources > .content > .call-stack-container {
        flex-grow: 3;
        flex-shrink: 2;
        max-height: fit-content;
    }

    .sidebar > .panel.navigation.sources > .content > .breakpoints-container {
        flex-grow: 2;
        flex-shrink: 3;
        max-height: fit-content;
    }

    .sidebar > .panel.navigation.sources > .content > .local-overrides-container {
        flex-grow: 1;
        flex-shrink: 3;
        max-height: fit-content;
    }

    .sidebar > .panel.navigation.sources > .content > .resources-container {
        flex-grow: 1;
        flex-shrink: 3;
    }
}

.sidebar > .panel.navigation.sources > .content > .breakpoints-container .tree-outline .item.event-target-window .icon {
    content: url(../Images/TypeIcons.svg#TypeObject-light);
}

@media (prefers-color-scheme: dark) {
    .sidebar > .panel.navigation.sources > .content > .breakpoints-container .tree-outline .item.event-target-window .icon {
        content: url(../Images/TypeIcons.svg#TypeObject-dark);
    }    
}