.modal__overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  padding: 80px 30px 80px 30px;
}

.toolbar-fixed .modal__overlay {
  padding-top: 120px;
}

.toolbar-tray-open .modal__overlay {
  padding-top: 160px;
}

.modal__container {
  background-color: #fff;
  padding: 2rem;
  overflow-y: auto;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  max-height: 100vh;
  max-height: calc(100vh - 120px);
}

.modal__header {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.modal__title {
  margin-top: 0;
  margin-bottom: 0;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

.modal__close {
  border: 0;
  background: red;
  color: white;
  position: fixed;
  top: 0;
  right: 0;
  z-index: 20;
}

.modal__close:before {
  content: "\2715";
}

.toolbar-fixed .modal__close {
  top: 40px;
}

.toolbar-tray-open .modal__close {
  top: 80px;
}

.modal__content {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.modal__btn {
  cursor: pointer;
  -webkit-appearance: button;
  text-transform: none;
  overflow: visible;
  will-change: transform;
  -moz-osx-font-smoothing: grayscale;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  transition: -webkit-transform 0.25s ease-out;
  -webkit-transition: -webkit-transform 0.25s ease-out;
  -o-transition: transform 0.25s ease-out;
  transition: transform 0.25s ease-out;
  transition: transform 0.25s ease-out, -webkit-transform 0.25s ease-out;
}

.modal__btn:focus,
.modal__btn:hover {
  -webkit-transform: scale(1.05);
  transform: scale(1.05);
}

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

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

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

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

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

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

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

.micromodal-slide {
  display: none;
}

.micromodal-slide.is-open {
  display: block;
}

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

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

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

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

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

/* Styles when displaying video */

.modal--video .modal__container {
  background: transparent;
  padding: 64px 0 0 0; /* Offset more than the height of the close button */
  width: 60%;
}

.modal--video .modal__content {
  margin-top: 0;
  margin-bottom: 0;
}
