/**
 * Copyright (c) Enalean, 2023 - 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/burningparrot-theme/css/includes/global-variables";

.project-with-background {
    > .kanban-homepage {
        margin: 0;

        > .kanban-homepage-title {
            @include project-background.title-header-typography;

            margin: 0 0 var(--tlp-medium-spacing);
            padding: var(--tlp-medium-spacing) var(--tlp-medium-spacing) var(--tlp-title-spacing);
        }

        > .kanban-homepage-kanban-container {
            margin: var(--tlp-medium-spacing);
        }
    }
}

body {
    @include project-background.apply-background(
        ".kanban-homepage-title",
        global-variables.$sidebar-expanded-width,
        global-variables.$sidebar-collapsed-width
    );
}

.kanban-homepage {
    margin: var(--tlp-medium-spacing);
}

.kanban-homepage-title-action {
    margin: 0 0 0 var(--tlp-medium-spacing);
}

.kanban-homepage-kanban-container {
    display: grid;
    gap: var(--tlp-medium-spacing);
    grid-template-columns: 1fr 1fr;

    @media screen and (max-width: 800px) {
        grid-template-columns: 1fr;
    }

    @media screen and (min-width: 1400px) {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.kanban-homepage-kanban {
    margin: 0;

    &:hover {
        border-color: var(--border-color);
    }

    > .kanban-homepage-kanban-title-container > .kanban-homepage-kanban-title {
        color: var(--text-color);
    }
}

.kanban-homepage-kanban-title-container {
    display: flex;
    align-items: center;
}

.kanban-homepage-kanban-title {
    flex: 0 0 auto;
    margin: 0 var(--tlp-small-spacing) 0 0;
    font-size: 1.125rem;
    font-weight: 500;
}

.kanban-homepage-kanban-badge {
    flex: 0 0 auto;
}

.kanban-homepage-kanban-spacer {
    flex: 1 1 auto;
}
