/**
 * Copyright (c) Enalean, 2021 - 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 "roadmap-variables";

.roadmap-gantt-ribbon-iterations {
    display: flex;
    position: relative;
    height: roadmap-variables.$iteration-height;

    > .roadmap-gantt-task-background-grid > .roadmap-gantt-task-background-grid-unit {
        border-bottom: 0;
    }
}

.roadmap-gantt-ribbon-iterations-iteration-level-1,
.roadmap-gantt-ribbon-iterations-iteration-level-2 {
    position: absolute;
    z-index: roadmap-variables.$z-index-ribbon-iterations;
    top: 0;
    height: roadmap-variables.$iteration-height;
    padding: 5px;
    overflow: hidden;
    border-radius: var(--tlp-large-radius) var(--tlp-large-radius) 0 0;
    color: var(--tlp-dimmed-color);
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 0.75rem;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;

    > a {
        flex: 1 1 auto;
        overflow: hidden;
        color: var(--tlp-dimmed-color);
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

.roadmap-gantt-ribbon-iterations-iteration-level-1 {
    border: 1px solid var(--tlp-neutral-normal-color);
    border-bottom: 0;
    background: linear-gradient(
        180deg,
        var(--tlp-neutral-normal-color) roadmap-variables.$iteration-height,
        transparent 24px,
        transparent 100%
    );
}

.roadmap-gantt-ribbon-iterations-iteration-level-2 {
    margin-top: 2px;
    border: 1px solid var(--tlp-neutral-normal-color-lighter-40);
    border-bottom: 0;
    background: linear-gradient(
        180deg,
        var(--tlp-neutral-normal-color-lighter-40) roadmap-variables.$iteration-height,
        transparent 24px,
        transparent 100%
    );
}
