.click, .hover{
  cursor: pointer;
  border-radius: 1em;
  padding: .2em .5em;
  background-color: rgb(131, 206, 129);
}

.overlay{
  position: absolute;
  top:0;
  left:0;
  width:400px;
  height:auto;
  overflow: hidden;
  min-height: 200px;
  border-radius: .5em;
  box-sizing: border-box;
  background-color: white;
  box-shadow: 0 0 1em rgba(0,0,0,.4);
  resize: both;
  transform: scale(0);
  z-index: 0;
  transition: transform .3s ease;

}

/* .safari .overlay{
  padding-bottom: 50px;
} */

.overlay[data-size="s"]{
  width:100px;
  min-height: 100px;
}
.overlay[data-size="l"]{
  width:500px;
  min-height: 600px;
}

.overlay-header{
  display: block;
  background-color: var(--gray);
  top: 0;
  height:auto;
  clear: both;
  cursor: grab;
  text-align: center;
}

.overlay-header .close{
  padding: 0 .2em;
  box-sizing: border-box;
  cursor: pointer;
  float:right;

}

.overlay-header::after{
  content:'';
  clear:both;
  display: table;
}

.overlay img{
  width:100%;
}

.overlay p{
  font-size: .8em;
}

.overlay iframe{
  width: 100%;
  height:100%;
}
.overlay iframe body,
.overlay iframe html
{
  overflow: auto !important;
}

.overlay-header a{
  font-size: .3em;
  text-decoration: none;
  color: inherit;
  white-space: nowrap;
  background-color: white;
  margin: 0 auto;
  display: inline-block;
  max-width: 50%;
  overflow: hidden;
}

#sources {
  font-size: .7em;
}

#sources a{
  display: block;
}

.prevnext{
  display: flex;
}

.prevnext a{
  color: black;
  text-align: right;
  flex:1;
}

a.prev{
  text-align: left;
}

@media (max-width:700px) {

  .overlay{
    width:200px;
  }

  .overlay p{
    font-size: .6em;
  }
}
