.mb-element-modal-dialog{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: block;
  z-index: 1000;
  > .background{
    background-color: #c0c0c0;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.4;
    -ms-user-select: none;
    user-select: none;
    -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
    filter: alpha(opacity=50);
  }
}

/* jQuery UI Dialog with Bootstrap classes */
.mb-element-popup-dialog {

  > * {
    box-sizing: content-box !important;
  }

  .ui-dialog-titlebar-close {
    display: inline-block;
    font-size: 0;
    text-rendering: auto;
  }

  $borderRadius: 0px;
  z-index: 22;
  position: absolute !important;
  border-radius: $borderRadius;
  border: 1px solid #b3b3b3;
  box-shadow:none;
  background: #E4E4E4 url($contentPatternUrl);
  border-bottom-width: 5px;
  //  @extend .ie-8-borders-hack;

  > .modal-header {
    border-top-left-radius: $borderRadius;
    border-top-right-radius: $borderRadius;
    background-color: $buttonFirstActiveColor;
    padding-top: 7px;
    padding-bottom: 6px;
    user-select: none;
    position: relative;
    border-bottom: none;
    // @extend .ie-8-borders-hack;



    .ui-dialog-title {
      font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
      font-size: 14px;
      color: #fff;
      user-select: none;
      cursor: default;
    }

    .ui-dialog-titlebar-buttonpane{
      button.close {
        margin: 1px;
        .ui-icon-closethick:before {
          font-family: FontAwesome;
          font-size: 23px;
          display: inline-block;
          content: "\f00d";
          font-weight: bold;
          margin-top: -2px;
          margin-bottom: 2px;
        }
        .ui-button-icon-space {
          display: none;
        }
      }
      a{
        @extend .btn;
        @extend .button;
        display: block;
        float: right;
//        padding-left: 5px;
//        padding-right: 5px;
        width: auto;
        white-space: normal;
        color: #000000 !important;
        height: 20px;
        overflow: hidden;
        background-color: transparent !important;
        border-radius: 0;
        opacity: .2;
        text-shadow: rgb(255, 255, 255) 0px 1px 0px;
        padding-left: 4px !important;
        padding-right: 0 !important;

        &:hover, &:focus{
          background-color: transparent;
          opacity: .5;
        }


        span{
          font-size: 0;

          &:after{
            font-family: FontAwesome;
            font-size: 23px;
            display: inline-block;
            content: "\f00d";
            font-weight: bold;
          }

          /** maximize */
          &.ui-icon-extlink:after{
            content: "\f0b2";
            font-size: 18px;
            margin-top: -2px;
          }

          /** collapse **/
          &.ui-icon-triangle-1-s:after{
            content: "\f062";
            font-size: 18px;
            margin-top: -3px;
          }

          /** restore to normal **/
          &.ui-icon-newwin:after{
            content: "\f063";
            font-size: 18px;
            margin-top: -3px;
          }
        }
      }

      > .close  > span.ui-button-text  {
        font-size: 0;
        margin-left: 4px;
        margin-top: -1px;
        margin-right: 5px;
        display: block;

        &:after{
          font-family: FontAwesome;
          font-size: 23px;
          display: inline-block;
          content: "\f00d";
        }
      }
    }
  }

  > .modal-body {
    /** Dialog resizing fix */
//    padding: 0;
    width: auto !important;
    overflow: auto;

    // Tab-Navigator displaying if direct bounded to the window
    > .mapbender-element-tab-navigator {
      > ul.modal-header {
        background-color: #B6D39E;
        > li {
          &:first-child > a{
            border-left: 0 !important;
          }
          &:last-child> a{
            border-right: 0 !important;
          }
          margin-bottom: 0px;
          border: none;
          margin-right: -1px;
          > a {
            border-top: none;
//            border-left: 0px;
          }
        }
      }
      > .tab-content {
        padding: 0px;
        position: relative;
        > form {
          padding: 10px;
        }
      }
    }
  }

  > .modal-footer {
    border-top: 1px solid #c0c0c0;
    background-color: transparent;
    padding: 10px;
    button {
      border-radius: 0;
    }
  }

  .ui-resizable {
    position: relative;
  }
  .ui-resizable-handle {
    position: absolute;
    font-size: 0.1px;
    display: block;
  }
  .ui-resizable-disabled .ui-resizable-handle,
  .ui-resizable-autohide .ui-resizable-handle {
    display: none;
  }
  .ui-resizable-n {
    cursor: n-resize;
    height: 7px;
    width: 100%;
    top: -5px;
    left: 0;
  }
  .ui-resizable-s {
    cursor: s-resize;
    height: 7px;
    width: 100%;
    bottom: -5px;
    left: 0;
  }
  .ui-resizable-e {
    cursor: e-resize;
    width: 7px;
    right: -5px;
    top: 0;
    height: 100%;
  }
  .ui-resizable-w {
    cursor: w-resize;
    width: 7px;
    left: -5px;
    top: 0;
    height: 100%;
  }
  .ui-resizable-se {
    cursor: se-resize;
    width: 12px;
    height: 12px;
    right: 1px;
    bottom: 1px;
  }
  .ui-resizable-sw {
    cursor: sw-resize;
    width: 9px;
    height: 9px;
    left: -5px;
    bottom: -5px;
  }
  .ui-resizable-nw {
    cursor: nw-resize;
    width: 9px;
    height: 9px;
    left: -5px;
    top: -5px;
  }
  .ui-resizable-ne {
    cursor: ne-resize;
    width: 9px;
    height: 9px;
    right: -5px;
    top: -5px;
  }
}