/**
 * Dialog - overlay window Extranet2 style
 * This CSS file works well independently and when loaded simultaneously with the uibase dialog.css
 * --------------------------------------------------
 */

/**
 * Overlay animations
 */

.dialog--isOpen body {
    overflow: hidden;
}

.dialog--isOpen.dialog--isConfirmDialog body {
    overflow: auto;
}

/**
 * Image as dialog (Library)
 */

.imageInDialog {
    position: relative;
}

.imageInDialog .enlarge-image {
    display: block;
    position: absolute;
    left: -999em;
}

.has-js .imageInDialog:hover .enlarge-image {
    right: 1px;
}

.imageInDialog img:hover {
    cursor: url(/ui/uibase/cursor/enlarge.cur), zoom-in;
    box-shadow: 0 2px 7px -2px #000;
}

/**
 * Overlay blocker
 */

.dialogblocker {
    background: rgba(0,0,0,.3) none;
}

.dialogblockerwait {
    background: rgba(0,0,0,.35) url(/ui/uibase/img/loader-white.svg) no-repeat 50% / 3.5em;
}

/**
 * Outer container
 */

.pbdialogcontainer {
    overflow: hidden;
    text-align: left;
    border: 1px solid #fff;
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--mi-shdw-5);
}

@keyframes showLoader {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.pbDialog__loader {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 100;
    display: block !important;
    margin-top: -5px;
    margin-left: -21px;
    animation: showLoader .2s 1s forwards;
    opacity: 0;
}

/**
 * top bar
 */

.pbdialogcontainer .top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
    height: 30px;
    padding: .6rem 1rem;
    border-radius: 2px 2px 0 0;
}

.pbdialogcontainer--draggingEnabled .top {
    cursor: move;
}

.pbdialogcontainer--isConfirmDialog .top {
    position: absolute;
    width: 100%;
}

/**
 * Top bar title
 */

.pbdialogcontainer .top .title {
    display: block;
    flex: 1 1 85%;
    overflow: hidden;
    margin-right: 1rem;
    padding: 0 60px 0 0;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 15px;
    line-height: 32px;
    color: #222;
}

.pbdialogcontainer .top span.title img {
    margin-right: 4px;
    vertical-align: text-top;
}

/**
 * Top bar buttons
 */

.pbdialogcontainer .top .buttons {
    display: flex;
    position: absolute;
    top: 0;
    right: 10px;
    height: 48px;
    text-align: right;
}

.pbdialogcontainer .top .buttons a {
    display: block;
    width: 30px;
    height: 30px;
    margin-top: 9px;
    background: no-repeat center / 50%;
    opacity: .5;
}

.pbdialogcontainer .top .buttons a:hover,
.pbdialogcontainer .top span.buttons a:hover {
    opacity: 1;
}

/** Icons for top bar buttons */

.pbdialogcontainer .top .buttons .dialog__OpenInNewTab {
    background-image: url(../img/dialog/new-tab.svg);
    opacity: 0;
}

.pbdialogcontainer .top .buttons .maximize {
    background-image: url(../img/dialog/expand_dialog.svg);
}

.pbdialogcontainer .top .buttons .close {
    background-image: url(../img/dialog/close_dialog.svg);
}

.pbdialogcontainer .top:hover .dialog__OpenInNewTab,
.pbdialogcontainer .maximize,
.pbdialogcontainer .close {
    opacity: .5;
}

/**
 * Middle
 */

.pbdialogcontainer .middle1 {
    padding: 0;
}

.pbdialogcontainer .middle2 {
    margin-top: 1px;
    margin-bottom: -1px;
}

.pbdialogcontainer .middle3 {
    margin-left: 1px;
    margin-right: -1px;
}

.pbdialogcontainer .middle2:before {
    content: '';
    position: absolute;
    top: -10px;
    left: -16px;
    height: 98%;
    width: 100%;
    border: 16px solid transparent; /** Contents cover all of dialogbox. Dialogbox must have border for resize handler */
    border-bottom-width: 20px;
}

.pbdialogcontainer--isConfirmDialog .middle1 {
    position: relative;
    z-index: 10;
}

/**
 * Bottom edge
 */

.pbdialogcontainer .bottom {
    height: 0;
}

.pbdialogcontainer .bottom div {
    position: relative;
    left: -18px;
    display: none;
    width: 18px;
    height: 16px;
}

.pbdialogcontainer .resize-ridge
/*, .pbdialogcontainer .bottom span.resize-ridge*/
{
    position: absolute;
    right: .4rem;
    bottom: .4rem;
    width: .8rem;
    height: .8rem;
    background: url(../img/dialog/resize_dialog.svg) no-repeat center;
    background-size: contain;
    opacity: .3;
    cursor: se-resize;
}

/**
 * Notices
 * Notices allways open in #empty variant...
 */

#empty .notice li {
    padding-right: 9em;
}

#empty .notice span.closebutton {
    height: auto;
    width: auto;
    text-indent: 0;
    font-size: .9em;
    line-height: 1.2em;
    background: none;
}
