/**
 * Copyright (c) Enalean, 2016-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 "global-variables";
@use "sidebar/sidebar";
@use "header";
@use "toolbar";
@use "navbar";
@use "logo-url";
@use "logo";
@use "footer";

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 0;
    background: var(--tlp-background-color);
    font-family: var(--tlp-font-family);
}

#main-container {
    display: flex;
    flex: 1 1 auto;
}

main {
    &[role="main"] {
        width: 100%;
    }

    // stylelint-disable-next-line selector-no-qualifying-type
    &.fluid-main {
        display: table;
    }
}

.main-project-tabs > .tlp-tabs {
    margin: 0;
}

#feedback {
    padding: 0 0 var(--tlp-medium-spacing);

    &:empty {
        padding: 0;
    }
}

main[role="main"]:not(.tlp-framed) > #feedback {
    padding: calc(#{global-variables.$top-floating-buttons-space} + var(--tlp-medium-spacing))
        var(--tlp-medium-spacing) 0;

    &:empty {
        padding: 0;
    }
}

main[role="main"]:not(.tlp-framed) > .breadcrumb-container + #feedback:not(:empty) {
    padding: calc(
            #{global-variables.$top-floating-buttons-space} - #{global-variables.$breadcrumb-height} +
                var(--tlp-medium-spacing)
        )
        var(--tlp-medium-spacing) 0;
}

.full-width + #main-container > main[role="main"]:not(.tlp-framed) > #feedback:not(:empty) {
    padding: var(--tlp-medium-spacing) var(--tlp-medium-spacing) 0;
}
