@keyframes fade-in {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes scale-down {
  0% {
    transform: scale(1.2, 1.2);
    opacity: 0;
  }

  100% {
    transform: scale(1, 1);
    opacity: 1;
  }
}
$dialog-header-height: 50px;

.dialog-layer {
  box-sizing: border-box;
  height: 100%;
  width: 100%;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: $spacing-small;
  z-index: 255;
  animation-name: fade-in;
  animation-duration: 0.2s;

  .dialog {
    position: relative;
    max-height: calc(100% - (#{$spacing-small} * 2));
    width: 400px;
    background-color: white;
    display: flex;
    flex-direction: column;
    animation-name: scale-down;
    animation-duration: 0.3s;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    @include cubic-bezier(0.835, 0.305, 0.190, 1.250);

    .dialog-content {
      overflow: auto;
      flex: 1;
      flex-basis: auto;
      padding: $spacing-small;
      box-sizing: content-box;
      p:only-of-type{
        margin: 0;
      }
    }

    .dialog-footer {
      flex: 0 0 auto;
      padding: $spacing-small;
      .btn{
        margin-bottom: 0;
      }
    }

    .dialog-close-button{
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        color: $gray-base;
        height: 100%;
        width: $dialog-header-height;
        position: absolute;
        right: 0;
        top: 0;
      }

    .dialog-close-button-no-title{
      @extend .dialog-close-button;
      height: 50px;
      background: none;
      color: rgba(0,0,0,0.7);
    }

    .dialog-header {
      flex: 0 0 auto;
      border-bottom: 1px solid $gray-light;
      color: $gray-base;
      padding: $spacing-small;
      position: relative;
    }
  }
}

