.modal-bg {
  position: fixed;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  top: 0;
  left: 0;
  z-index: 5;
  opacity: 1;
  perspective: 5000px;
  transition: opacity .4s ease-in-out; }
  .modal-bg.closed {
    opacity: 0;
    pointer-events: none; }

.modal-panel {
  margin-top: 0;
  max-width: 580px;
  width: 100%;
  background-color: #FFFFFF;
  overflow-y: hidden;
  padding: 40px;
  transform: rotateX(0) scale(1);
  transform-origin: 50% 10%;
  transition: margin-top .6s ease-in-out, transform .4s ease .4s; }
  .closed .modal-panel {
    transform: rotateX(30deg) scale(1.2);
    margin-top: -120%; }
  .modal-panel.modal-panel-wide {
    max-width: 90%; }
    .modal-panel.modal-panel-wide .modal-content {
      max-width: 800px;
      margin-left: auto;
      margin-right: auto; }

.modal-header {
  display: flex;
  padding-bottom: 30px; }

.modal-title {
  flex: 2;
  margin: 0; }

.modal-close i {
  color: #59B381;
  font-size: 36px;
  margin-top: -6px;
  margin-right: -6px;
  cursor: pointer; }

.modal-content {
  padding-bottom: 30px;
  overflow-x: hidden;
  overflow-y: auto;
  max-height: 70vh; }
  .modal-content form,
  .modal-content .form {
    width: 100%; }
  .modal-content.no-padding {
    padding-bottom: 0; }

.modal-actions {
  display: flex;
  align-items: center; }

.modal-actions * {
  margin-left: 30px;
  margin-right: 30px; }

.modal-footer {
  text-align: center;
  padding-top: 30px;
  border-top: 2px solid #DEF0E6; }
  .modal-footer.no-divider {
    padding-bottom: 0;
    padding-top: 0;
    border-top: none; }
  .modal-footer.no-padding {
    padding-top: 0; }

.modal-link .link {
  margin-left: 10px; }
