/* Overrides alertify js headers */
.alertify {
  .ajs-header {
    padding: 6px 10px !important;
    min-height: 35px;
    max-height: 35px;
    border-bottom: 2px solid darkgray;
    background-color: #2C76B4;
    font-weight: bold;
    color: white;
    font-size: 14px;
    font-weight: bold;
    border-radius: 0;
    overflow: hidden;
    white-space: nowrap;
  }

  /* Overrides alertify js headers hovering behaviour*/
  .ajs-header:hover {
    background-color: #2C76B4;
  }

  /* Removes padding from alertify footer */
  .ajs-footer {
    padding: 0;
    min-height: 35px;
  }

  /* Restyling alertify buttons */
  .ajs-footer .ajs-buttons {
    background-color: #D2D2D2;
    border-width: 2px 0px 0px 0px;
    border-style: solid;
    border-color: rgb(85, 85, 85);
  }

  .ajs-footer .ajs-buttons.ajs-auxiliary .ajs-button,
  .ajs-footer .ajs-buttons.ajs-primary .ajs-button {
    margin-left: 2px;
    margin-right: 2px;
    margin-top: 2px;
    margin-bottom: 0px;
  }

  .ajs-footer .ajs-buttons .ajs-button {
    min-width: 40px;
    min-height: 30px;
  }

  .ajs-commands {
    margin: -22px 4px 0 0;
  }

  /* Replaces alertify button icons */
  .ajs-commands button {
    margin-left: 5px;
  }

  /* Prevent text blur in the runtime */
  .ajs-dimmer,
  .ajs-modal {
    -webkit-transform: none;
  }

  .ajs-commands button.ajs-maximize {
    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAZklEQVQ4jcWTuw2AMAxEn5jBs7B/e0gpmAiKEGRS5QDBSS7v+Q8fSsCWQgDTA+DsGgJYuypumTNkWCWZg9q/HIAOSDim/xTUcu0exXXaxQG0teRVWQPLx2Gbe8B55yNqv7C4GV/TDq//J11odoZgAAAAAElFTkSuQmCC);
    background-size: 14px;
  }

  .ajs-commands button.ajs-close {
    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAdklEQVQ4jd2SwQnAIAxF36GH0pOTFHEgF3IkR5LO0F4SCGJVEHroAy/f/E+igV+yAa6hO7nrcgAZuIBg9CBalppXEnDL0RA1q556ASdQqhBrLlLTxVch1uxHZiU2AuKs2Vdt23GGHSy/wfIvzOzBPhpjaRO/5wG/szevJ+ZXzAAAAABJRU5ErkJggg==);
  }

  /* Restyling alertify dialogue panel boundaries */
  .ajs-dialog {
    border: 3px solid #DDDDDD;
    border-radius: 0;
  }
  .ajs-content {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .ajs-handle {
    right: -4px;
    bottom: -4px;
  }
}

.alertify.ajs-maximized .ajs-commands,
.alertify.ajs-resizable .ajs-commands {
  margin: 2px 0px 0 0;
}

.ajs-commands {
  position: absolute;
  width: auto !important;
}

.ajs-pin, .ajs-maximize, .ajs-close {
  width: 20px;
  height: 20px;
  border: 2px solid #9E9E9E !important;
  background-color: #ddd !important;
  font-size: 12px;
  border-radius: 5px 5px 5px 5px;
  position: relative;
  //float: right;
  cursor: pointer;
  text-align: center;
  overflow: hidden;
  z-index: 1;
}

.ajs-pin:hover, .ajs-maximize:hover, .ajs-close:hover {
  border: 2px solid #CCCCCC !important;
}

.alertify.ajs-modeless.ajs-pinnable .ajs-commands button.ajs-pin {
  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAkElEQVQ4jWNkwAR8DAwMBxkYGMTQxF8xMDDYMzAwfMKiBwMYMDAw3GRgYPgPxTehYiSBKCQDonApYiLV1KFjABsDA4MpEt8UKkYUkGBgYDjPgAhAGD4PlSPooqNYNMPwUXRXM+IwBAbaoXQlktg/ZMUsWAxAVvASmyZCBiCDNwTkCRrwasANIOgFQoADinECAAtnIEoWoODLAAAAAElFTkSuQmCC);
  background-size: 13px;
}

.alertify.ajs-maximized .ajs-commands button.ajs-maximize {
  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA8klEQVQ4jZ3QMUpDQRCH8V+ewULQE4iERTyCrQiDCpbaCKKljbV4A89gqVgGrCMDWlpaWwVPoFYiIjYv8hBJXjLN7s7u9+3wZ4aKiOWI2IJOi8dHuM7MXxj3WMHe3CRBKeUGvVJKllJG8CrmoNty6jMsYKeGoY/jtgI4bez7OMjMr2oKwaieRzDMIljDRUSgXQZPeG2cv7GOffQ7ETGPcyw2HozWQWY+jLN3M/MzIu4wwNKf+zeMFVSQmY/YbfzeuiqIiAonZgi1quErHNa9F7xPM8FlAx5iA9ttJRVu8VHDm5k5rDNpLRERWxHR+6c/MZMfLIJDwzY66IkAAAAASUVORK5CYII=);
}

/* Restyling alertify query results messages */
.alertify-notifier.ajs-right {
  min-width: 250px;
  width: auto;
  width: initial;
  max-width: 800px;
}

.alertify-notifier.ajs-right .ajs-message.ajs-visible {
  padding: 0;
  right: 0;
  width: auto;
  width: initial;
}

.alertify-notifier .ajs-message {
  border-radius: 4px;
}

button.pg-alertify-button {
  font-family: 'Open Sans';
  font-size: 14px;
  -webkit-font-smoothing: auto;
}

.fa.pg-alertify-button:before {
  font: normal normal normal 18px/1 FontAwesome;
  margin-right: 5px;
}

.ajs-text-smoothing {
  text-shadow: none;
  -webkit-font-smoothing: antialiased;
}

.ajs-message.ajs-error.ajs-visible {
  @extend .bg-red-1;
  @extend .border-red-2;
  @extend .ajs-text-smoothing;
}

.ajs-message.ajs-success.ajs-visible {
  @extend .bg-green-1;
  @extend .border-green-2;
  @extend .ajs-text-smoothing;
}

.ajs-message.ajs-visible {
  @extend .bg-blue-1;
  @extend .border-blue-2;
  @extend .ajs-text-smoothing;
}

.ajs-message > .media > .media-body.media-middle {
  display: table-row;
}
