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

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

.sidebar > .panel.navigation > .overflow-shadow {
    position: absolute;
    bottom: calc(var(--console-prompt-min-height) - 1px);
    left: 0;
    right: 0;
    height: 1px;

    pointer-events: none;

    opacity: 0;

    border-bottom: 1px solid var(--border-color);
}

.sidebar > .panel.navigation > .content .empty-content-placeholder {
    left: 0;
    right: 0;
    padding-top: 15px;
    padding-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.sidebar > .panel.navigation > .content > .empty-content-placeholder {
    position: absolute;
    top: 0;
    bottom: 0;
    padding: 0;
}

.sidebar > .panel.navigation > .content .empty-content-placeholder > .message {
    display: inline-block;
    white-space: nowrap;

    font-size: var(--sidebar-no-results-message-font-size);
    color: var(--text-color-gray-medium);

    padding: 5px 15px 6px;
}
