/**
 * Copyright (c) Enalean, 2018-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/tlp-dropdown";
@use "./background";
@use "./repository-card";
@use "./gitlab";

.git-repository-list-empty-image {
    stroke: var(--tlp-main-color-transparent-70);
}

.git-repository-list-empty-rect {
    fill: var(--tlp-main-color-transparent-70);
}

.git-repository-create-modal-body {
    height: auto;
}

.git-repository-list-create-repository-button {
    margin: 0 var(--tlp-medium-spacing) 0 0;
}

.git-repository-list {
    display: flex;
    flex-wrap: wrap;
}

.git-repository-list-header {
    display: flex;
    align-items: center;
    padding: var(--tlp-medium-spacing) var(--tlp-medium-spacing) var(--tlp-title-spacing);

    > h1 {
        margin: 0 var(--tlp-medium-spacing) 0 0;
    }
}

.git-repository-list-header-badge {
    position: relative;
    top: 2px;
    cursor: pointer;
}

.git-repository-list-header-popover {
    z-index: 2010;
}

.git-repository-list-loading {
    width: 250px;
    height: 200px;
    margin: 0 auto;
    background: url("@tuleap/burningparrot-theme/images/spinner.gif") no-repeat center center;
}

.git-repository-list-actions {
    display: flex;
    padding: 0 var(--tlp-medium-spacing) 0;

    > :last-child {
        margin-bottom: var(--tlp-medium-spacing);
    }
}

.git-repository-list-actions-spacer,
.git-repository-links-spacer {
    flex: 1;
    min-width: 20px;
}

.git-repository-actions-select-owners {
    display: flex;
    align-items: baseline;

    > .tlp-label {
        margin: 0 5px 0 0;
    }
}

.git-repository-list-actions-display-switch {
    margin: 0 var(--tlp-medium-spacing) 0 0;

    .tlp-button-primary {
        width: 65px;
        text-align: center;
    }

    .fa-long-arrow-alt-down,
    .fa-calendar-alt {
        font-size: 0.8125rem;
    }
}

.git-repository-list-switch-path-label {
    padding: 0 18px;
}

.git-repository-list-folder {
    position: relative;
    margin: 0 0 0 24px;

    &::before {
        content: "";
        position: absolute;
        top: 24px;
        left: 10px;
        width: 1px;
        height: calc(100% - 24px);
        border-left: 1px solid var(--tlp-neutral-dark-color);
    }
}

.git-repository-list-base-folder {
    margin: 0;
}

.git-repository-list-collapsible-folder {
    display: flex;
    align-items: center;
    margin: 0 0 var(--tlp-small-spacing);
    color: var(--tlp-main-color);
    cursor: pointer;

    > .fa-caret-down,
    > .fa-caret-right {
        color: var(--tlp-dimmed-color);
        font-size: 0.8125rem;
    }

    > .git-repository-list-folder-label {
        margin: 0 0 0 5px;
        font-size: 1rem;
        line-height: 1.5rem;

        > .fa-folder {
            margin: 0 2px 0 0;
            font-size: 0.8125rem;
        }
    }
}

.git-repository-in-folder {
    margin: 0 0 var(--tlp-medium-spacing) var(--tlp-large-spacing);
}

.git-action-dropdown {
    display: flex;
    flex-direction: column;
}

.git-add-action-button {
    margin: 0 0 0 var(--tlp-small-spacing);
}
