.imagemodal {
  position: relative;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  background-color: #ffffff;
  border-radius: 4px;
  display: inline-block;
}

.imagemodal__outer {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100vh;
  overflow: auto;
  z-index: 999;
  opacity: 0;
  -webkit-transition: opacity 0.3s ease;
  transition: opacity 0.3s ease;
  background-color: rgba(0, 0, 0, 0.5);
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  padding: 40px;
  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;
}

@media screen and (max-width: 768px) {
  .imagemodal__outer {
    padding: 21px 27px 21px 21px;
  }
}

.imagemodal__outer--show {
  opacity: 1;
}

.imagemodal__inner {
  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;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  position: relative;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  padding: 30px;
  max-width: 1070px;
  max-height: 1070px;
}

.imagemodal__inner figure {
  width: 100%;
}

.imagemodal__inner figure img {
  max-width: 100%;
  height: 575px;
}

.imagemodal__inner figure figcaption {
  margin: 1em auto 0;
}

@media screen and (max-width: 768px) {
  .imagemodal__inner {
    padding: 20px;
  }
  .imagemodal__inner figure img {
    max-height: 450px;
  }
}

.imagemodal__close {
  position: absolute;
  top: -18px;
  right: -18px;
  width: 36px;
  height: 36px;
  background-color: #0064d2;
  border-radius: 50%;
  -webkit-box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, 0.16);
  box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, 0.16);
  cursor: pointer;
  z-index: 1;
}

.imagemodal__close:focus {
  outline-style: none;
  border-radius: 4px;
  -webkit-box-shadow: 0 0 4px 1px #0064d2;
  box-shadow: 0 0 4px 1px #0064d2;
  border-radius: 50%;
}

.imagemodal__close::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 10px;
  width: 16px;
  height: 0;
  border-top: 2px solid #fff;
  -webkit-transform: rotate(-45deg);
  transform: rotate(-45deg);
  -webkit-transform-origin: center center;
  transform-origin: center center;
}

.imagemodal__close::after {
  content: "";
  position: absolute;
  top: 18px;
  left: 10px;
  width: 16px;
  height: 0;
  border-top: 2px solid #fff;
  -webkit-transform: rotate(45deg);
  transform: rotate(45deg);
  -webkit-transform-origin: center center;
  transform-origin: center center;
}

.imagemodal img {
  cursor: auto;
  -webkit-box-shadow: none !important;
  box-shadow: none !important;
}
