/*
  SU Modal CSS
  Author: Augustine Nwabuwe
*/

:root {
  --su-modal-backdrop: rgba(0, 0, 0, 0.5);
  --su-modal-radius: 18px;
  --su-modal-animation-in: 400ms;
  --su-modal-animation-out: 250ms;
}

.su-modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--su-modal-backdrop);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: auto;
  transition: opacity var(--su-modal-animation-in) ease;
  z-index: 1050;
}

.su-modal-backdrop.su-active {
  opacity: 1;
}

.su-modal {
  /* border-radius: var(--su-modal-radius); */
  width: 70vw;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.92) translateY(20px);
  opacity: 0;
  transition:
    transform 450ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 300ms ease;
}

/* Image modal has no background */
.su-modal.su-modal-image {
  background: transparent;
  padding: 0;
}

/* HTML modal keeps white background */
.su-modal.su-modal-html {
  background: #fff;
}


.su-modal.su-active {
  transform: scale(1) translateY(0);
  opacity: 1;
}


.su-modal img {
  display: block;
  width: 100%;
  height: auto;
}

.su-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  z-index: 2;
}

.su-modal-close:hover {
  background: rgba(0, 0, 0, 0.75);
}
