.umb-nested-content {
    text-align: center;
    position: relative;
}

.umb-nested-content-property-container {
    position: relative;
    &:not(:last-child){
        margin-bottom: 12px;
    }
}

.umb-nested-content--not-supported {
    opacity: 0.3;
    pointer-events: none;
}

.umb-nested-content-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.umb-nested-content__item {
    position: relative;
    text-align: left;
    background: @white;
}

.umb-nested-content__item.ui-sortable-placeholder {
    background: @gray-10;
    border: 1px solid @gray-9;
    visibility: visible !important;
    height: 55px;
    margin-top: -1px;
}

.umb-nested-content__item--single > .umb-nested-content__content {
    border: 0;
}

.umb-nested-content__item--single > .umb-nested-content__content > .umb-pane {
    margin: 0;
}

.umb-nested-content__header-bar {
    border-bottom: 1px solid @gray-9;
    cursor: pointer;
    background-color: @white;

    -moz-user-select: none;
    -khtml-user-select: none;
    -webkit-user-select: none;
    -o-user-select: none;
    user-select: none;

    &:hover {
        .umb-nested-content__heading .umb-nested-content__item-name {
            padding-right: 60px;
        }
    }

}

.umb-nested-content__heading {
    line-height: 20px;
    position: relative;
    margin-top:1px;
    padding: 15px 5px;
    color:@ui-option-type;
    border-radius: 3px 3px 0 0;
    
    &:hover {
        color:@ui-option-type-hover;
    }

    i {
        position: absolute;
        margin-top: -1px;
    }

    .umb-nested-content__item-name {
        display: block;
        max-height: 20px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding-left: 5px;

        &.--has-icon {
            padding-left: 30px;
        }
    }
    
}

.umb-nested-content__icons {
    opacity: 0;
    transition: opacity 120ms ease-in-out;
    position: absolute;
    right: 0;
    top: 3px;
    padding: 5px;
    background-color: @white;
}

.umb-nested-content__item--active > .umb-nested-content__header-bar {
    .umb-nested-content__heading {
        background-color: @ui-active;
        &:hover {
            color:@ui-option-type;
        }
        .umb-nested-content__item-name {
            padding-right: 60px;
        }
    }
    .umb-nested-content__icons {
        background-color: @ui-active;
        &:before {
            background: linear-gradient(90deg, rgba(255,255,255,0), @ui-active);
        }
    }
}



.umb-nested-content__header-bar:hover .umb-nested-content__icons,
.umb-nested-content__item--active > .umb-nested-content__header-bar .umb-nested-content__icons {
    opacity: 1;
}



.umb-nested-content__icon {
    display: inline-block;
    padding: 4px;
    margin: 2px;
    cursor: pointer;
    color: @ui-option-type;
}

.umb-nested-content__icon:hover {
    color: @ui-option-type-hover;
    text-decoration: none;
}

.umb-nested-content__icon .icon {
    display: block;
    font-size: 16px !important;
}

.umb-nested-content__icon--disabled {
    opacity: 0.3;
}




.umb-nested-content__footer-bar {
    margin-top: 20px;
}

.umb-nested-content__add-content {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed @ui-action-discreet-border;
    color: @ui-action-discreet-type;
    font-weight: bold;
    padding: 5px 15px;
    box-sizing: border-box;
}

.umb-nested-content__add-content:hover {
    color: @ui-action-discreet-type-hover;
    border-color: @ui-action-discreet-border-hover;
    text-decoration: none;
}

.umb-nested-content__add-content.--disabled,
.umb-nested-content__add-content.--disabled:hover {
    color: @gray-7;
    border-color: @gray-7;
    cursor: default;
}


.umb-nested-content__content {
    border-top: 1px solid transparent;
    border-bottom: 1px solid @gray-9;
    border-left: 1px solid @gray-9;
    border-right: 1px solid @gray-9;
    border-radius: 0 0 3px 3px;
}

.umb-nested-content__item--active:not(.umb-nested-content__item--single) .umb-nested-content__content {
    background: @brownGrayExtraLight;
}

.umb-nested-content__content .umb-control-group {
    padding-bottom: 0;
}

.umb-nested-content__item.ui-sortable-helper .umb-nested-content__content {
    display: none !important;
}

.umb-nested-content__doctypepicker table input, 
.umb-nested-content__doctypepicker table select {
    width: 100%;
    padding-right: 0;
}

.umb-nested-content__doctypepicker table td.icon-navigation, 
.umb-nested-content__doctypepicker i.umb-nested-content__help-icon {
    vertical-align: middle;
    color: @gray-7;
}

.umb-nested-content__doctypepicker table td.icon-navigation:hover, 
.umb-nested-content__doctypepicker i.umb-nested-content__help-icon:hover {
    color: @gray-2;
}

.umb-nested-content__doctypepicker i.umb-nested-content__help-icon {
    margin-left: 10px;
}

.form-horizontal .umb-nested-content--narrow .controls-row
{
    margin-left: 40% !important;
}

.form-horizontal .umb-nested-content--narrow .controls-row .umb-textstring,
.form-horizontal .umb-nested-content--narrow .controls-row .umb-textarea
{
    width: 95%;
}

.form-horizontal .umb-nested-content--narrow .controls-row .umb-dropdown {
    width: 99%;
}

// this resolves the layout issue introduced in nested content in 7.12 with the addition of the input for link anchors
// the attribute selector ensures the change only applies to the linkpicker overlay
.form-horizontal .umb-nested-content--narrow [ng-controller*="Umbraco.Overlays.LinkPickerController"] .controls-row {
    margin-left:0!important;
    
    .umb-textarea, .umb-textstring {
        width:100%;
    }
}
