/**
 * Copyright (c) Enalean, 2012-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/>.
 */

/* stylelint-disable selector-id-pattern, selector-no-qualifying-type, selector-class-pattern */

body.git-administration .main .content {
    padding: 0;
}

.git-administration-content {
    padding: 0 12px;
}

.git-fork-creation-content {
    padding: 12px 12px 0;
}

.help {
    width: auto;
    margin: 0.5em;
    padding: 0.5em;
    padding-left: 40px;
    border: 1px solid #dddddd;
    background: url("./help.png") no-repeat;
    background-position: 5px center;
}

.repository {
    width: auto;
}

textarea.text {
    width: 400px;
    height: 50px;
}

.plugin_git_mail_prefix {
    width: 15em;
}

.plugin_git_permissions_select {
    width: 256px;
    margin-right: 20px;
}

#git_repositories_list {
    width: auto;
    min-width: 960px;
}

tr.boxitemalt > td {
    font-weight: bold;
}

#fork_repositories {
    border-collapse: collapse;
}

#fork_repositories td {
    padding-right: 1em;
    padding-left: 1em;
    border-right: 1px solid #cccccc;
    border-left: 1px solid #cccccc;
}

#fork_repositories td.first {
    padding-left: 0;
    border-left: 0;
}

#fork_repositories td.last {
    padding-right: 0;
    border-right: 0;
}

.git_repomanagement label {
    display: block;
    margin-bottom: 5px;
}

.git_repomanagement_gerrit_more_description {
    display: inline-block;
    min-height: 20px;
    margin-bottom: 1em;
    padding: 15px;
    border: 1px solid #e3e3e3;
    border-radius: var(--tlp-medium-radius);
    background-color: #f5f5f5;
    box-shadow: inset 0 1px 1px rgb(0 0 0 / 5%);
}

.gerrit_url.alert.alert-info {
    display: inline-block;
    margin-bottom: 1em;
}

.gerrit_url.alert.alert-info a {
    font-weight: bold;
    white-space: nowrap;
}

.wait_creation.alert.alert-info {
    display: inline-block;
    margin-bottom: 1em;
}

legend.gerrit_disconnect {
    font-weight: bold;
}

fieldset.gerrit_disconnect {
    width: 680px;
    border-color: #d3d3d3;
}

.git_admin_config_template_action {
    width: 80px;
}

#editor_textarea {
    width: 100%;
    height: 450px;
    padding-right: 0;
    padding-left: 0;
    border-right: 0;
    border-left: 0;
    resize: none;
}

#description_commit {
    resize: none;
}

#cancel {
    margin-right: 5px;
}

#commit_form {
    padding-left: 5px;
}

.reserved-hostname-help {
    font-size: 0.8em;
}

/* stylelint-enable */

.git-admin-tabs {
    margin: 10px 0;
}

.git-admin-tab-content {
    overflow: inherit;

    h3 {
        margin: 0 0 10px;
    }

    h4 {
        margin: 30px 0 10px;
        font-size: 1.1em;
    }
}

.git-admin-mass-update-table {
    max-width: 800px;
    margin-bottom: 100px;

    > thead > tr > th:first-child,
    > tbody > tr > td:first-child {
        width: 20px;
        text-align: center;
    }
}

.update-n-repositories > span {
    font-weight: bold;
}

.form-tree {
    margin: 30px 0 0;
}

h1,
h2,
h3 {
    .fa-question-circle {
        color: #aaaaaa;
        font-size: 0.8em;

        &:hover {
            color: #888888;
            text-decoration: none;
        }
    }
}

#admin-general-settings {
    /* stylelint-disable-next-line selector-no-qualifying-type */
    ul > li > a.disabled-link {
        color: #aaaaaa;
        cursor: default;
        pointer-events: none;
    }
}

#git-notification-mail-list {
    max-width: 960px;
    margin-bottom: 15px;
}

.git-notification-mail-list-people {
    width: 100%;
}

#admin-git-default-access-rights {
    > table {
        margin-bottom: 10px;
    }
}

/* stylelint-disable-next-line selector-class-pattern */
.git_webhook {
    > .hooks-desc {
        max-width: 920px;
        margin: 10px 0 20px;
    }

    .create-webhook-btn {
        margin: 0 0 10px;
    }

    > .only-one-webhook {
        display: inline-block;
        margin-right: 4px;
        cursor: not-allowed;

        > .btn[disabled] {
            pointer-events: none;
        }
    }

    > .popover {
        h3 {
            border: 0;
            background: #da5353;
            color: #ffffff;
        }

        form {
            margin: 0;

            .remove-webhook-confirm-actions {
                text-align: right;
            }
        }

        p {
            font-size: 13px;
        }
    }
}

