@import './config';
@import "../../mixins";

.Modal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: $modal-zindex;
  outline: 0;
  background-color: rgba($modal-background-color, $modal-background-opacity);
  overflow-x: hidden;
  overflow-y: auto;
  display: block;
  height: 100vh;
  width: 100vw;
  padding: $modal-padding 0;
}

.Modal-dialog {
  position: relative;
  width: auto;
  margin: $spacer-lg auto;

  .Modal--medium & {
    max-width: $modal-width-medium;
  }

  .Modal--small & {
    max-width: $modal-width-small;
  }

  .Modal--large & {
    max-width: $modal-width-large;
  }

  @include media-up(small) {
    max-width: $modal-width-small;
    
  }

  animation: bounceIn 500ms cubic-bezier(0, 0.405, 0, 1.285);
}

.Modal-content {
  position: relative;
  padding: $modal-padding;
  border-radius: $modal-border-radius;
  background-color: #fff;
  box-shadow: $modal-box-shadow;
}

.Modal-closeButton {
  position: absolute;
  right: ($modal-padding*0.5);
  top: ($modal-padding*0.5);
  z-index: 1;
  border: none;
  background: none;
  cursor: pointer;

  &:hover {
    opacity: 0.73;
  }
}

@keyframes bounceIn {
  from {
    opacity: 0;
    transform: translate(0, -25%);
  }
  to {
    opacity: 1;
    transform: translate(0, 0);
  }
}
