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

.tree-outline > .item.thread .icon {
    content: url(../Images/Thread.svg);
    width: 15px;
    height: 15px;
}

.tree-outline > .item.thread .status-button.resume {
    width: 11px;
    height: 11px;
    vertical-align: middle;
    fill: hsla(0, 0%, 0%, 0.5);
    stroke: none;
    display: none;
}

.tree-outline > .item.thread .status-button.resume:active {
    fill: hsla(0, 0%, 0%, 0.7);
}

.tree-outline:matches(:focus, .force-focus) > .item.thread.selected .status-button.resume {
    fill: var(--selected-foreground-color);
}

.tree-outline > .item.thread.selected .status-button.resume,
.tree-outline > .item.thread:hover .status-button.resume {
    display: inline-block;
}

.tree-outline > .item.thread + ol > .item.truncated-call-frames {
    color: var(--text-color-gray-medium);
    border-top: dashed 0.5px var(--border-color);
    cursor: default;

    --truncated-call-frames-margin-start: 31px;
    --truncated-call-frames-margin-end: 6px;
    --truncated-call-frames-padding-start: 0;
}

body[dir=ltr] .tree-outline > .item.thread + ol > .item.truncated-call-frames {
    margin-right: var(--truncated-call-frames-margin-end);
    margin-left: var(--truncated-call-frames-margin-start);
    padding-left: var(--truncated-call-frames-padding-start);
}

body[dir=rtl] .tree-outline > .item.thread + ol > .item.truncated-call-frames {
    margin-right: var(--truncated-call-frames-margin-start);
    margin-left: var(--truncated-call-frames-margin-end);
    padding-right: var(--truncated-call-frames-padding-start);
}

.tree-outline > .item.thread + ol > .item.truncated-call-frames .icon {
    content: url(../Images/Function.svg);
    opacity: 0.6;

    --truncated-call-frames-icon-margin-start: 0;
}

body[dir=ltr] .tree-outline > .item.thread + ol > .item.truncated-call-frames .icon {
    margin-left: var(--truncated-call-frames-icon-margin-start);
}

body[dir=rtl] .tree-outline > .item.thread + ol > .item.truncated-call-frames .icon {
    margin-right: var(--truncated-call-frames-icon-margin-start);
}
