/* base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

button {
  border: none;
  background-color: transparent;
  text-decoration: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
}

.modal__overlay {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 100;
}

.modal__container {
  max-width: 500px;
  max-height: 100vh;
  padding: 30px;
  background-color: #fff;
  overflow-y: auto;
}

.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal__close::before {
  content: "\2715";
}

.modal__content {
  margin-top: 2rem;
  margin-bottom: 2rem;
  line-height: 1.5;
}

/* Animation */
@keyframes mmfadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes mmfadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes mmslideIn {
  from {
    transform: translateY(10%);
  }

  to {
    transform: translateY(0);
  }
}

@keyframes mmslideOut {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-10%);
  }
}

.micromodal-slide {
  display: none;
}

.micromodal-slide.is-open {
  display: block;
}

.micromodal-slide[aria-hidden="false"] .modal__overlay {
  animation: mmfadeIn 0.8s cubic-bezier(0.34, 0.07, 0.095, 0.995);
}

.micromodal-slide[aria-hidden="false"] .modal__container {
  animation: mmslideIn 0.8s cubic-bezier(0.34, 0.07, 0.095, 0.995);
}

.micromodal-slide[aria-hidden="true"] .modal__overlay {
  animation: mmfadeOut 0.8s cubic-bezier(0.34, 0.07, 0.095, 0.995);
}

.micromodal-slide[aria-hidden="true"] .modal__container {
  animation: mmslideOut 0.8s cubic-bezier(0.34, 0.07, 0.095, 0.995);
}

.micromodal-slide .modal__container,
.micromodal-slide .modal__overlay {
  will-change: transform;
}
