.md-dialog-container {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: $z-index-dialog;

  &.md-active {
    transition: $swift-ease-out;
    transform: translate3d(0,0,0) scale(1.0);
    opacity: 1;
  }
  &.ng-leave.ng-leave-active {
    transition: $swift-ease-in;
    transform: translate3d(0,100%,0) scale(0.5);
    opacity: 0;
  }

}

md-dialog {

  min-width: 240px;
  max-width: 80%;
  max-height: 80%;
  margin: auto;
  position: relative;


  box-shadow: $whiteframe-shadow-z5;

  display: flex;
  flex-direction: column;

  md-content {
    order: 1;
    padding: 24px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;

    *:first-child {
      margin-top: 0px;
    }
  }

  .md-actions {
    display: flex;
    order: 2;
    box-sizing: border-box;
    align-items: center;
    justify-content: flex-end;
    padding: 16px 16px;
    min-height: $baseline-grid * 5;

    > * {
      margin-left: 8px;
    }
  }
  &.md-content-overflow .md-actions {
    border-top: 1px solid;
  }

}
