/* ================================
[ Defaults ]
================================ */

/* ---------- [ Display Functionality ] ---------- */

.micromodal-slide {
  display: none;
}

.micromodal-slide.is-open {
  display: block;
  position: relative;
  z-index: 9999;
}

.modal__overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ---------- [ Text ] ---------- */

.modal a {
  text-decoration: underline;
}

.modal a:hover {
  text-decoration: none;
}

/* ---------- [ Inputs & Buttons ] ---------- */

.modal input:not([type="checkbox"]):not([type="radio"]) {
  min-height: 44px;
}

/* ---------- [ Container ] ---------- */

.modal__container {
  background-color: #fff;
  overflow-y: auto;
  padding: 40px;
  max-height: calc(100vh - 120px);
  margin: 0 12px;
  text-align: center;
  max-width: 580px;
}

@media screen and (min-width: 600px) {
  .modal__container {
    padding: calc(580px * .1);
  }
}

/* ---------- [ Header ] ---------- */

.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal__title {
  margin: 0;
}

.modal__header .modal__close {
  background: transparent;
  position: absolute;
  top: 0;
  right: 0;
  width: 48px;
  height: 48px;
  padding: 0;
}

.modal__header .modal__close:before {
  content: '\2715';
  font-weight: 700;
  font-size: 20px;
}

/* ---------- [ Animations ] ---------- */

@keyframes mmfadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes mmfadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes mmslideIn {
  from { transform: translateY(15%); }
  to { transform: translateY(0); }
}

@keyframes mmslideOut {
  from { transform: translateY(0); }
  to { transform: translateY(-10%); }
}

.micromodal-slide[aria-hidden="false"] .modal__overlay {
  animation: mmfadeIn .3s cubic-bezier(0.0, 0.0, 0.2, 1);
}

.micromodal-slide[aria-hidden="false"] .modal__container {
  animation: mmslideIn .3s cubic-bezier(0, 0, .2, 1);
}

.micromodal-slide[aria-hidden="true"] .modal__overlay {
  animation: mmfadeOut .3s cubic-bezier(0.0, 0.0, 0.2, 1);
}

.micromodal-slide[aria-hidden="true"] .modal__container {
  animation: mmslideOut .3s cubic-bezier(0, 0, .2, 1);
}

.micromodal-slide .modal__container,
.micromodal-slide .modal__overlay {
  will-change: transform;
}