.umb-overlay {
    position: fixed;
    overflow: hidden;
    background: @white;
    z-index: @zindexUmbOverlay;
    animation: fadeIn 0.2s;
    box-shadow: 0 10px 50px rgba(0,0,0,0.1), 0 6px 20px rgba(0,0,0,0.16);
    text-align: left;
}

.umb-overlay__form {
    display: flex;
    flex-wrap: nowrap;
    flex-direction: column;
}

.umb-overlay .umb-overlay-header {
    border-bottom: 1px solid @purple-l3;
    margin-top: 0;
    flex-grow: 0;
    flex-shrink: 0;
    
    padding: 20px 30px 0;
}



.umb-overlay__section-header {
    width: 100%;
    margin-top:30px;
    margin-bottom: 10px;
    
    h5 {
        display: inline;
    }
    
    button {
        display: inline;
        float: right;
        background-color: transparent;
        border:none;
        &:hover {
            color: @ui-option-type-hover;
        }
    }
}

.umb-overlay__title {
    font-size: @fontSizeLarge;
    color: @black;
    font-weight: bold;
    margin: 7px 0;
}

.umb-overlay__subtitle {
    font-size: @fontSizeSmall;
    color: @gray-3;
    margin: 0;
}

.umb-overlay-container {
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: auto;
    position: relative;
    
    padding: 0px 30px;
    margin-bottom: 10px;
    max-height: calc(100vh - 170px);
    overflow-y: auto;
}

.umb-overlay-drawer {
    flex-grow: 0;
    flex-shrink: 0;
    flex-basis: 31px;
    padding: 10px 20px;
    margin: 0;

    background: @gray-10;
    border-top: 1px solid @purple-l3;
}

.umb-overlay-drawer.-auto-height {
    flex-basis: auto;
}

.umb-overlay-drawer .umb-overlay-drawer__align-right {
    display: flex;
    justify-content: flex-end;
}

.umb-overlay-drawer .umb-overlay-drawer-content .dropdown-menu {
    right: 0;
    left: auto;
}

/* ---------- OVERLAY CENTER ---------- */
.umb-overlay.umb-overlay-center {
    position: absolute;
    width: 600px;
    height: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, 0);
    transform: translate(-50%, -50%);
    border-radius: @baseBorderRadius;
}

.umb-overlay.umb-overlay-center .umb-overlay-header {
    border: none;
    background: transparent;
    padding: 30px 30px 0;
}

.umb-overlay.umb-overlay-center .umb-overlay__form {
    
}

.umb-overlay.umb-overlay-center .umb-overlay-drawer {
    border: none;
    background: transparent;
    padding: 0 30px 20px;
}

/* ---------- OVERLAY TARGET ---------- */
.umb-overlay.umb-overlay-target {
    width: 400px;
    max-height: 100vh;
    box-sizing: border-box;
    border-radius: @baseBorderRadius;
    /* default:
    &.umb-overlay--small {
        width: 400px;
    }
    */
    &.umb-overlay--medium {
        width: 480px;
    }
}

.umb-overlay.umb-overlay-target .umb-overlay-header {
    border: none;
    background: transparent;
}

.umb-overlay.umb-overlay-target .umb-overlay-drawer {
    border: none;
    background: transparent;
    padding: 0 30px 20px;
}

/* ---------- OVERLAY RIGHT ---------- */
.umb-overlay.umb-overlay-right {
    width: 500px;
    top: @appHeaderHeight;
    right: 0;
    bottom: 0;
    border: none;
    box-shadow: 0 0 20px rgba(0,0,0,0.19), 0 0 6px rgba(0,0,0,0.23);
}

.umb-overlay.umb-overlay-right .umb-overlay-header {
    flex-basis: 100px;
    box-sizing: border-box;
}

// reset the top position to 0 because we are in a asbolute container and want to 
// overlay to go all the way to the top
.umb-editors .umb-overlay.umb-overlay-right {
    top: 0;
}

/* ---------- OVERLAY LEFT ---------- */
.umb-overlay.umb-overlay-left {
    width: 500px;
    top: @appHeaderHeight;
    left: 0;
    bottom: 0;
    border: none;
    box-shadow: 0 0 20px rgba(0,0,0,0.19), 0 0 6px rgba(0,0,0,0.23);
    margin-left: 81px;
}

// push left overlay when drawer is open
.umb-drawer-is-visible .umb-overlay.umb-overlay-left {
    left: @drawerWidth;
}

.umb-overlay.umb-overlay-left .umb-overlay-header {
    flex-basis: 100px;
    padding: 30px 30px 0;
    box-sizing: border-box;
}

@media (max-width: 767px) {
    .umb-overlay.umb-overlay-left {
        margin-left: 61px;
    }
}

@media (max-width: 500px) {
    .umb-overlay.umb-overlay-left {
        margin-left: 41px;
        width: calc(100% - 41px);
    }
}

/* ---------- OVERLAY ITEM DETAILS ---------- */
.umb-overlay__item-details {
    position: absolute;
    left: 0;
    bottom: 51px;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    background: @gray-10;
    border-bottom: 1px solid @purple-l3;
    pointer-events: none;
}

.umb-overlay__item-details-title-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.umb-overlay__item-details-icon {
    font-size: 16px;
    margin-right: 10px;
    vertical-align: middle;
    color: @gray-6;
}

.umb-overlay__item-details-title {
    margin-top: 0;
    margin-bottom: 0;
}

.umb-overlay__item-details-description {
    margin-top: 10px;
    font-size: 12px;
}

/*ensures dialogs doesnt have side-by-side labels*/
.umb-overlay .control-label,
.umb-overlay .form-horizontal .control-label,
.form-horizontal .umb-overlay .control-label
 {
    width: 100%;
    display: block;
    box-sizing: border-box;
    margin-bottom: 10px;
    float: none;
}


.umb-overlay .controls-row,
.umb-overlay .form-horizontal .controls,
.form-horizontal .umb-overlay .controls {
    margin-left: 0 !important;
}

.umb-overlay .text-error {
    color: @formErrorText;
}

.umb-overlay .text-success {
    color: @formSuccessText;
}