#modal-add-jenkins-server,
#modal-create-jenkins,
#modal-create-webhook {
    .fa-asterisk {
        position: absolute;
        margin: 0 0 0 3px;
        color: #da5353;
        font-size: 10px;
        vertical-align: text-top;
    }
}

/* stylelint-disable selector-no-qualifying-type */
.hooks-list {
    max-width: 960px;

    > thead > tr > th,
    > tbody > tr > td {
        vertical-align: middle;
        white-space: nowrap;

        &:first-child {
            width: 100%;
            max-width: 430px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        &.last-push {
            max-width: 200px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        &.action-buttons {
            > a {
                margin: 0 5px;

                &:hover,
                &:focus {
                    opacity: 0.8;
                    text-decoration: none;
                }
            }
        }
    }
}

.hooks-jobs-list {
    > tr:first-child > td {
        white-space: nowrap;
    }

    > tr > td:last-child {
        width: 100%;
        max-width: 383px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .hooks-jobs-triggered-jobs-list,
    .hooks-jobs-branch-source-status {
        > h4 {
            margin: 0;
            font-size: 12px;
        }
    }

    .jenkins-server-branch-source-status {
        margin: 10px 0 0;
    }
}

.hook-logs-modal {
    width: 1000px;
    margin: 0;
    transform: translateX(-50%);

    > .modal-header {
        > .close {
            margin-left: 10px;
        }

        > h3 {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
    }
}

/* stylelint-disable selector-max-compound-selectors */
table.hook-logs > tbody > tr {
    > td.hook-log-repository {
        vertical-align: top;
    }

    > td.hook-log-date {
        width: 10px;
        vertical-align: top;
        white-space: nowrap;
    }

    > td > .hook-log-triggered-jobs > h4,
    > td > .hook-log-branch-source-status > h4 {
        margin: 0;
        font-size: 12px;
    }

    > td > .hook-log-branch-source-status {
        margin: 10px 0 0;
    }
}
/* stylelint-enable */

.create-hook-url {
    width: calc(100% - 20px);
}

.remove-hook-popover {
    display: none;
}

.git-per-tags-branches-permissions {
    .alert {
        display: inline-block;
        margin: 20px 0;
    }

    /* stylelint-disable-next-line selector-class-pattern */
    .regexp_incoherence_label {
        padding: 0 0 0 55px;
    }

    h4 {
        color: #888888;
        font-size: 14px;
        letter-spacing: 0.5px;
        text-transform: uppercase;
    }

    .permission-pattern {
        width: 50%;
    }

    .permission-delete {
        min-width: 80px;
    }

    > .popover {
        .popover-title {
            border: 0;
            background: #da5353;
            color: #ffffff;
        }

        form {
            margin: 0;

            .remove-fine-grained-permission-confirm-actions {
                text-align: right;
            }
        }

        p {
            font-size: 13px;
        }
    }
}

.git-permission-table {
    min-width: 800px;
    max-width: 1200px;

    .git-permission-table-selector {
        width: 250px;
    }

    select,
    input {
        width: 100%;
        margin: 0;
    }

    input {
        box-sizing: border-box;
        height: 30px;
    }
}

.git-default-permission-table {
    width: auto;
}

.add-fine-grained-permission {
    margin: 0 0 40px;
}

#add-fine-grained-permission-template {
    display: none;
}

.remove-fine-grained-permission {
    white-space: nowrap;
}

.remove-fine-grained-permission-popover {
    display: none;
}

/* stylelint-disable-next-line selector-class-pattern */
.regexp_permission_activated_hidden {
    display: none;
}

.use-regexp-label-arrow {
    margin: 0 0 0 20px;
}

.use-regexp-label {
    display: inline-block !important;
}

/* stylelint-disable-next-line selector-class-pattern */
.regexp_permission_label {
    margin: 0;
}

.fine-grained-permissions {
    margin: 0 0 60px;
}

.modal-regexp-delete {
    display: none;
}

.modal {
    .remove-regexp-permission-popover {
        .popover-title {
            border: 0;
            background: #da5353;
            color: #ffffff;
        }
    }
}

.avatar.git-notification-mail-list-user-avatar {
    display: inline-block;
    position: relative;
    top: -2px;
    width: 22px;
    height: 22px;
    margin: 0 2px 0 0;
    vertical-align: middle;
}

.git-notification-mail-list-group-icon {
    margin: 0 5px 0 4px;
    color: #666666;
}

.git-notification-mail-list-submit {
    margin: 15px 0 0;
}
