/**
 * 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 "./gitphp/commit";
@use "./gitphp/tag";
@use "./gitphp/commitdiff";
@use "./gitphp/shortlog";
@use "./gitphp/blob";
@use "./gitphp/tree";
@use "./gitphp/highlight";
@use "../gitphp-override";

.git-repository-header {
    padding: var(--tlp-medium-spacing) var(--tlp-medium-spacing) 0;
}

.git-repository-subheader {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
}

.git-repository-subheader-spacer {
    min-width: var(--tlp-medium-spacing);
}

.git-repository-forked-name {
    margin: 0 0 var(--tlp-small-spacing);
}

.git-repository-parent {
    display: block;
    margin: 0 0 var(--tlp-medium-spacing);
    color: var(--tlp-dimmed-color);
    font-size: 14px;
}

.git-repository-actions {
    display: flex;
    flex: 1 1 auto;
    margin: 5px 0 var(--tlp-medium-spacing);
}

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

.git-repository-clone-popover-separator {
    margin: var(--tlp-small-spacing) calc(-1 * var(--tlp-medium-spacing));
}

.git-repository-gerrit-status:last-child {
    margin: 0 0 var(--tlp-medium-spacing);
}

.git-repository-branch-tag-selector {
    margin: 0 0 var(--tlp-medium-spacing);
}

.git-repository-branch-tag-selector-button-time {
    margin: 0 5px;
    color: var(--tlp-main-color-transparent-30);
    font-size: 12px;

    &::before {
        content: "\f017"; // fa-clock
        margin: 0 3px 0 0;
        font-family: "Font Awesome 6 Free";
        font-weight: 400;
    }
}

.git-repository-branch-tag-selector-tabs {
    flex-wrap: nowrap;
}

.git-repository-branch-tag-selector-refs {
    display: flex;
    flex-direction: column;
    max-height: 40vh;
    overflow-y: auto;
}

.git-repository-branch-tag-selector-empty {
    margin: var(--tlp-medium-spacing);
    color: var(--tlp-main-color-transparent-70);
    font-size: 14px;
    font-style: italic;
    white-space: nowrap;
}

.git-repository-branch-tag-selector-is-loading {
    height: 40px;
    margin: var(--tlp-medium-spacing) 0;
    background: url("@tuleap/burningparrot-theme/images/spinner.gif") no-repeat center center;
}

/* stylelint-disable-next-line selector-class-pattern */
.plugin_git_gitphp {
    border: 1px solid #e3e3e3;
    border-radius: var(--tlp-medium-radius);
    box-shadow: inset 0 1px 1px rgb(0 0 0 / 5%);
}

#readme {
    margin: var(--tlp-medium-spacing) 10px;
    border: 1px solid #e3e3e3;
    border-radius: var(--tlp-medium-radius);
}

@media screen and (max-width: 1250px) {
    .git-repository-actions-settings-label {
        display: none;
    }

    .tlp-button-primary > .git-repository-actions-settings-icon {
        margin: 0;
    }
}

.git-navigation-tab-error-bubble {
    margin: 0 0 0 var(--tlp-small-spacing);
    color: var(--tlp-danger-color);
}
