.overlay {
  bottom: 0;
  left: 0;
  opacity: 0;
  overflow-y: auto;
  position: fixed;
  right: 0;
  text-align: center;
  top: 0;
  transition-property: (opacity);
  transition-duration: ($ease);
  visibility: hidden;
  z-index: 1000;
  &.active {
    background: rgba(0, 0, 0, 0.8);
    opacity: 1;
    visibility: visible;
    .modal {
      display: block;
      width: 90%;
    }
  }
}

.modal {
  background: #FFF;
  border-radius: $radius;
  display: none;
  margin: 4*$space auto;
  max-width: $modal;
  text-align: left;
  width: 50%;
  z-index: 3000;
  animation: (slide 0.2s ease);
  transition-property: (width);
  transition-duration: ($ease);
  @keyframes slide {
    0% {
      margin-top: 0;
    }
    100% {
      margin-top: $space*4;
    }
  }
  > .header {
    border-bottom: 1px solid $line;
    border-radius: $radius $radius 0 0;
    padding: 1.5*$space/2;
    h2 {
      font-size: inherit;
      line-height: inherit;
      margin: 0;
    }
    .close {
      float: right;
    }
  }
  .body {
    padding: 1.5*$space/2;
    > *:last-child {
      margin-bottom: 0;
    }
    .field {
      input {
        width: 100%;
      }
    }
  }
  .actions {
    .button {
      margin-left: $space/2;
    }
  }
}
