@import "webstatic:/static/global.less";

#branch-permissions-dialog {

    @max-branch-name-width: 350px;

    .branch-permissions-dialog-form {

        #branch-ref-input-field {
            padding-top: @baseSpacing;

            .description .learn-more-link {
                font-size: @font-size-small;
                padding: 0 0 0 @baseSpacing;
                //Ensure the link is the same height as the rest of the text
                //to avoid "jumping" when the inputs are switched
                height: 19px;
            }
        }

        .branch-selection-row {
            .searchable-selector-trigger,
            .branch-selection-dropdown-trigger {
                width: 100%;
                text-align: left;
            }

            .aui-select2-container,
            #branch-pattern-field {
                max-width: @max-button-width;
            }

            .branch-name {
                word-wrap: break-word;
                max-width: @max-branch-name-width;
                margin-top: @halfSpacing;

                .aui-icon {
                    color: @aui-iconfont-color;
                    margin-right: @halfSpacing;
                }

            }
        }
    }

    .spinner {
        .square(@auiIconSmall);
        vertical-align: middle;
        margin-right: @baseSpacing;
        display: inline-block;
    }

    .error-message-edit-link {
        cursor: pointer;
    }

    .access-grants {
        margin-left: @doubleSpacing;
    }
}

.branch-model-selector {
    .select2-default {
        //This is being overridden in AUI, but would make the dialog inconsistent with the placeholder in the branch selector
        color: @adg-color-black!important;
    }
}

@select2-result-width: @max-button-width;
@select2-picker-label-width: 208px;
@select-secondary-label-width: 0.4;
@select2-result-padding-right: 10px;
@select2-picker-padding-right: 26px;

.branch-model-selector-row {
    white-space: normal;

    .branch-type-indicator {
        float: right;
        width: (@select2-picker-label-width - (@select2-picker-padding-right - @select2-result-padding-right)) * @select-secondary-label-width;
        color: @secondaryTextColor;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: inline-block;

        .aui-icon {
            color: @aui-iconfont-color;
        }
    }
}

.select2-results {
    .branch-model-selector-row .branch-type-indicator {
        width: @select2-result-width * @select-secondary-label-width;
    }
}

.select2-highlighted {
    .branch-type-indicator {
        color: @invertedBodyTextColor;

        .aui-icon {
            color: @invertedBodyTextColor;
        }
    }
}

#branch-permission-delete-confirm-dialog {
    .aui-dialog2-content {
        word-wrap: break-word;
    }
}