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

$content-padding: 12px;

/* stylelint-disable selector-no-qualifying-type */
body.viewvc-epel {
    #svn-homepage,
    #svn-administration {
        margin: $content-padding;
    }

    #svn-repository-viewvc {
        margin: 0;
        padding: 0;
        border: 0;
        border-top: 2px solid #e3e3e3;
        border-radius: 0;
        background: none;
    }
}
/* stylelint-enable */

.svn-repository-header {
    padding: 0 0 20px;

    > h2 {
        margin: 0 0 10px;
    }
}

#svn-repository-help {
    margin: 16px 16px 0;

    .svn-intro-command {
        margin: 0;
    }
}

.viewvc-epel-references {
    margin: 0 0 40px;
}

#svn-repository-url-bar {
    padding: 0 16px;

    > .input-append {
        margin: 0;

        > input[type="text"] {
            width: 500px;
        }
    }
}

.project-with-background {
    #svn-administration {
        > .svn-administration-title {
            margin: (-$content-padding) (-$content-padding) 0;
        }

        > .main-project-tabs {
            margin: 0 (-$content-padding);
        }
    }
}

#svn-administration {
    > .project-administration-title {
        margin: (-$content-padding) (-$content-padding) 0;
        padding: 16px 16px 30px;
    }

    .nav-tabs {
        margin: 0;
    }

    > .tab-content {
        max-width: 1200px;
        padding: 0 (16px - $content-padding);

        label:not(.checkbox),
        h4 {
            margin: 0 0 5px;
            color: #666666;
            font-size: 13px;
            font-weight: 600;
        }

        button[type="submit"] {
            margin: 20px 0 0;

            > i {
                margin: 0 3px 0 0;
            }
        }
    }

    /* stylelint-disable selector-max-compound-selectors */
    #notifications {
        button[type="submit"] {
            margin: 0;
            white-space: nowrap;
        }

        table {
            > thead > tr > th {
                white-space: nowrap;
            }

            > tbody > tr > td {
                vertical-align: middle;

                > input,
                .svn-notification-edit-input {
                    box-sizing: border-box;
                    width: 100%;
                    height: 30px;
                    margin: 0;
                }
            }
        }
    }
    /* stylelint-enable */

    #immutable-tags {
        .immutable-tags-configuration {
            margin: 0 0 50px;
        }
    }

    #access-file-container {
        margin: 30px 0 0;

        > #current-access-file-container {
            margin-right: 10px;
        }

        > #current-access-file-container,
        > #old-access-file-container {
            display: inline-block;
            vertical-align: top;

            > h4 {
                position: relative;
                height: 30px;

                > select {
                    position: absolute;
                    top: -4px;
                    margin: 0 0 0 10px;
                }
            }

            pre {
                box-sizing: border-box;
                width: 440px;
                margin: 0;
                border: 1px solid var(--tlp-neutral-normal-color);
                border-bottom: 0;
                border-radius: var(--tlp-medium-radius) var(--tlp-medium-radius) 0 0;
                background: var(--tlp-background-color);

                + pre {
                    width: 440px;
                    height: 435px;
                    overflow: auto;
                    border-bottom: 1px solid var(--tlp-neutral-normal-color);
                    border-radius: 0 0 var(--tlp-medium-radius) var(--tlp-medium-radius);
                }
            }

            > textarea {
                display: block;
                box-sizing: border-box;
                width: 440px;
                height: 435px;
                margin: 0;
                padding: 9.5px;
                border-radius: 0 0 var(--tlp-medium-radius) var(--tlp-medium-radius);
                font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
                font-size: 13px;
                resize: none;
            }

            .empty-version {
                color: #bbbbbb;
                font-style: italic;
                text-align: center;
            }

            > #old-access-file-form {
                visibility: hidden;
            }
        }
    }
}

.svn-notifications-add-hidden,
.svn-notifications-row-add-hidden,
.svn-notifications-checkbox-cell-hidden {
    display: none;
}

.svn-notification-edit {
    margin: 0 10px 0 0;
    white-space: nowrap;
}

.svn-notification-delete-popover,
.svn-notification-cannot-save-popover {
    display: none;
}

#svn-admin-notifications-form > .popover,
#svn-notification-cannot-save-popover-container > .popover {
    .popover-title {
        border: 0;
        color: #ffffff;
    }

    .svn-notification-delete-popover-actions {
        text-align: right;
    }

    p {
        font-size: 13px;
    }
}

#svn-admin-notifications-form > .popover {
    .popover-title {
        background: #da5353;
    }
}

#svn-notification-cannot-save-popover-container > .popover {
    .popover-title {
        background: #f5b940;
    }
}

.svn-notification-form-actions {
    white-space: nowrap;
}

.svn-notifications-form-emails-column {
    width: 100%;
}

.svn-notification-email-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.svn-notification-email-list-entry {
    display: flex;
    align-items: center;
    white-space: nowrap;

    &:last-child > .svn-notification-email-list-separator {
        display: none;
    }
}

.svn-notification-email-list-separator {
    margin: 0 3px 0 0;
}

.svn-notification-email-list-group-icon {
    margin: 0 3px 0 0;
    color: #666666;
}

.avatar.svn-notification-user-avatar {
    display: inline-block;
    top: 7px;
    left: 8px;
    width: 22px;
    height: 22px;
    margin: 0 3px 0 0;
}

.svn-repository-help-hidden {
    display: none;
}
