.modal {
  display: flex;
  opacity: 0;
  transition: all .15s linear;
  visibility: hidden;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10001;

  .modal-content {
    background-color: #fff;
    border-radius: 6px;
    width: 100%;
    max-height: 100vh;
    transform: translateY(-80px);
    transition: transform .3s ease-out;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    @include media(sm) {
      width: 600px;
      max-height: calc(100vh - 60px);
    }

    .modal-header {
      border-top-left-radius: 6px;
      border-top-right-radius: 6px;
    }

    .modal-close {
      position: absolute;
      right: 0;
      top: 0;
      padding: 1rem;
      font-size: 1.5rem;
      font-weight: 700;
      line-height: 1;
      color: #000;
      text-shadow: 0 1px 0 #fff;
      cursor: pointer;
    }

    .modal-body {
      padding: 1rem;
      overflow: auto;
    }

    .modal-footer {
      border-bottom-left-radius: 6px;
      border-bottom-right-radius: 6px;
    }

    .modal-header, .modal-footer {
      border-bottom: 1px solid #dbdbdb;
      padding: 1rem;
      background-color: #f5f5f5;
      position: relative;
    }
  }
}

.modal-active {
  opacity: 1;
  visibility: visible;

  .modal-content {
    transform: translateY(0);
  }
}