/**
 * 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";
@use "grid";

.roadmap-gantt-timeperiod {
    display: flex;
    height: roadmap-variables.$time-unit-height;
    margin: 0;
    cursor: default;
}

@mixin timeperiod-style {
    display: flex;
    align-items: center;
    justify-content: center;
    width: roadmap-variables.$time-unit-width;
    min-width: roadmap-variables.$time-unit-width;
    border-bottom: 0;
    color: var(--tlp-dimmed-color);
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.03rem;
    line-height: 0.75rem;
    text-transform: uppercase;
}

.roadmap-gantt-timeperiod-year {
    @include timeperiod-style;

    background: var(--tlp-fade-background-color);

    &:not(:last-child) {
        border-right: 1px solid var(--tlp-white-color);
    }
}

@for $i from 1 through 53 {
    .roadmap-gantt-timeperiod-year-span-#{$i} {
        width: $i * roadmap-variables.$time-unit-width;
        min-width: $i * roadmap-variables.$time-unit-width;
    }
}

.roadmap-gantt-timeperiod-unit {
    @include grid.alternate-background;
    @include timeperiod-style;

    > .tlp-skeleton-text {
        width: 30%;
    }
}
