/* Extra stuff for galleries, this shouldn't go here, but it should go somewhere */
#current-image {
  padding: 10px 25px;
  height: auto;
}
#gallery-images {
  margin-left: 10%;
  margin-right: 10%;
}
#gallery-images img {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  float: left;
  width: 30%;
  padding: 5px;
}
@media screen and (max-width: 30em) {
  #current-image {
    padding: 10px;
  }
  #gallery-images {
    margin-left: 0;
    margin-right: 0;
  }
}
html {
  overflow-y: scroll;
}
.has-overlay {
  overflow: hidden;
}
.has-overlay > body {
  height: 100%;
  overflow-y: scroll;
}
.modal-fadein {
  -webkit-transform: translate(0, 100%);
  -moz-transform: translate(0, 100%);
  -o-transform: translate(0, 100%);
  -ms-transform: translate(0, 100%);
  transform: translate(0, 100%);
  -webkit-transform: translate3d(0, 100%, 0);
  transform: translate3d(0, 100%, 0);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  opacity: 0;
  display: none\9;
  color: #222;
  line-height: 1.3;
}
@media screen and (min-width: 30em) {
  .modal-fadein {
    -webkit-transition: opacity 0.8s;
    -o-transition: opacity 0.8s;
    transition: opacity 0.8s;
  }
}
.modal-fadein:target {
  -webkit-transform: translate(0, 0);
  -moz-transform: translate(0, 0);
  -o-transform: translate(0, 0);
  -ms-transform: translate(0, 0);
  transform: translate(0, 0);
  opacity: 1;
}
.modal-fadein.is-active {
  display: block\9;
}
.modal-fadein:target {
  display: block\9;
}
.modal-fadein .modal-inner {
  position: absolute;
  display: inline-block;
  top: 50px;
  left: 50%;
  z-index: 20;
  margin-left: -425px;
  width: 850px;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.modal-fadein .modal-inner > img > video,
.modal-fadein .modal-inner > iframe {
  width: 100%;
  height: auto;
  min-height: 400px;
}
.modal-fadein .modal-inner > img {
  width: auto;
  max-width: 100%;
}
.modal-fadein .modal-content {
  max-height: 550px;
  max-height: 75vh;
  overflow-x: hidden;
  overflow-y: auto;
}
.modal-fadein .modal-content > * {
  max-width: 100%;
}
.modal-fadein .modal-close {
  display: block;
  height: 1px;
  clip: rect(0 0 0 0);
  overflow: hidden;
}
.modal-fadein .modal-close:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
}
.modal-fadein .modal-close:after {
  position: absolute;
  top: 30px;
  left: 50%;
  z-index: 15;
  margin-left: 398px;
}
@media screen and (max-width: 890px) {
  .modal-fadein .modal-inner {
    width: auto;
    left: 30px;
    right: 30px;
    margin-left: 0;
  }
  .modal-fadein .modal-close {
    left: auto;
    margin-left: 0;
    right: 33px;
  }
  .modal-fadein .modal-close:after {
    margin-left: 37%;
  }
}
@media screen and (max-height: 46em) and (min-width: 30em) {
  .modal-fadein .modal-content {
    max-height: 400px;
    max-height: 70vh;
  }
}
@media screen and (max-height: 36em) and (min-width: 30em) {
  .modal-fadein .modal-content {
    max-height: 300px;
    max-height: 60vh;
  }
}
@media screen and (max-width: 30em) {
  .modal-fadein {
    -webkit-transform: translate3d(0, 400px);
    -webkit-transform: translate3d(0, 100%, 0);
    transform: translate3d(0, 100%, 0);
    -webkit-transition: -webkit-transform 0.25s ease-in-out, opacity 1ms 0.25s;
    -moz-transition: -moz-transform 0.25s ease-in-out, opacity 1ms 0.25s;
    -o-transition: -o-transform 0.25s ease-in-out, opacity 1ms 0.25s;
    -ms-transition: -ms-transform 0.25s ease-in-out, opacity 1ms 0.25s;
    transition: transform 0.25s ease-in-out, opacity 1ms 0.25s;
    display: block;
    height: 100%;
    bottom: auto;
  }
  .modal-fadein:target {
    -webkit-transition: -webkit-transform 0.25s ease-in-out;
    -moz-transition: -moz-transform 0.25s ease-in-out;
    -o-transition: -o-transform 0.25s ease-in-out;
    -ms-transition: -ms-transform 0.25s ease-in-out;
    transition: transform 0.25s ease-in-out;
  }
  .modal-fadein:before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
  }
  .modal-fadein .modal-inner {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    overflow: scroll;
    -webkit-box-shadow: none;
    box-shadow: none;
  }
  .modal-fadein .modal-content {
    max-height: none;
  }
  .modal-fadein .modal-close {
    right: auto;
    text-decoration: none;
  }
  .modal-fadein .modal-close:before {
    display: none;
  }
  .modal-fadein .modal-close:after {
    top: 0.7em;
    left: 1em;
    z-index: 40;
    margin-left: 0;
  }
}
.modal-fadein .modal-inner {
  -moz-border-radius: 5px;
  border-radius: 5px;
  background: #fff;
}
.modal-fadein header {
  border-bottom: 2px solid #dddddd;
  padding: 0 1.2em;
}
.modal-fadein header > h2 {
  margin: 0.5em 0;
}
.modal-fadein footer {
  border-top: 1px solid #ffffff;
  padding: 0 1.2em 18px;
  background: #d9d9d9;
  border-radius: 2px;
}
.modal-fadein .modal-close:before {
  background-color: rgba(0, 0, 0, 0.7);
  filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr='#7F00FF00', EndColorStr='#7F00FF00');
  background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAEElEQVR42gEFAPr/AAAAAMwA0QDNTiUx4gAAAABJRU5ErkJggg==');
}
.modal-fadein .modal-close:after {
  content: 'X';
  background: #fff;
  -moz-border-top-left-radius: 5px;
  border-top-left-radius: 5px;
  -moz-border-top-right-radius: 5px;
  border-top-right-radius: 5px;
  padding: 2px 8px;
  font-size: 1.2em;
  text-decoration: none;
  text-indent: 0;
}
@media screen and (max-width: 30em) {
  .modal-fadein header {
    border-bottom: 2px solid #dddddd;
    padding: 0 0.5em;
  }
  .modal-fadein header > h2 {
    margin: 0.5em 0;
  }
  .modal-fadein:before {
    background-image: -ms-linear-gradient(top, #373d47 0%, #4d5664 100%);
    background-image: -moz-linear-gradient(top, #373d47 0%, #4d5664 100%);
    background-image: -o-linear-gradient(top, #373d47 0%, #4d5664 100%);
    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #373d47), color-stop(1, #4d5664));
    background-image: -webkit-linear-gradient(top, #373d47 0%, #4d5664 100%);
    background-image: linear-gradient(to bottom, #373d47 0%, #4d5664 100%);
    background-color: #373d47;
    height: 3em;
    border-bottom: 2px solid #0a0c0e;
  }
  .modal-fadein .modal-inner {
    padding-top: 3em;
  }
  .modal-fadein .modal-content {
    padding: 0 1em;
  }
  .modal-fadein .modal-close {
    text-decoration: none;
  }
  .modal-fadein .modal-close:after {
    font-size: 1em;
    padding: 0.25em 0.7em;
    border-radius: 20px;
  }
}
