/**
 * Copyright (c) Enalean, 2020-Present. All Rights Reserved.
 *
 * This file is a part of Tuleap.
 *
 * Tuleap is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * Tuleap is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Tuleap. If not, see <http://www.gnu.org/licenses/>.
 */

@use "pkg:@tuleap/project-background";
@use "pkg:@tuleap/flamingparrot-theme/css/utils/variables-common";

.project-with-background {
    // stylelint-disable selector-id-pattern, selector-class-pattern
    #tracker_report_config_options,
    .tracker_artifact_title,
    .tracker-hierarchy:not(.tracker-hierarchy-admin) .direct-link-to-artifact,
    .tracker-hierarchy:not(.tracker-hierarchy-admin) {
        @include project-background.title-header-typography;

        .dropdown-menu {
            text-shadow: none;
        }
    }
    // stylelint-enable

    // stylelint-disable-next-line selector-class-pattern
    :not(.browse_instructions) + .tracker-report-query {
        border-top: 0;
    }

    .tracker-hierarchy:not(.tracker-hierarchy-admin) > li .tree-last {
        filter: brightness(1.7);
    }
}

// stylelint-disable-next-line selector-no-qualifying-type,selector-class-pattern
body.in_tracker_report .project-with-background .content {
    padding-top: 0;
}

body {
    $elements-with-project-background: "#tracker_report_config_options", ".tracker_artifact_title",
        ".tracker-hierarchy:not(.tracker-hierarchy-admin)";

    @each $element-with-project-background in $elements-with-project-background {
        @include project-background.apply-background(
            $element-with-project-background,
            variables-common.$sidebar-width,
            variables-common.$sidebar-width-collapsed
        );
    }
}
